Exporting multiple charts on a client side
This is a highly needed feature, for example, if you're developing a sales dashboard that is used for displaying multiple charts on a single page. Currently Highcharts does support exporting multiple charts but only to an external server. There are some hacks found from the Internet but I would really like to use an official solution.
We now support using the functions in the offline-download module to build your own SVG composition before downloading, which allows for exporting multiple charts at once.
Demo of exporting dashboard: http://jsfiddle.net/highcharts/eatqca8n/
-
Anonymous commented
When I export all charts to PDF, it does download the char.pdf file but also refresh the page, how would I stop refreshing page after execution of exportChart function?
-
We do not support PDF download on client side at the moment. We've been looking for a library to use for this, but haven't found a good one that converts to vectorized PDF yet.
-
We do not support PDF download on client side at the moment. We've been looking for a library to use for this, but haven't found a good one that converts to vectorized PDF yet.
-
Anonymous commented
Hi, I have a question on same topic. http://jsfiddle.net/highcharts/eatqca8n/ . In this can I download PDF?? Does it support pdf generation on client side?
-
ChartHeaven: Yes, just by playing around with the SVG before exporting it (using the transforms). If the charts all have the same height/width you could do something like this: http://jsfiddle.net/w6o3uvkd/
-
ChartHeaven commented
Thank you guys for this support. Is it possible to get this working with different layouts so that it will export it, for example, with a 2 X 2 layout?
-
Thanks for your suggestion! It looks like we need to do some modifications to the offline-exporting module in order to provide a hook for this.
Regarding PDF, the offline download module doesn't currently support it, because we haven't found a JS library that can take SVG and convert it to vectorized PDF. A library called jspdf can produce rasterized PDF, but then you may just as well use PNG images.