Settings and activity
1 result found
-
3 votes
The theme actually isn’t part of the Highcharts namespace internally, it is just assigned there for conveniency.
Best practice currently would be to merge in the theme with your chart options:
chart1 = new Highcharts.Chart(Highcharts.merge(options1, theme1));
An error occurred while saving the comment
This helped! Thank you!
In my case I needed to use multiple Highcharts themes on the same page.
My initial code was like this:
Highcharts.setOptions(theme);
// Create the chart
window.chart = new Highcharts.Chart({
chart: {
renderTo: 'divChartContainer'
},
.......
});
NOW, it looks like this:
var obj = {
chart: {
renderTo: 'divChartContainer'
},
.........
});
window.chart = new Highcharts.Chart(Highcharts.merge(obj,thema));