diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-11-21 23:16:18 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-11-21 23:16:18 -0500 |
commit | b9ab163344f1ed3a2232c7d273b20d86c25a2735 (patch) | |
tree | 042a9bba744d172a75823349805b0e96ac14c220 /assets/js/components/chart-lead-cycle-time.js | |
parent | 25272afa9b383adbf22e1c7631f0b1f841fa8d0f (diff) |
Move chart task time column to components
Diffstat (limited to 'assets/js/components/chart-lead-cycle-time.js')
-rw-r--r-- | assets/js/components/chart-lead-cycle-time.js | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/assets/js/components/chart-lead-cycle-time.js b/assets/js/components/chart-lead-cycle-time.js deleted file mode 100644 index db7767d2..00000000 --- a/assets/js/components/chart-lead-cycle-time.js +++ /dev/null @@ -1,47 +0,0 @@ -KB.component('chart-lead-cycle-time', function (containerElement, options) { - - this.render = function () { - var metrics = options.metrics; - var cycle = [options.labelCycle]; - var lead = [options.labelLead]; - var categories = []; - - var types = {}; - types[options.labelCycle] = 'area'; - types[options.labelLead] = 'area-spline'; - - var colors = {}; - colors[options.labelLead] = '#afb42b'; - colors[options.labelCycle] = '#4e342e'; - - for (var i = 0; i < metrics.length; i++) { - cycle.push(parseInt(metrics[i].avg_cycle_time)); - lead.push(parseInt(metrics[i].avg_lead_time)); - categories.push(metrics[i].day); - } - - KB.el(containerElement).add(KB.el('div').attr('id', 'chart').build()); - - c3.generate({ - data: { - columns: [ - lead, - cycle - ], - types: types, - colors: colors - }, - axis: { - x: { - type: 'category', - categories: categories - }, - y: { - tick: { - format: KB.utils.formatDuration - } - } - } - }); - }; -}); |