pull/294/merge
Samuel Denis-D'Ortun 2017-04-29 20:32:01 +00:00 committed by GitHub
commit 1674d42efb
1 changed files with 13 additions and 2 deletions

View File

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