Server-Side HighStock charts generation with NodeJS

放肆的年华 提交于 2019-12-03 03:18:06

That can be fixed by raising the "forExport" flag in options object:

options.chart.forExport = true;

I tried to recreate your example and I get jQuery and Highcharts loaded with jsdom. It looks like Highcharts tries to call createElement with an html fragment:

createElement('<div filled="f" stroked="f" style="position: absolute;left:0;top:0;width:10px;height:10px;"/>')

This looks fishy. I'm not sure how it works in the browser - I can't call createElement with that in my browser either (Chromium).

FtLie

I replaced node.js with phantomJs which did a good job, as described in Generating HTML Canvas image data server-side? (example is from jQplot, but works for highchart as well.)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!