Skip to content

Wrongly positioned shadows while using the offline export. #17170

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

Closed
karolkolodziej opened this issue Apr 8, 2022 · 2 comments · Fixed by #19131
Closed

Wrongly positioned shadows while using the offline export. #17170

karolkolodziej opened this issue Apr 8, 2022 · 2 comments · Fixed by #19131

Comments

@karolkolodziej
Copy link
Contributor

Expected behaviour

Properly position the shadows while using offline exporting.

Actual behaviour

After exporting the chart to PDF via offline exporting, dataLabels are shifted and shadows are incorrectly positioned.

Live demo with steps to reproduce

Export the chart to PDF and compare the result with the chart.
https://jsfiddle.net/BlackLabel/23ks15d0/

Workaround (disabling the shadows): https://jsfiddle.net/BlackLabel/jtr6382u/

Product version

Highcharts JS v10.0.0 (2022-03-07)

Affected browser(s)

All

@TorsteinHonsi
Copy link
Collaborator

TorsteinHonsi commented Apr 8, 2022

Here's the issue broken down to svg2pdf: Svg2pdf Playground.

As we see, in the browser implementations of SVG, the absolutely positioned tspan with x and y coordinates and a zero width space causes the text cursor to be reset to the beginning of the text element, causing subsequent text to be laid out on top of the existing text. The svg2pdf implementation fails to reset the cursor position.

Another, not so severe problem is that it also fails to render the ​ character, which may be because of missing support in the PDF built-in font files.

@karolkolodziej
Copy link
Contributor Author

The issue has already been reported here.

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

Successfully merging a pull request may close this issue.

3 participants