获取错误'无法读取属性'文档'未定义的'在导入exporting.js时(导出高图表)
Getting error 'Cannot read property 'document' of undefined' while importing exporting.js (to export highchart charts)
我正在尝试将高图表导出到PDF文件中。为此,我已经读到我应该使用exporting.js(以及其他库)。但是当我导入这个库(exporting.js)时,我会收到这样的错误:"无法读取未定义的属性"document"。"。
我从javascript:导入
var newscript = document.createElement('script');
newscript.type = 'text/javascript';
newscript.async = true;
newscript.src = '/resources/tda-ga/js/charts/lib/exporting.js';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(newscript);
我将感谢任何帮助!
请验证您是否拥有相同版本的exporting.js和highcharts.js模块。看起来你指的是最新的exporting.js,而不是最新的highcharts.js.
相关文章:
- 可以't让我的if语句处理js中的html表单输入
- 使用agility.js进行页面布局和合成
- 使用Clipboard.js复制span文本
- 使用JS如何动态更改显示的html文件中的文本背景颜色
- 强制模板刷新ember.js
- 如何编写HTML输入的JS内联
- Angular JS IE9 Hashbang url rewriting
- 使用JS将数组转换为json对象
- Node.js v6.2.0类扩展不是函数错误
- 当js函数's已执行
- 要求未定义JS回调参数
- 在自定义mean.io包中使用angular-chart.js作为依赖项
- 无法在数据endVal中设置值=“”;{{ucount}}”;使用Angular JS的CountUp
- 如何从Java/scala调用js美化程序
- 如何更改<svg>标记为<img>用js标记
- 如何使用 node.js 比较两个 json 数组
- chrome扩展:尽管运行了at:documentidle,js脚本还是过早启动
- 节点Js:How to catch a“;没有这样的文件或目录“;读取线模块出错
- Selectize.js:如何对整数值的选项进行排序
- 获取错误'无法读取属性'文档'未定义的'在导入exporting.js时(导出高图表)