Highcharts:如何在图表创建后设置图例标签名称
Highcharts: how to set legend label name after chart created?
我需要动态更改图例标签,当我没有找到像chart.legend.setLabels()
这样的方法时,我很惊讶
I tried this
chart.legend.allItems[0].name = 'bla bla'
chart.legend.redraw()
没事发生
尝试更改选项
chart.options.legend.labels[0].name = 'bla bla'
chart.redraw()
没事发生
那么有办法改变传奇标签名称吗?
可以使用update()函数
chart.legend.allItems[0].update({name:'aaa'});
http://jsfiddle.net/bL5ZM/1/您也可以使用
chart.series[0].update({ name: "hello"});
http://jsfiddle.net/bL5ZM/149/相关文章:
- NodeJS错误-Can't在发送标头后设置标头
- 错误:Can't在从forEach循环发送标头后设置标头
- Express 4错误:Can't在发送标头后设置标头
- NodeJS未处理的拒绝错误:Can't在发送标头后设置标头
- Express&容器:Can't在发送标头后设置标头
- “发送后无法设置标头”和空发布请求正文
- 错误:Can't在发送标头后设置标头.node.js
- MEAN CRUD错误崩溃无法设置标头
- 错误:Can't在发送标头后设置标头
- 可以'在尝试使用chai请求代理为测试维护用户会话时,t在发送标头后设置标头出错
- Node.js,错误344,可以't在设置标头之后设置标头
- 在设置标头之前清空localStorage
- 节点.js错误:发送标头后无法设置标头,有时会出现
- 节点.js无法使用 res.json 设置标头错误
- 发送后无法设置标头
- 在 werkzeug-exception 上设置标头
- Angular js- 在ngResource中设置标头
- 路由错误:错误:发送标头后无法设置标头
- 仅在第一次请求后发送标头后无法设置标头
- 错误的原因可能是什么:发送标头后无法设置标头