regimani
Posts: 3
Joined: Wed Sep 21, 2022 7:42 am

How to export full chart data (including hidden series)?

Suppose we temporarily hide some series in the chart by clicking on the legend and then use the data export/download options, it exports only the visible data. Is there a way to export/download full chart data?
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: How to export full chart data (including hidden series)?

Hello there,

Welcome to our forum and thank you for contacting us with your question!

In your JavaScript config, you can use the exporting.chartOptions property. That way, everything thats declared inside this property will reflect on your exported chart.
In this case, I have looped through all of the series, and set them visible for exporting. Take a look at the demo below:
DEMO: https://jsfiddle.net/BlackLabel/xgn2s5d0/
API Reference: https://api.highcharts.com/highcharts/e ... artOptions

Do not hesitate to contact us with any further requests,
Best regards!
Kamil Musiałowski
Highcharts Developer
regimani
Posts: 3
Joined: Wed Sep 21, 2022 7:42 am

Re: How to export full chart data (including hidden series)?

Thanks for the details.

But I clicked on the "Sales & Distribution" series legend item, that is hidden from the graph and then if clicked on the "Download CSV" option. It is not exporting the "Sales & Distribution" series values. It is exporting only the visible series. is it possible to export all series in the graph irrespective of their visibility?
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: How to export full chart data (including hidden series)?

Hi,

I'm sorry, somehow I have assumed that you are asking about exporting to PNG and not checked the CSV.
What you have observed is a default behavior of the CSV export plugin, to change it, you'll need to change one line in the whole functionality.
Take a look at the Stack Overflow topic here: https://stackoverflow.com/questions/368 ... highcharts

If you will need further assistance, please do not hesitate to ask,
Regards
Kamil Musiałowski
Highcharts Developer
regimani
Posts: 3
Joined: Wed Sep 21, 2022 7:42 am

Re: How to export full chart data (including hidden series)?

Thanks for the updates. Is it possible to make this update to the library file if it is installed and deployed using NPM on target environment?
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: How to export full chart data (including hidden series)?

Sure thing, everything should work perfectly fine. Wrapping the function remains the same , for npm installed packages, as in the topic mentioned above.

Let me know once you need anything else, or encounter any issues while implementing that,
Best regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Usage”