Home › forums › Using CanvasJS › User-defined chart export size
Tagged: export, resize
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.
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.
You must be logged in to reply to this topic.