blob: 8ab617994c521e7c2884c1506e23c78dd14be4fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
KB.component('chart-project-user-distribution', function (containerElement, options) {
this.render = function () {
var columns = [];
for (var i = 0; i < options.metrics.length; i++) {
columns.push([options.metrics[i].user, options.metrics[i].nb_tasks]);
}
KB.el(containerElement).add(KB.el('div').attr('id', 'chart').build());
c3.generate({
data: {
columns: columns,
type : 'donut'
}
});
};
});
|