Added drawSeries hook

git-svn-id: https://flot.googlecode.com/svn/trunk@242 1e0a6537-2640-0410-bfb7-f154510ff394
pull/1/head
olau@iola.dk 16 years ago
parent ab3b68acd9
commit c61c120a78

@ -950,14 +950,23 @@ hooks in the plugins bundled with Flot.
doesn't check it or do any normalization on it afterwards.
- drawSeries [phase 5]
function(plot, canvascontext, series)
Hook for custom drawing of a single series. Called just before the
standard drawing routine has been called in the loop that draws
each series.
- draw [phase 5]
function(plot, canvascontext)
Hook for drawing on the canvas. Called after the grid is drawn
(unless it's disabled) and the series have been plotted (in case
any points, lines or bars have been turned on). For examples of how
to draw things, look at the source code.
(unless it's disabled or grid.aboveData is set) and the series have
been plotted (in case any points, lines or bars have been turned
on). For examples of how to draw things, look at the source code.
- bindEvents [phase 6]

@ -18,7 +18,7 @@ Changes:
to null). Issue 235.
- Date formatter now accepts %0m and %0d to get a zero-padded month or
day (issue raised by Maximillian Dornseif).
- New hooks: drawSeries
Bug fixes:

@ -139,6 +139,7 @@
processOptions: [],
processRawData: [],
processDatapoints: [],
drawSeries: [],
draw: [],
bindEvents: [],
drawOverlay: []
@ -1067,8 +1068,10 @@
if (grid.show && !grid.aboveData)
drawGrid();
for (var i = 0; i < series.length; ++i)
for (var i = 0; i < series.length; ++i) {
executeHooks(hooks.drawSeries, [ctx, series[i]]);
drawSeries(series[i]);
}
executeHooks(hooks.draw, [ctx]);

Loading…
Cancel
Save