Commit c61c120a authored by olau@iola.dk's avatar olau@iola.dk

Added drawSeries hook


git-svn-id: https://flot.googlecode.com/svn/trunk@242 1e0a6537-2640-0410-bfb7-f154510ff394
parent ab3b68ac
...@@ -950,14 +950,23 @@ hooks in the plugins bundled with Flot. ...@@ -950,14 +950,23 @@ hooks in the plugins bundled with Flot.
doesn't check it or do any normalization on it afterwards. 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] - draw [phase 5]
function(plot, canvascontext) function(plot, canvascontext)
Hook for drawing on the canvas. Called after the grid is drawn Hook for drawing on the canvas. Called after the grid is drawn
(unless it's disabled) and the series have been plotted (in case (unless it's disabled or grid.aboveData is set) and the series have
any points, lines or bars have been turned on). For examples of how been plotted (in case any points, lines or bars have been turned
to draw things, look at the source code. on). For examples of how to draw things, look at the source code.
- bindEvents [phase 6] - bindEvents [phase 6]
......
...@@ -18,7 +18,7 @@ Changes: ...@@ -18,7 +18,7 @@ Changes:
to null). Issue 235. to null). Issue 235.
- Date formatter now accepts %0m and %0d to get a zero-padded month or - Date formatter now accepts %0m and %0d to get a zero-padded month or
day (issue raised by Maximillian Dornseif). day (issue raised by Maximillian Dornseif).
- New hooks: drawSeries
Bug fixes: Bug fixes:
......
...@@ -139,6 +139,7 @@ ...@@ -139,6 +139,7 @@
processOptions: [], processOptions: [],
processRawData: [], processRawData: [],
processDatapoints: [], processDatapoints: [],
drawSeries: [],
draw: [], draw: [],
bindEvents: [], bindEvents: [],
drawOverlay: [] drawOverlay: []
...@@ -1067,8 +1068,10 @@ ...@@ -1067,8 +1068,10 @@
if (grid.show && !grid.aboveData) if (grid.show && !grid.aboveData)
drawGrid(); 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]); drawSeries(series[i]);
}
executeHooks(hooks.draw, [ctx]); executeHooks(hooks.draw, [ctx]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment