-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathmain.vue
55 lines (53 loc) · 1.57 KB
/
main.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<template>
<div>
<pivotdatasource ref="pivotdatasource1"
transport-read-url="https://demos.telerik.com/kendo-ui/service/Northwind.svc/Customers"
type="odata"
:schema-cube="schemaCube"
:measures="measures">
<pivot-column :name="'Country'" :expand="true"></pivot-column>
<pivot-column :name="'CompanyName'" ></pivot-column>
<pivot-row :name="'ContactTitle'" ></pivot-row>
</pivotdatasource>
<pivotconfigurator id="pivotconfigurator1"
data-source-ref="pivotdatasource1"
:filterable="true"
:height="200" >
</pivotconfigurator>
<pivotgrid id="pivotgrid1"
data-source-ref="pivotdatasource1"
:filterable="true"
:columnWidth="120"
:height="400" >
</pivotgrid>
</div>
</template>
<script>
import { PivotDataSource, PivotColumn } from '@progress/kendo-datasource-vue-wrapper';
import { PivotGrid, PivotConfigurator } from '@progress/kendo-pivotgrid-vue-wrapper';
export default {
name: 'App',
components: {
'pivotgrid': PivotGrid,
'pivotconfigurator': PivotConfigurator,
'pivot-column': PivotColumn,
'pivotdatasource': PivotDataSource
},
data: function (){
return {
measures: ['Contacts Count'],
schemaCube: {
dimensions: {
ContactName: { caption: 'All Contacts' },
CompanyName: { caption: 'All Companies' },
Country: { caption: 'All Countries' },
ContactTitle: { caption: 'All Titles' }
},
measures: {
'Contacts Count': { field: 'CustomerID', aggregate: 'count' }
}
}
}
}
}
</script>