Use single color for all series in the same chart
colors, highcharts
Solution
You can do it they way Jeremy mentioned, by setting the colors options for each chart. Or you can override the default color array as follows
Highcharts.setOptions({
colors:['red','green','blue']
});
The benefit of this approach is you only have to call this once, before create any chart. And all charts after this will use these colors, without you needing to set this option on each chart. Most of the websites have a common.js or a similar javascript file that is generally loaded before any other custom script, you just need to add this code to that file and forget about the colors thereafter
Update Since you want all series in the same chart to be of a single color, you can override the colors array completely and make it have only one color
Highcharts.getOptions().colors = ['red'];
This method will leave the navigator (blue mini graph at bottom in Highstock) to be of default blue color, this has to be overriden in a different way from options.
P.S. the above way is not the recommended way of overriding default options, correct way would be to do `setOptions()`, but that would cause a merge with existing defaults and hence the array size would be more than 1.
Alternately, you can just override the getColor method as follows, to always return the color of your choice. Again you need to do this before you call the chart's constructor
Highcharts.Series.prototype.getColor=function(){
this.color= '#f00';
}
Setting default colors @ jsFiddle
Problem
How can I set the same color for all the series in a single chart? I have a huge number of series in my chart and it can be inconvenient to set the color for each of the series individually. Let's say I want all the series of my chart to be `red` colored, how do I go about doing this without needing to explicitly set the `series.color` to `red` each time?