summaryrefslogtreecommitdiff
path: root/assets/js/src/TaskRepartitionChart.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src/TaskRepartitionChart.js')
-rw-r--r--assets/js/src/TaskRepartitionChart.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/assets/js/src/TaskRepartitionChart.js b/assets/js/src/TaskRepartitionChart.js
new file mode 100644
index 00000000..1b1368dc
--- /dev/null
+++ b/assets/js/src/TaskRepartitionChart.js
@@ -0,0 +1,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'
+ }
+ });
+};