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

Offline PDF export always renders annotations strokes as thick grey lines #20002

Closed
ransoing opened this issue Oct 25, 2023 · 3 comments · Fixed by #20108
Closed

Offline PDF export always renders annotations strokes as thick grey lines #20002

ransoing opened this issue Oct 25, 2023 · 3 comments · Fixed by #20108

Comments

@ransoing
Copy link

Expected behaviour

Offline PDF export should render the plot as it looks on the webpage.

Actual behaviour

Annotation strokes are always rendered as thick grey lines in the PDF offline export.

Live demo with steps to reproduce

https://jsfiddle.net/k7q4ou6y/
Use the chart menu to export as PDF

Product version

Latest at the time of this ticket
v11.1.0 (2023-06-05)

Affected browser(s)

Chrome, Firefox, likely others

@highsoft-bot highsoft-bot added this to To do in Development-Flow via automation Oct 25, 2023
@karolkolodziej
Copy link
Contributor

Hi @ransoing!

I'm not sure if this should be classified as a bug. If you take a look at the console there are warnings about the attributes that are not allowed. When added, everything works as expected- demo.

@ransoing
Copy link
Author

@karolkolodziej thanks for the fix. I'm able to get my application working properly.

This feels like a bug since all other exporting options work as expected when the AST statements are not present (server exporting for PNG, SVG, and PDF, as well as offline exporting for PNG and SVG).

When clicking the link in the console warning, it says:

This error occurs if HTML in the chart configuration contains unknown tag names or attributes.

The tag names and attributes in question are added by highcharts code (or by libraries imported by highcharts), as triggered by expected values in the chart config. Would this be a valid reason to add them to the "allow lists" by default? The point of the warning is to stop potentially malicious behavior, but it's not malicious to build a simple chart config that conforms to the published documentation.

@karolkolodziej
Copy link
Contributor

I'm glad that everything works now!

Thank you for sharing this, you are actually right- this should be treated as a bug. 😉

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

Successfully merging a pull request may close this issue.

4 participants