-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I'm using ZK Charts 2.0.0.1 & ZK 8.0.0-RC and I want to export a chart. There is a button for exporting, which is working if you click it manually.
But I want to trigger the button and export a PNG with java code. I got multiple charts and I want to create a "export all" button.
So it is possible to export a chart with java code?
Hi,
it is possible to get JSON from your chart series (and options etc.)
for (int i = 0; i < chart.getSeriesSize(); i++) {
series += chart.getSeries(i).toJSONString() + ",";
}
With this data you can send a POST Request to an export server. To get a PDF you have to set the return type parameter to 'application/pdf'
You can try your JSON here => http://export.highcharts.com/demo
Asked: 2015-08-05 08:16:30 +0800
Seen: 35 times
Last updated: Aug 25 '16
I found
http://export.highcharts.com/demo
I'll try to replicate the POST and let you know if its working :)
IngoB ( 2015-08-05 10:03:38 +0800 )editIt is working. It's possible to send a JSON String and get an image back.
IngoB ( 2015-08-06 12:11:26 +0800 )edit