I have a total of eight small fever charts. Four for grants and four charts for loans.
Using:
Highcharts.setOptions({
chart: {
backgroundColor: null
},
etc...
});
and then access those settings using:
var chart1 = new Highcharts.Chart({
chart: {renderTo: 'smallChart1'},
series: [{data: [13334, 14376, 15825, 16267]}]
});
I am able to make the first four charts all follow the single set of options.
So that works fine. But now I want to setOptions for the second group of charts but I don't know how to make a second set of setOptions the other four charts can share.
Thanks.
SetOptions
Can be used only once inhighcharts
.See jsfiddle. It is releveant to your question. It shows how to use
SetOptions
for multiple charts.If you want to set different options for different charts, just don't use the global configuration. Only use the global
setOptions({ ... })
for things you want to be the same in every chart. To override the options for the series just pass in the styles.for example, say I wanted the font to be the same in every chart and a
minPointLength
, but I wanted more fine tuned control in the series... It might look something like this.e.g. - the configuration for a given plot
SetOptions can be used single time, because overwrites global settings, and again calling doens't work.