fix example (syntax error and indenting)

pull/1/head
Sergiy Borodych 13 years ago
parent 2cd4f8b900
commit 68df2de308

@ -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);

Loading…
Cancel
Save