Skip to content

Commit

Permalink
Prevent color generation with all fixed indexes.
Browse files Browse the repository at this point in the history
As pointed out in a comment to flot#832, initializing maxIndex to zero
results in the creation of a single color even when all indexes are
fixed.
  • Loading branch information
dnschnur committed Dec 22, 2012
1 parent 88e0567 commit a6414ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.flot.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ Licensed under the MIT license.

function fillInSeriesOptions() {

var neededColors = series.length, maxIndex = 0, i;
var neededColors = series.length, maxIndex = -1, i;

// Subtract the number of series that already have fixed colors or
// color indexes from the number that we still need to generate.
Expand Down

0 comments on commit a6414ca

Please sign in to comment.