股票工具图表的“保存图表"按钮在Highcharts中不起作用 [英] save chart button of stock tool chart not working in highcharts
本文介绍了股票工具图表的“保存图表"按钮在Highcharts中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
单击股票工具图表的保存图表"按钮时,没有任何反应.如何运作?
On clicking save charts button of stock tool chart nothing happens. How does it work?
这是我的图表配置
this.trendChart.update({
series: {
showInNavigator: true,
dataGrouping: {
approximation: "average"
}
}
},
series: [{
id: 'series1',
}],
chart: {
spacingRight: 35
},
exporting: {
enabled: true,
buttons: {
contextButton: {
x: 0
}
}
},
stockTools: {
gui: {
enabled: true
}
},
});
我需要做任何配置更改吗?
Any config change I need to do?
推荐答案
该按钮使用 highcharts-chart
键将图表保存在localStorage中.例如,您可以在刷新浏览器后使用它保留一些绘制的注释.
The button save a chart in localStorage under highcharts-chart
key. You can for example use it to keep some drawn annotations after refresing a browser.
存储以下项目:
- 注释
- 指标(带有yAxes)
- 标志
您可以通过以下方式获取选项:
You can get the options in the following way:
const savedOptions = localStorage.getItem(['highcharts-chart']);
实时演示: https://jsfiddle.net/BlackLabel/u6Lte04d/
API参考: https://api.highcharts.com/class-reference/Highcharts#.merge%3CT%3E
这篇关于股票工具图表的“保存图表"按钮在Highcharts中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文