-
Notifications
You must be signed in to change notification settings - Fork 395
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
Remove download svg option due to highcharts limitations #1498
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1498 +/- ##
==========================================
- Coverage 89.91% 87.57% -2.35%
==========================================
Files 90 110 +20
Lines 3848 5093 +1245
==========================================
+ Hits 3460 4460 +1000
- Misses 388 633 +245
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
1 similar comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great find! Is this a known bug in highcharts? If not, should we file it?
No objection to your change, of course!
@romanlutz Yes! We have filed a bug to highcharts: highcharts/highcharts#17390 |
A workaround: https://jsfiddle.net/oysteinmoseng/yezu6nx3/ |
This PR removes "Download svg vector image" option from highchart exporting menu list.


The issue is, downloaded svg is corrupt and can't view it.
The root cause is, we adds the highcharts accessibility module to the imported Highcharts namespace by
Accessibility.default(Highcharts);
. And this module adds a div element to the svg file that we are trying to download (see the red underline in screenshot below). So the svg file fails to be rendered. If we removeAccessibility.default(Highcharts);
, then the svg element can be rendered in browser. But we want to enable accessibility for highcharts. So we remove "Download svg vector image" option from highchart exporting menu list.The default exporting menu list is ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadPDF", "downloadSVG"], we remove the "downloadSVG", so this PR specify menuItems to be ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadPDF"].
Description
Before:

After:

Checklist