diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-09-03 20:39:13 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-09-03 20:39:13 -0400 |
commit | 8c07a0d03e64227c552f3b4530d3a1e1ba53402b (patch) | |
tree | 1d60285831f41beae2067fe55bd820affda6ebe3 /assets/js/src | |
parent | 59fd3c366cd34cf1be3f20d44b424107c88c030b (diff) |
Convert task distribution chart to Vue.js component
Diffstat (limited to 'assets/js/src')
-rw-r--r-- | assets/js/src/App.js | 4 | ||||
-rw-r--r-- | assets/js/src/TaskRepartitionChart.js | 25 |
2 files changed, 4 insertions, 25 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js index b85d5d3c..31b7f51a 100644 --- a/assets/js/src/App.js +++ b/assets/js/src/App.js @@ -36,6 +36,10 @@ Kanboard.App.prototype.execute = function() { this.datePicker(); this.autoComplete(); this.tagAutoComplete(); + + new Vue({ + el: 'body' + }); }; Kanboard.App.prototype.keyboardShortcuts = function() { diff --git a/assets/js/src/TaskRepartitionChart.js b/assets/js/src/TaskRepartitionChart.js deleted file mode 100644 index 621be630..00000000 --- a/assets/js/src/TaskRepartitionChart.js +++ /dev/null @@ -1,25 +0,0 @@ -Kanboard.TaskRepartitionChart = function(app) { - this.app = app; -}; - -Kanboard.TaskRepartitionChart.prototype.execute = function() { - if (this.app.hasId("analytic-task-repartition")) { - this.show(); - } -}; - -Kanboard.TaskRepartitionChart.prototype.show = 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' - } - }); -}; |