blob: d3c88d5651da4a45d9115836c92da9d067df6258 (
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.dom(containerElement).add(KB.dom('div').attr('id', 'chart').build());
c3.generate({
data: {
columns: columns,
type : 'donut'
}
});
};
});
|