blob: a569e0beaecb7f872e03ff5a23e362040fced004 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
Vue.component('chart-project-user-distribution', {
props: ['metrics'],
template: '<div id="chart"></div>',
ready: function () {
var columns = [];
for (var i = 0; i < this.metrics.length; i++) {
columns.push([this.metrics[i].user, this.metrics[i].nb_tasks]);
}
c3.generate({
data: {
columns: columns,
type : 'donut'
}
});
}
});
|