Search code examples
chartshighchartslogarithm

How to dynamically change axis from linear to logarithmic in HighChart


I want to dynamically change axis from linear to logarithmic and vice versa in HighCharts. Please see this fiddle example.

yAxis: {
    //linear
    type: 'logarithmic',
    minorTickInterval: 0.1
},

There is a type: String in api For initial declarative chart setup. I want to dynamically change to logarithmic/linear back and forth.


Solution

  • Use axis.update, see: http://jsfiddle.net/ZCecV/1/ (docs: http://api.highcharts.com/highcharts#Axis.update() )