From a6414cac60cd6d3efb2c2a9dd0cc563ecb92b2f8 Mon Sep 17 00:00:00 2001 From: David Schnur Date: Sat, 22 Dec 2012 10:02:40 -0500 Subject: [PATCH] Prevent color generation with all fixed indexes. As pointed out in a comment to #832, initializing maxIndex to zero results in the creation of a single color even when all indexes are fixed. --- jquery.flot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.flot.js b/jquery.flot.js index 03e8e32..94c8d11 100644 --- a/jquery.flot.js +++ b/jquery.flot.js @@ -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.