Skip to content

Commit

Permalink
fix example (syntax error and indenting)
Browse files Browse the repository at this point in the history
  • Loading branch information
bor committed Feb 20, 2013
1 parent 2cd4f8b commit 68df2de
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions PLUGINS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,18 @@ how much info to output:
var debugLevel = 1;

function checkDebugEnabled(plot, options) {
if (options.debug) {
debugLevel = options.debug;
plot.hooks.processDatapoints.push(alertSeries);
if (options.debug) {
debugLevel = options.debug;
plot.hooks.processDatapoints.push(alertSeries);
}
}
}

function alertSeries(plot, series, datapoints) {
var msg = "series " + series.label;
if (debugLevel > 1) {
msg += " with " + series.data.length + " points";
alert(msg);
function alertSeries(plot, series, datapoints) {
var msg = "series " + series.label;
if (debugLevel > 1) {
msg += " with " + series.data.length + " points";
alert(msg);
}
}

plot.hooks.processOptions.push(checkDebugEnabled);
Expand Down

0 comments on commit 68df2de

Please sign in to comment.