Open
Description
What problem does this feature solve?
The current saveAsImage function in Apache ECharts allows users to download charts as images, but the dimensions are based on the chart's display size in the browser. This can lead to suboptimal image quality, especially on different screen resolutions.
I propose adding options to specify the width and height for the downloaded image. This would ensure images are always in an optimal format for printing or sharing.
Benefits:
- More control over image quality and dimensions.
- Consistent representation of charts regardless of display size.
- Enhanced usability for presentations and reports.
What does the proposed API look like?
Example Usage:
saveAsImage({ type: 'png', // Image type width: 800, // Desired width pixelRatio: 1 // Image resolution });