I am developing a website and using Highcharts. I have a bar/column chart selection. The chart is first displayed in bar chart, and then using the following code switch between the two chart types:
Code for changing to bar chart:
var chart = code for find the chart object
chart.inverted = true;
chart.xAxis[0].update({}, false);
chart.yAxis[0].update({}, false);
chart.series[0].update({
type: 'bar'
});
The following code is for changing to column chart:
var chart = code for find the chart object
chart.inverted = false;
chart.xAxis[0].update({}, true);
chart.yAxis[0].update({}, true);
chart.series[0].update({
type: 'column'
});
When the chart is first displayed in bar chart, all the data are displayed. However, when changed to column chart, some columns are missing. Please see the below picture. If I change it to bar chart, all the data are still there.
What could the cause for this problem? Thanks!