roxen
Posts: 2
Joined: Fri Jan 17, 2025 11:56 am

Export chart as PNG in NextJS

Hi all!

I have been struggling for a while with issue. I would like to make my highcharts graphs downloadable through an external button in my NextJS v13.5 app. I tried many different approaches, but it seems that the main issue is loading the 'highcharts/modules/exporting' module (actually, exporting modules in general because I didn't manage loading the Accessibility module either).

Thus, how should I load the Highcharts modules in my app? I tried importing them normally and imported them dynamically disabling the server-side rendering.

Thank you!
andrzej.b
Site Moderator
Posts: 576
Joined: Mon Jul 15, 2024 12:34 pm

Re: Export chart as PNG in NextJS

Hi,

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

If you are using Highcharts version lower than v12, this demo should guide you well, export module is imported properly and works as expected: https://stackblitz.com/edit/stackblitz- ... eChart.jsx

If you are using v12, you can check the discussion in the post from this week: viewtopic.php?p=196160#p196160

Feel free to reach out if you have any further questions.

Kind regards,
Andrzej
Highcharts Developer
roxen
Posts: 2
Joined: Fri Jan 17, 2025 11:56 am

Re: Export chart as PNG in NextJS

Thank you very much Andrzej! Thanks to your answer I managed solving my issue!

Return to “Highcharts Usage”