summaryrefslogtreecommitdiff
path: root/assets/js/src
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-09-13 16:56:51 -0400
committerFrederic Guillot <fred@kanboard.net>2015-09-13 16:56:51 -0400
commit4b6672d0b33563ab8888d592ef86616ca9238007 (patch)
tree0ba5c0b2244f08ddac55169161271ca2a25ce005 /assets/js/src
parentd400f7c5be4b3f7371dce73510e5fd4a54375025 (diff)
Move budget outside of the core
The budget planning feature is now a plugin See: https://github.com/kanboard/plugin-budget
Diffstat (limited to 'assets/js/src')
-rw-r--r--assets/js/src/BudgetChart.js55
-rw-r--r--assets/js/src/Router.js1
2 files changed, 0 insertions, 56 deletions
diff --git a/assets/js/src/BudgetChart.js b/assets/js/src/BudgetChart.js
deleted file mode 100644
index 9ab0d5a9..00000000
--- a/assets/js/src/BudgetChart.js
+++ /dev/null
@@ -1,55 +0,0 @@
-function BudgetChart() {
-}
-
-BudgetChart.prototype.execute = function() {
- var categories = [];
- var metrics = $("#chart").data("metrics");
- var labels = $("#chart").data("labels");
- var inputFormat = d3.time.format("%Y-%m-%d");
- var outputFormat = d3.time.format($("#chart").data("date-format"));
-
- var columns = [
- [labels["in"]],
- [labels["left"]],
- [labels["out"]]
- ];
-
- var colors = {};
- colors[labels["in"]] = '#5858FA';
- colors[labels["left"]] = '#04B404';
- colors[labels["out"]] = '#DF3A01';
-
- for (var i = 0; i < metrics.length; i++) {
- categories.push(outputFormat(inputFormat.parse(metrics[i]["date"])));
- columns[0].push(metrics[i]["in"]);
- columns[1].push(metrics[i]["left"]);
- columns[2].push(metrics[i]["out"]);
- }
-
- c3.generate({
- data: {
- columns: columns,
- colors: colors,
- type : 'bar'
- },
- bar: {
- width: {
- ratio: 0.25
- }
- },
- grid: {
- x: {
- show: true
- },
- y: {
- show: true
- }
- },
- axis: {
- x: {
- type: 'category',
- categories: categories
- }
- }
- });
-};
diff --git a/assets/js/src/Router.js b/assets/js/src/Router.js
index 6993e5c3..0c96262c 100644
--- a/assets/js/src/Router.js
+++ b/assets/js/src/Router.js
@@ -27,7 +27,6 @@ jQuery(document).ready(function() {
router.addRoute('analytic-user-repartition', UserRepartitionChart);
router.addRoute('analytic-cfd', CumulativeFlowDiagram);
router.addRoute('analytic-burndown', BurndownChart);
- router.addRoute('budget-chart', BudgetChart);
router.addRoute('analytic-avg-time-column', AvgTimeColumnChart);
router.addRoute('analytic-task-time-column', TaskTimeColumnChart);
router.addRoute('analytic-lead-cycle-time', LeadCycleTimeChart);