summaryrefslogtreecommitdiff
path: root/assets/js/src/TaskTimeColumnChart.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src/TaskTimeColumnChart.js')
-rw-r--r--assets/js/src/TaskTimeColumnChart.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/assets/js/src/TaskTimeColumnChart.js b/assets/js/src/TaskTimeColumnChart.js
index 1ecc486b..9b26d76e 100644
--- a/assets/js/src/TaskTimeColumnChart.js
+++ b/assets/js/src/TaskTimeColumnChart.js
@@ -1,10 +1,17 @@
-function TaskTimeColumnChart(app) {
+Kanboard.TaskTimeColumnChart = function(app) {
this.app = app;
-}
+};
+
+Kanboard.TaskTimeColumnChart.prototype.execute = function() {
+ if (this.app.hasId("analytic-task-time-column")) {
+ this.show();
+ }
+};
-TaskTimeColumnChart.prototype.execute = function() {
- var metrics = $("#chart").data("metrics");
- var plots = [$("#chart").data("label")];
+Kanboard.TaskTimeColumnChart.prototype.show = function() {
+ var chart = $("#chart");
+ var metrics = chart.data("metrics");
+ var plots = [chart.data("label")];
var categories = [];
for (var i = 0; i < metrics.length; i++) {