Commit 4b1ff972 authored by David Schnur's avatar David Schnur

Merge pull request #966 from bor/fix/PLUGINS_example

Fix example (syntax error and indenting).
parents 2cd4f8b9 68df2de3
...@@ -45,17 +45,18 @@ how much info to output: ...@@ -45,17 +45,18 @@ how much info to output:
var debugLevel = 1; var debugLevel = 1;
function checkDebugEnabled(plot, options) { function checkDebugEnabled(plot, options) {
if (options.debug) { if (options.debug) {
debugLevel = options.debug; debugLevel = options.debug;
plot.hooks.processDatapoints.push(alertSeries); plot.hooks.processDatapoints.push(alertSeries);
}
} }
}
function alertSeries(plot, series, datapoints) { function alertSeries(plot, series, datapoints) {
var msg = "series " + series.label; var msg = "series " + series.label;
if (debugLevel > 1) { if (debugLevel > 1) {
msg += " with " + series.data.length + " points"; msg += " with " + series.data.length + " points";
alert(msg); alert(msg);
}
} }
plot.hooks.processOptions.push(checkDebugEnabled); plot.hooks.processOptions.push(checkDebugEnabled);
......
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