summaryrefslogtreecommitdiff
path: root/assets/js/src/TaskRepartitionChart.js
blob: 1b1368dc8dd16adaa1a618056d58bfa8f1354821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
function TaskRepartitionChart() {
}

TaskRepartitionChart.prototype.execute = function() {
    var metrics = $("#chart").data("metrics");
    var columns = [];

    for (var i = 0; i < metrics.length; i++) {
        columns.push([metrics[i].column_title, metrics[i].nb_tasks]);
    }

    c3.generate({
        data: {
            columns: columns,
            type : 'donut'
        }
    });
};