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

Exported file should use the chart title for filename, as done in Highcharts export-csv module #5

Closed
wwuck opened this issue Jul 7, 2015 · 3 comments

Comments

@wwuck
Copy link
Contributor

wwuck commented Jul 7, 2015

https://github.com/highslide-software/export-csv/blob/master/export-csv.js#L185
https://github.com/highslide-software/export-csv/blob/master/export-csv.js#L194

The exported file should do what the export-csv plugin does and use the chart title as the downloaded filename, defaulting back to the existing 'chart' string if no title exists.

@A----
Copy link
Owner

A---- commented Jul 7, 2015

Sorry but that won't happen or at least that way. The documentation for the HighCharts export plugin (PNG/…) states that default filename is “chart” without the extension:
http://api.highcharts.com/highcharts#exporting.filename

export-csv in the other, while done by the same guys is clearly unofficial and patched in under a unified API.

What I can do though is extend the actual API by allowing functions to be used for this configuration option, and expose one so that's easy to achieve. You could actually define it globally.

@wwuck
Copy link
Contributor Author

wwuck commented Jul 7, 2015

Extending the API would be nice in the long term. I didn't realise the official API defined "chart" as the default.

@A----
Copy link
Owner

A---- commented Jul 7, 2015

I did what I said. Documentation has also been updated.
Check out the website which does use the constant.

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

No branches or pull requests

2 participants