我想导出highcharts .
我发现 chart.exportChart
可以帮助我 .
它可以导出静态图表 .
但是,如果我使用它来导出动态图表,将导出图像并在控制台中打印 "highcharts.js:285 Uncaught TypeError: Cannot read property 'data' of undefined" .
谁能告诉我为什么?
这是导出动态图表的实验:http://jsfiddle.net/u02amghs/
如果单击“导出图表”,将在控制台中打印错误消息 .
1 回答
问题是您要为导出的图表添加点 . 导出图表时,会生成新图表( including
chart.events.load
回调),导出然后销毁 .setInterval
未清除,并且's why you see that error. And to answer your question, don' t在应导出图表时添加setInterval
:options.chart.forExport
是内部属性,仅在导出图表时设置 .