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