Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 11781: save svg image with toolbox #12144

merged 3 commits into from Feb 14, 2020

Fix 11781: save svg image with toolbox #12144

merged 3 commits into from Feb 14, 2020


Copy link

@Ovilia Ovilia commented Feb 13, 2020

Brief Information

This pull request is in the type of:

  • bug fixing
  • new feature
  • others

What does this PR do?

To support saving SVG images with toolbox. Also works for connected charts.

Fixed issues


Before: What was the problem?

  1. Default suffix of the downloaded file with SVG charts was .png if saveAsImage.type is not set manually, which should be .svg because the downloaded file is an SVG file.
  2. The downloaded SVG has an error in it and cannot be opened even after changing the file suffix to be .svg
  3. It didn't work for connected charts.

After: How is it fixed in this PR?

  1. The default suffix is .svg if the chart renderer is 'svg'.
  2. No error after the fix.
  3. It works for connected charts now and the background is set to be connectedBackgroundColor, which is the same as Canvas behavior.


Are there any API changes?

  • The API has been changed.

Related test cases or examples to use the new APIs

Test case: toolbox-saveImage-background-svg.html

The saved SVG file should look the same as the charts.


Merging options

  • Please squash the commits into a single one when merge.

Other information

Copy link

echarts-bot bot commented Feb 13, 2020

Thanks for your contribution!
The community will review it ASAP. In the meanwhile, please checkout the coding standard and Wiki about How to make a pull request.

The pull request is marked to be PR: author is committer because you are a committer of this project.

@Ovilia Ovilia merged commit 8028f41 into master Feb 14, 2020
Copy link

echarts-bot bot commented Feb 14, 2020

Congratulations! Your PR has been merged. Thanks for your contribution! 👍

@Ovilia Ovilia deleted the fix-11781 branch Feb 14, 2020
@Ovilia Ovilia added this to the 4.8.0 milestone Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants