Exporting a Chart - Steema/TeeChartJS GitHub Wiki
Exporting a Chart
To obtain a PNG or JPEG image from a chart, you can use the canvas toDataURL
method, or the included toImage
function.
Chart1.toImage( “img” ); // fills <img id=”img”> element with chart as PNG image.
Chart1.toImage( “img” , “jpg”, 90 ); // fills image with a jpeg image with 90% compression