Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change HighCharts axis title

Is it possible to change the axis title of a HighCharts chart programatically?

I'm trying to do something like this:

charts.series[0].yAxis.title.text = 'new title';

or

charts.yAxis[0].title.text = 'new title';

(having already set a title when the chart was initialized).

like image 378
Tomba Avatar asked Sep 10 '25 05:09

Tomba


1 Answers

Yes you can do this by using the following:

chart.yAxis[0].axisTitle.attr({
        text: 'new title'
    });

like image 134
escouser Avatar answered Sep 12 '25 19:09

escouser