Commit 736c098e authored by olau@iola.dk's avatar olau@iola.dk

Reformulated the hooks example which was silly


git-svn-id: https://flot.googlecode.com/svn/trunk@208 1e0a6537-2640-0410-bfb7-f154510ff394
parent c77b0af8
...@@ -920,17 +920,15 @@ Here's an overview of the phases Flot goes through: ...@@ -920,17 +920,15 @@ Here's an overview of the phases Flot goes through:
7. Responding to events, if any 7. Responding to events, if any
The hooks are simple arrays. They are available on the "hooks" The hooks are simple arrays. They are available on the "hooks"
sub-object on the Plot object with the names mentioned below, e.g. object on the Plot object, e.g.
var plot = $.plot(...); var plot = $.plot(...);
function f(plot, series, datapoints) { alert("hello!")}; function f(plot, canvascontext) { alert("hello!")};
plot.hooks.processDatapoints.push(f); plot.hooks.draw.push(f); // add f to the array of "draw" hooks
All hooks get the plot object as first parameter. The hooks get the plot object as first parameter. Currently available hooks:
Currently available hooks (when in doubt, check the Flot source):
- processOptions [phase 1] - processOptions [phase 1]
......
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