Home forums Using CanvasJS User-defined chart export size

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Vishwas R 3 weeks, 5 days ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20461

    Is it possible to export a larger or smaller chart image than whatever I’m displaying to the user? I’m working on an app where some CanvasJS charts scale based on the size of the user’s window, but this causes the chart images they export to potentially vary dramatically in size; they shouldn’t have to resize their browser window to change how big the export images are. One potential workaround I thought of was to create and render a temporary chart with the same options (based on the jsFiddle in this thread: https://canvasjs.com/forums/topic/clone-chart-to-popup-modal-on-button-click/), which I could export from instead of the actual chart. I’d like to avoid using such a workaround if there’s a way to do this natively, though.

    #20462

    Vishwas R
    Keymaster

    @invisiblesandwich,

    You can scale-up or scale-down the chart before exporting using exportChart method and reset it back soon after exporting. Please take a look at this jsfiddle.


    Vishwas R
    Team CanvasJS

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

You must be logged in to reply to this topic.