Hi,
How do I export chart to a pdf with A4 size?
I've read the chart's export documentation about width and height but there is no example given how to set it.
I tried to set width and height using code below but the output is still using original width and height.
function ExportPDF() {
var chart = document.getElementById('container').ej2_instances[0];
chart.export('PDF', 'MyChart', 'Landscape', [chart], 1754, 1240);
};
Hi Durga,
I've solved it but had to look at the source code and managed to set width/height using beforeExport function.
But as chart in the pdf is save as image, I end up using HtmlToPdfConverter as it save the chart in PDF as SVG.
Hope you can update your documentation about export function with example for the optional parameter without user having to look up the source code to figure it out.
Export.prototype.export = function (type, fileName, orientation, controls, width, height, isVertical, header, footer)