Closed kryft closed 2 years ago
In http://export.highcharts.com/, you would put the custom code in the "JavaScript" textarea at the bottom. The callback
options runs too late.
@cvasseng What server argument does this translate to?
The customCode
body argument runs prior to initializing the chart, so that would be a good bet.
The description for customCode
says
When dataOptions is supplied, this is a function to be called with the after applying the data options. Its only argument is the complete options object which will be passed to the Highcharts constructor on return.
I don't really understand what dataOptions
does (I couldn't find API documentation on Highcharts.data()
), but it sounds like the customCode
callback might not get called if dataOptions
hasn't been supplied.
According to the description, the customCode
callback would get the options object as an argument. How would it get access to the Highcharts(/Highstock) object itself?
Hi, if it's of any help, in my node code I add a function that accesses the Highcharts object before rendering the chart. That works for me. See here (line 89): https://github.com/statabs-test/indikatoren/blob/434316b638cbb253f733d2192808305bb80b5d58/build/exportChartImages.js#L89
Closed by the https://github.com/highcharts/node-export-server/pull/338.
We would like to use a custom date format as demonstrated in http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/global/dateformats/
Is this possible when exporting a chart with node-export-server? Can we access the Highcharts object somehow in the callback provided via the callback option?