You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We enabled the Highcharts export menu. When a user selects the "Print" option, Vaadin/Highcharts hides everything but that chart and then triggers browser print.
The Vaadin code in vaadin-chart-mixin.js among other actions adds a style class to the body element if this.chart.styledMode is true. However, I can see from the debugger that my Flow code is properly sending false for that attribute in the JSON for the chart. Somehow the mixin is still seeing true and setting the body style, which then breaks our chart representation, and the print preview is wrong.
That code was from the admittedly "quick and dirty" fix way back for #389. As Highcharts has been updated to a newer major version since then, that issue may no longer exist and that fix may not be needed.
The only place I can see so far that might be related is line 323 in the mixin, the constructor method. That sets the flag to true. The Flow config class defaults to Boolean.FALSE so that's a mismatch, but I still don't see how it could end up true when I'm passing false from the Flow side.
Haven't got a sample project working yet.
Expected outcome
Chart printing should look just like chart display. Body CSS classes should not change.
Minimal reproducible example
working on it, hitting some sort of browser issue thinking the ChartObject isn't defined.
Steps to reproduce
Enable the offline-export Highcharts module
style a chart with attributes, not CSS
try printing the chart, and notice some attributes are overridden by styling.
Our example uses vertical grid lines on the x axis. Vaadin has a CSS class that only applies when the styled classname is applied that hides those. When printing, that style becomes active and overrides our grid line definition.
Environment
Vaadin version(s): 24.6.5
OS: N/A
Browsers
No response
The text was updated successfully, but these errors were encountered:
Description
We enabled the Highcharts export menu. When a user selects the "Print" option, Vaadin/Highcharts hides everything but that chart and then triggers browser print.
The Vaadin code in
vaadin-chart-mixin.js
among other actions adds a style class to the body element ifthis.chart.styledMode
is true. However, I can see from the debugger that my Flow code is properly sendingfalse
for that attribute in the JSON for the chart. Somehow the mixin is still seeingtrue
and setting the body style, which then breaks our chart representation, and the print preview is wrong.That code was from the admittedly "quick and dirty" fix way back for #389. As Highcharts has been updated to a newer major version since then, that issue may no longer exist and that fix may not be needed.
The only place I can see so far that might be related is line 323 in the mixin, the constructor method. That sets the flag to
true
. The Flow config class defaults toBoolean.FALSE
so that's a mismatch, but I still don't see how it could end up true when I'm passing false from the Flow side.Haven't got a sample project working yet.
Expected outcome
Chart printing should look just like chart display. Body CSS classes should not change.
Minimal reproducible example
working on it, hitting some sort of browser issue thinking the ChartObject isn't defined.
Steps to reproduce
Enable the offline-export Highcharts module
style a chart with attributes, not CSS
try printing the chart, and notice some attributes are overridden by styling.
Our example uses vertical grid lines on the x axis. Vaadin has a CSS class that only applies when the styled classname is applied that hides those. When printing, that style becomes active and overrides our grid line definition.
Environment
Vaadin version(s): 24.6.5
OS: N/A
Browsers
No response
The text was updated successfully, but these errors were encountered: