Home forums Feature Requests & Feedback Export Chart as Image/Get chart data as Base64 format

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

    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

    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

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

    Thanks,
    Sathya

    #11468

    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

    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?

    #30975

    Hello, Vishwas!
    Is this possible to get base64 image from stockchart?
    My stockchart has multiple charts.

    • This reply was modified 2 months, 3 weeks ago by sunrise.
    #30981

    @sunrise,

    You can use html2canvas to achieve your requirement. Please take a look at this JSFiddle for same.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.