Reputation: 5715
How to set colors of all series in flot as same?
Upvotes: 3
Views: 5793
Reputation: 76209
You can pass an array of colors in the options as well:
$.plot($("#plot"), [plotData], { colors: ['#0000FF'] });
Upvotes: 3
Reputation: 630379
When you're providing the data, give them the same color
property or index.
For example:
[ { color: 0, label: "Foo", data: [ [10, 1], [17, -14], [30, 5] ] },
{ color: 0, label: "Bar", data: [ [11, 13], [19, 11], [30, -7] ] } ]
In this case they'd both get color #0 in the auto-generated color array Flot has.
Upvotes: 6