更改HighCharts轴标题 [英] Change HighCharts axis title

查看:113
本文介绍了更改HighCharts轴标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我可以这样做:

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

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

(在图表初始化时已经设置了标题)。


 









chart.yAxis [0] .axisTitle.attr({
text:'new 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).

解决方案

Yes you can do this by using the following:

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

这篇关于更改HighCharts轴标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆