Convert task distribution chart to Vue.js component
This commit is contained in:
@@ -36,6 +36,10 @@ Kanboard.App.prototype.execute = function() {
|
||||
this.datePicker();
|
||||
this.autoComplete();
|
||||
this.tagAutoComplete();
|
||||
|
||||
new Vue({
|
||||
el: 'body'
|
||||
});
|
||||
};
|
||||
|
||||
Kanboard.App.prototype.keyboardShortcuts = function() {
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user