score:1

Okay, I got it working.

First adding allowCodeExecution helped. But then once I started debugging the highcharts-export-server code in node, I found that there was an exception being thrown by phantomjs when evaluating (by way of injectJs) within highcharts-regression.js.

That module uses for (let i=.... Turns out the let keyword is not supported by phantomjs. This was only used on one line in the whole module, so I created a local copy and edited it to for (var i=... and that fixed that problem.

Now I'm getting my trend line.

But then I also have a "sma" series on the same chart. So I had to edit the node_modules/highcharts-export-server/build.js file and add stock/{{version}}/indicators/indicators.js as a cdnAdditional entry. If you google how to add extra highcharts modules you will find details on how to do this -- on their forum. Basically you edit build.js then run node build.js from the root of where you have the highcharts-export-server installed by npm (or where you cloned it).

Note that the resources.files property wants a string of well formed JSON. It needs to be a comma separated list of filesystem paths or URIs (that start with http). This property does not want an array of strings. Just a singe string.


Related Query

More Query from same tag