neerajmendhe
Posts: 3
Joined: Wed Sep 20, 2023 12:52 pm

Not Exporting Charts available when Scroll

Wed Sep 20, 2023 1:17 pm

Hey there,

I really appreciate the efforts and community responses that we get for this product so that we utilize it to its full potential.

I have a use case to export these reference chart for eg. https://jsfiddle.net/gh/get/library/pur ... crollbars/

I above jsfiddle whenever i zoom it to the level where I get to see data for each day ie. for all 30 days instances on x-axis and try to export, it exports only visible area.

My requirement is that it should export all the instances which are available when scrolled.

Request you to please help me on this.

Thanks in Advance
Neeraj

jakub.j
Posts: 887
Joined: Tue Jan 24, 2023 11:14 am

Re: Not Exporting Charts available when Scroll

Wed Sep 20, 2023 2:13 pm

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

To show all the available data on chart export, you ned to use exporting.chartOptions and set xAxis.min, xAxis.max and xAxis.minRange and the same for the yAxis. See demo below:

Demo: https://jsfiddle.net/BlackLabel/waxe35h7/

Feel free to ask any further questions!
Best regards
Jakub
Jakub
Highcharts Developer

neerajmendhe
Posts: 3
Joined: Wed Sep 20, 2023 12:52 pm

Re: Not Exporting Charts available when Scroll

Thu Sep 21, 2023 8:34 am

Hey jakub,

Thank you for your prompt response, the solution that you mentioned was pretty much closer to what i am expecting though have few challenge to this requirement.

Export from current solution -->
Image

Expected Solution -->
Image

could you please help me on this.

Thanks in Advance
Neeraj
Attachments
Picture1.jpg
Expected Image
Picture1.jpg (40.85 KiB) Viewed 60 times
temperature-by-the-hour (11).png
Current Solution provided
temperature-by-the-hour (11).png (32.99 KiB) Viewed 60 times

jakub.j
Posts: 887
Joined: Tue Jan 24, 2023 11:14 am

Re: Not Exporting Charts available when Scroll

Thu Sep 21, 2023 10:38 am

Hey,
You're welcome!

From the screenshot, I saw that you want the chart to be wider and not to reset yAxis extremes, so I set exporting.sourceWidth and removed the yAxis configuration from exporting.chartOptions. You can also set exporting.sourceHeight if you want to control the height of the exported chart.

Demo: https://jsfiddle.net/BlackLabel/61jmcazp/

If that's not what you mean, please specify how exactly do you want the chart to be when exported.

Let me know if that was what you were looking for!
Kind regards
Jakub
Jakub
Highcharts Developer

neerajmendhe
Posts: 3
Joined: Wed Sep 20, 2023 12:52 pm

Re: Not Exporting Charts available when Scroll

Thu Sep 21, 2023 12:37 pm

Hey Jakub.J

I would like to thank you for quick help you provided.

The combined solution worked for me by setting values for xAxis.min, xAxis.max and xAxis.minRange and the same for the yAxis along with sourceWidth.

Thanks and Regards
Neeraj Mendhe

Return to “Highcharts Usage”