-
Notifications
You must be signed in to change notification settings - Fork 95
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
Moving XYCharts to a new scene causes improper scaling between the axis and series/gridlines #595
Comments
Sadly the workarounds mentioned in #410 do not work. I have found a workaround that works although it is quite janky; to momentarily create and display a stage so that the graphs can properly adjust, and then closing the temporary stage. |
You can create public static Image snapshot(Node node, double pixelScale) {
SnapshotParameters snapParams = new SnapshotParameters();
Transform snapshotScale = Transform.scale(pixelScale, pixelScale);
snapParams.setTransform(snapshotScale);
if (Platform.isSupported(ConditionalFeature.SCENE3D)) {
snapParams.setDepthBuffer(true);
}
return node.snapshot(snapParams, null);
} |
Glad you found a workaround that is working for you and thanks for sharing 👍 Since 11.3.0 with the new layout code is now released which should solve these kind of problems at the root it would be interesting to confirm that the problem is gone now. As this errors are on the old release and the relevant parts of the code have been fundamentally changed I'll close this issue, feel free to reopen if the issue persists in the 11.3.0 release (which I think it shouldn't). |
Describe the bug
I am developing an application that must display and save several graphs. To do this, I have XYCharts in a GridContainer. The container is displayed normally in the interface. When a screenshot is necessary, the container is moved to a new blank scene that is not displayed, and a snapshot is taken of that scene. This is done because the screenshots must be higher resolution than the interface (or computer monitor, for that matter).
The screenshot produced shows that the graph axes scaled to the proper visual size, but everything else is wrong. The axes values are completely wrong, and the series and grid lines maintain the same size as before the scene switch. I have tried the workarounds mentioned in #533 with no success. Upon "returning" the GridContainer node to the main interface, the graphs look proper again.
-
To Reproduce
Environment:
The text was updated successfully, but these errors were encountered: