echarts [Feature] - Implement a way for multiple options to export reports

wvmv3b1j  于 4个月前  发布在  Echarts
关注(0)|答案(3)|浏览(40)

What problem does this feature solve?

Hi,
Like Highcharts, I would like to have a way to provide a user a list of options to export the charts, like PNG, SVG or PDF.

Im testing to do this setting dynamically the export option, but when I click on button to export my chart is empty.

What does the proposed API look like?

It would be great to have this feature implemented. As I mentioned, Highcharts brings this as default feature (you just need to pass true/false if you want to display the feature inside the chart area)

pieyvz9o

pieyvz9o1#

options to export the charts, like PNG, SVG or PDF

  1. for PNG, SVG export use toolbox.feature.saveAsImage
  2. for PDF see Programmatically exporting SVG rendered chart to PDF #16098, their demo is working.
    Also getDataURL
9gm1akwq

9gm1akwq2#

@helgasoft

It's possible, for example, to have 3 buttons, each one to export in a specific format?

Reading the docs, I realize that the chart can only be rendered in a single format, PDF, PNG or SVG.

sbtkgmzw

sbtkgmzw3#

Two buttons at the most, for instance SVG + PDF, from what I read in the demo above, since PDF can be built from SVG.
One has to choose to create the chart in canvas or svg format (see here ), therefore we cannot have saveAsImage PNG and SVG export simultaneously.

相关问题