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

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

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

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