ZingChart: Exporting Multiple Charts to a PDF
Multiple charts pdf demo
In ZingChart you can export multiple charts in a page to a single PDF using the following code:
var myConfigBar = { type: 'bar', series: [ { values: [35,42,67,89,25,34,67,85] } ] }; var myConfigLine = { type: 'line', series: [ { values: [45,42,4,89,25,34,67,35] } ] }; var count = 0; zingchart.load = function(p) { count++; if (count === 2) { zingchart.exec('myChartBar', 'exportimage', { download: true, format: 'pdf', uid: 'myexport', page: '1/2' }); zingchart.exec('myChartLine', 'exportimage', { download: true, format: 'pdf', uid: 'myexport', page: '2/2' }); } } zingchart.render({ id: 'myChartBar', data: myConfigBar, height: 500, width: 500 }); zingchart.render({ id: 'myChartLine', data: myConfigLine, height: 500, width: 500 });