Accepted answer

i have created a demo fiddle to dynamically change y-axis title. refer this jsfiddle


<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>

<input type="button" value="change y-axis title to 'my text'" id="my_btn">

js (part of thec code to update the y-axis title on a button click):

var chart = $('#container').highcharts();
                text:"my text"
        alert('y-axis title changed to "my text" !');

refer highcharts 'update' function documentation for further details.


you have two options:

  • use axis.settitle() - good performance, i advice use that solution for setting title
  • use axis.update() - lower performance, because it recreates whole axis, while first method only changes title

Related Query

More Query from same tag