Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to access the Highcharts object to set dateFormats or load plugins? #54

Closed
kryft opened this issue Jun 6, 2017 · 5 comments · Fixed by #338
Closed

Is it possible to access the Highcharts object to set dateFormats or load plugins? #54

kryft opened this issue Jun 6, 2017 · 5 comments · Fixed by #338
Assignees

Comments

@kryft
Copy link

kryft commented Jun 6, 2017

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?

@TorsteinHonsi
Copy link
Contributor

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?

@cvasseng
Copy link
Contributor

cvasseng commented Jun 9, 2017

The customCode body argument runs prior to initializing the chart, so that would be a good bet.

@kryft
Copy link
Author

kryft commented Jun 9, 2017

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?

@jb3-2
Copy link

jb3-2 commented Aug 24, 2017

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

@PaulDalek PaulDalek self-assigned this May 19, 2022
@PaulDalek PaulDalek linked a pull request May 20, 2022 that will close this issue
@PaulDalek
Copy link
Contributor

Closed by the #338.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants