From b88c56a35fd080fc4078e8d57d9d29567f1c1d00 Mon Sep 17 00:00:00 2001 From: Samuel Denis-D'Ortun Date: Thu, 19 May 2016 19:43:07 -0400 Subject: [PATCH] Fix #228 --- static/js/history.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/static/js/history.js b/static/js/history.js index bc020b7b..f3eaa749 100644 --- a/static/js/history.js +++ b/static/js/history.js @@ -94,7 +94,7 @@ function create_plot($this, mode) xmin: interval[0], xmax: interval[1] || time, yOffset: '1px', - color: '#fe5d5d', + color: 'rgba(200, 0, 0, 0.3)', showTooltip: true, showTooltipPrecision: 1.0, tooltipFormatString: "↓ " + d.strftime(long_date_format) @@ -118,6 +118,7 @@ function create_plot($this, mode) showLegend = false; } + plot = $.jqplot($this.attr('id'), lines, { title: $this.attr('data-title'), series: series, @@ -160,5 +161,15 @@ function create_plot($this, mode) constrainZoomTo: 'x' } }); - $this.data('psm_plot', plot); + + $this.data('psm_plot', plot); + $.jqplot.postDrawHooks.push(function () + { + var overlayCanvas = $($('.jqplot-overlayCanvas-canvas')[0]); + var legend = $($('.jqplot-table-legend')[0]); + legend.detach(); + overlayCanvas.after(legend); + }); + + }