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 5 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11455

    sathya
    Member

    Hi Team,
    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?

    Thanks,
    Sathya S

    #11465

    Vishwas R
    Keymaster

    Sathya,

    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.

    CanvasJS Export as Image

    #11466

    sathya
    Member

    Vishwas,
    How to change the download location and image name?

    Thanks,
    Sathya

    #11468

    Vishwas R
    Keymaster

    Sathya,

    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.

    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.

    #11469

    sathya
    Member

    Vishwas,
    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?

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.