Commit 2ebeb5d4 authored by olau@iola.dk's avatar olau@iola.dk

Added draw hook


git-svn-id: https://flot.googlecode.com/svn/trunk@167 1e0a6537-2640-0410-bfb7-f154510ff394
parent f1db197e
......@@ -923,6 +923,16 @@ Currently available hooks (when in doubt, check the Flot source):
Note that you must leave datapoints in a good condition as Flot
doesn't check it or do any normalization on it afterwards.
- 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.
- bindEvents [phase 6]
......
......@@ -113,6 +113,7 @@
processOptions: [],
processRawData: [],
processDatapoints: [],
draw: [],
bindEvents: [],
drawOverlay: []
},
......@@ -994,8 +995,11 @@
function draw() {
if (options.grid.show)
drawGrid();
for (var i = 0; i < series.length; ++i)
drawSeries(series[i]);
executeHooks(hooks.draw, [ctx]);
}
function extractRange(ranges, coord) {
......
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