wiola111
Posts: 23
Joined: Mon Dec 12, 2016 2:04 pm

export multiple charts at once

Is it possible to export multiple charts at once e.g I have 4 charts and want all of them to be exported as JPG or PNG to one single file ? I'm using Highcharts Client-Side Export Module to export them individually into separate files now but I want to be able to combine those files.
stpoa

Re: export multiple charts at once

Hi,

From docs:
Currently this isn't implemented in the core, but there are a couple of paths you can go to achieve this.

Use our hack for exporting multiple charts. Basically, this code gets the SVG of all charts, modifies it and applies it to one single SVG file that is sent to the server for image conversion. We also support using our client side exporting module, if sending data to our server is a concern. See this demo for an example of this approach.
Create a HTML file on your server that contains all your desired charts, and do a pure server side conversion of this. See Can I generate charts on the server without using a browser?
http://www.highcharts.com/docs/getting- ... t-multiple

Live example:
http://jsfiddle.net/gh/get/jquery/1.7.2 ... s-offline/

Regards.
anaxjk
Posts: 37
Joined: Thu Nov 10, 2016 2:59 pm

Re: export multiple charts at once

Hi all,

the local exporting of multiple Charts works fine, thanks :D

But, can i export all my charts side by side in one single png File? At the moment all Charts where put among eych other.

Thanks alot!
daniel_s
Posts: 773
Joined: Fri Sep 01, 2017 11:01 am

Re: export multiple charts at once

hi anaxjk,

It could be done exactly with the same way like stpoa presented before. If you still need to implement that, you should use exporting hack, which is posted above (JSFiddle live working copy). If there are any problems, please send me live working copy of your project (file, url, JSFiddle).

Best regards!
Daniel Studencki,
Highcharts Developer
cascone.daniele
Posts: 2
Joined: Fri Apr 30, 2021 10:07 am

Re: export multiple charts at once

Hi

I tryed to use this code to export multiple organization charts.
There is an issue starting from the second one. All the boxex are plotted without text inside.
The text is html formatted.

Setting exporting: { allowHTML: false } the text is present but in a really messy way, it has a blank border and is all on the same line.

Can you please help me?
thanks
dominik.c
Posts: 2081
Joined: Fri Aug 07, 2020 7:07 am

Re: export multiple charts at once

Hello cascone.daniele!

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

It is hard to tell you what could be done without taking look at your code. Could you reproduce the issue in an online editor that I could work on? I would appreciate it a lot. :)

You can find a basic template here: https://jsfiddle.net/BlackLabel/0pbeym97/

Best regards!
Dominik Chudy
Highcharts Developer
cascone.daniele
Posts: 2
Joined: Fri Apr 30, 2021 10:07 am

Re: export multiple charts at once

hi
hoping I'm doing well as it's my first time using sfiddle...

https://jsfiddle.net/q7nzy1po/1/

as you can see where I try to print the 2 charts, in the result image the second chart is with no labels

thanks
piotr.m
Posts: 1433
Joined: Mon Nov 18, 2019 8:15 am

Re: export multiple charts at once

Hi cascone.daniele,

You can remove allowHTML then you will be able to export it correctly:
https://jsfiddle.net/BlackLabel/4a3y9hvc/

The problem starts when we style from HTML elements, it is quite complicated to describe as there is a problem with the positioning of these dataLabels. Generally, it is related to the configuration of an export-server that has not been adapted to exporting several graphs at once.

Here you can find a demo that avoids this problem by setting the width and height appropriately: https://jsfiddle.net/BlackLabel/gLty4rfq/

To solve this problem you would need your own custom configuration:
https://www.highcharts.com/docs/extendi ... highcharts

Kind Regards

Return to “Highcharts Usage”