-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.js
41 lines (40 loc) · 986 Bytes
/
index.js
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
import Vue from 'vue';
import vueChartist from './src/vue-chartist.vue';
new Vue({
el: '#container',
components: {
'vue-chartist': vueChartist
},
data() {
return {
type: 'Bar',
data: {
labels: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
series: [
[12, 9, 7, 8, 5],
[2, 1, 3.5, 7, 3],
[1, 3, 4, 5, 6]
]
},
options: {
fullWidth: true,
chartPadding: {
right: 40
}
},
listener: {
data(e) {
console.log(e);
}
}
};
},
methods: {
updateData() {
this.data.series.push([100, 30, 44, 52, 61]);
},
updateOptions() {
this.options.chartPadding.right = 10;
}
}
});