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

Highcharts 4.2.6 SVG is breaking exporting #5590

Closed
shirgoldbird opened this issue Aug 16, 2016 · 5 comments
Closed

Highcharts 4.2.6 SVG is breaking exporting #5590

shirgoldbird opened this issue Aug 16, 2016 · 5 comments
Assignees
Milestone

Comments

@shirgoldbird
Copy link

Expected behaviour

When exporting a graph to PNG or JPG using our personal PHP/Batik server, the graph should export.

Actual behaviour

No errors are thrown, but a completely empty image (no data) is returned.

Live demo with steps to reproduce

Something between 4.2.5 and 4.2.6 has changed such that graphs exported from 4.2.6 now contain SVG that causes Batik to silently fail when rasterizing the SVG, likely the same issue as described here. I've attached a zip file containing the same graph, exported to SVG from both 4.2.5 and 4.2.6.

The line causing it to fail in 4.2.6 is:
<g class="highcharts-tooltip" style="cursor:default;padding:0;pointer-events:none;white-space:nowrap;" transform="translate(0,-9000000000)"

Compared to 4.2.5, which works fine:
<g class="highcharts-tooltip" style="cursor:default;padding:0;pointer-events:none;white-space:nowrap;" transform="translate(0,-9999)"

Highcharts exports.zip

Affected browser(s)

All

@TorsteinHonsi
Copy link
Collaborator

@oysteinmoseng Another case related to the tooltip hiding.

@TorsteinHonsi TorsteinHonsi added this to the 4.2.7 milestone Aug 17, 2016
@oysteinmoseng
Copy link
Member

Same cause as in #5570

@aadrian
Copy link

aadrian commented Sep 9, 2016

Any idea when 4.2.7 will be released? this export bug is pretty breaking :( .

Thank you.

@TorsteinHonsi
Copy link
Collaborator

We will start regression testing 4.2.7 next week, so you can expect a release in one or two weeks.

Until then, here's a drop-in fix for v4.2.6:

// Workaround for #5590
Highcharts.wrap(Highcharts.Chart.prototype, 'sanitizeSVG', function (proceed, svg) {
    return proceed.call(this, svg)
        .replace('-9000000000', '-9999');
});

View live demo.

@aadrian
Copy link

aadrian commented Sep 9, 2016

Until then, here's a drop-in fix for v4.2.6 ...

Wow ! Thank you :) !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants