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); + }); + + }