From 94193ea3cb55ef0e4a8b2117f9da9818d7b10de5 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Thu, 28 Aug 2014 12:10:57 +0200 Subject: [PATCH] Fixing backlog graph, removing unnecesary sprint names --- app/coffee/modules/backlog/main.coffee | 11 ++++++----- bower.json | 1 + gulpfile.coffee | 2 ++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/app/coffee/modules/backlog/main.coffee b/app/coffee/modules/backlog/main.coffee index 089ec8b1..55c23731 100644 --- a/app/coffee/modules/backlog/main.coffee +++ b/app/coffee/modules/backlog/main.coffee @@ -793,8 +793,7 @@ tgBacklogGraphDirective = -> redrawChart = (element, dataToDraw) -> width = element.width() element.height(width/6) - milestones = _.map(dataToDraw.milestones, (ml) -> ml.name) - milestonesRange = [0..(milestones.length - 1)] + milestonesRange = [0..(dataToDraw.milestones.length - 1)] data = [] zero_line = _.map(dataToDraw.milestones, (ml) -> 0) data.push({ @@ -844,11 +843,13 @@ tgBacklogGraphDirective = -> borderColor: '#ccc' } xaxis: { - ticks: _.zip(milestonesRange, milestones) + ticks: dataToDraw.milestones.length + axisLabel: "Sprints" axisLabelUseCanvas: true - axisLabelFontSizePixels: 12 + axisLabelFontSizePixels: 14 axisLabelFontFamily: 'Verdana, Arial, Helvetica, Tahoma, sans-serif' - axisLabelPadding: 5 + axisLabelPadding: 15 + tickFormatter: (val, axis) -> "" } series: { shadowSize: 0 diff --git a/bower.json b/bower.json index fc8af56a..deaa483f 100644 --- a/bower.json +++ b/bower.json @@ -66,6 +66,7 @@ "markitup": "~1.1.14", "jquery-textcomplete": "yuku-t/jquery-textcomplete#~0.1.1", "flot-orderBars": "emmerich/flot-orderBars", + "flot-axislabels": "markrcote/flot-axislabels", "moment": "~2.6.0", "isMobile": "~0.3.1", "favico.js": "0.3.4", diff --git a/gulpfile.coffee b/gulpfile.coffee index 7b3ed335..7a62e4c8 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -70,6 +70,8 @@ paths = { "app/vendor/jquery-flot/jquery.flot.js", "app/vendor/jquery-flot/jquery.flot.pie.js", "app/vendor/jquery-flot/jquery.flot.time.js", + "app/vendor/jquery-flot/jquery.flot.time.js", + "app/vendor/flot-axislabels/jquery.flot.axislabels.js", "app/vendor/jquery-textcomplete/jquery.textcomplete.js", "app/vendor/markitup/markitup/jquery.markitup.js" "app/js/jquery.ui.git.js",