I was working with Flot line charts and setting their colors. I found an odd bug. After the first 3 colors, the plot uses the last color for all of the other lines. This is not the correct behavior.
What makes this even more interesting is that the legend displays the correct colors. Is this a known bug?
var dataSet = [
{label: "d1", data: demand},
{label: "d2", data: demand2},
{label: "d3", data: demand3},
{label: "d4", data: demand4},
{label: "d5", data: demand5},
{label: "d6", data: demand6}
]
$.plot(placeholder2, dataSet, {
series: {
},
legend: {
noColumns: 0,
position: "nw"
},
colors:["#2980B9","#D35400","#F39C12","#7F8CFF","#C0392B","#7F8C8D"]
});
Just to make sure that I wasn't going crazy, and to confirm, I tried the code again, but removed the colors specification. You'll see that even with Flot's default colors, the last color "sticks".