Home › forums › Feature Requests & Feedback › Export Chart as Image/Get chart data as Base64 format
This topic contains 4 replies, has 2 voices, and was last updated by sathya 2 years, 4 months ago.
1)Is it possible to automatically save the chart as image in specified folder after chart has been rendered?.In this case,chart should be download without user Interaction. Can I use “ExportEnabled=true” option?.
1)Is is possible to get the chart data in base64 format?
You can use toDataURL to export chart with the help of initMouseEvent. Here is an example.
Or you can perform same by setting exportEnabled to true and auto-clicking the link of format of image you like to save as shown in this example. In both the cases, images will in base64 format.
How to change the download location and image name?
You can change save.download = 'CanvasJS.png'; in first example to your desired name. Here CanvasJS.png is the image-file name. And in the second example, you can use exportFileName to set image-file name.
save.download = 'CanvasJS.png';
Download location setting is a part of browser setting, it varies from browser-to-browser. You can change it under browser settings. Check these links to change/manage download location in chrome and Firefox.
In my project I have to save the chart image in specified folder.Eg:”C:\\MyProject\UserDocuments\Chart1.png. Is there is any option to achieve this?
You must be logged in to reply to this topic.