How to invert a chart in Highcharts through code?

I am trying to invert a chart through code in Highcharts.

I set the inverted property of the chart:

chart.inverted = true;
chart.redraw();

You can see the code I'm using here:

http://jsfiddle.net/Wajood/Hz4bH/

This does not invert the chart. It seems to me that the redraw () function does not seem to care about the inverted property.

Any help / suggestions / advice on this would be appreciated.

Thank.

+5
source share
2 answers

A call redraw()will only lead to data changes. Viewing methods in the Highcharts API does not seem to be a method that will alter the configuration of an invertedexisting chart.

- chart.inverted.

+3

, chart.update.

chart.update({chart: {inverted: true}});
chart.redraw();

http://api.highcharts.com/highcharts/Chart.update

0

All Articles