JDK-8166847 : NumberAxis: sticked numbers sometimes
  • Type: Bug
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8u20,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-09-28
  • Updated: 2020-01-31
  • Resolved: 2016-10-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u152Fixed 9Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
segregating from JDK-8163486

Win. 7, JDK9 b136

Please run the attached test code and try to resize the stage => sometimes the x-axis coordinate labels are sticked (see "nok.png") making the coordinate values unreadable
Comments
Approved to backport to 8u-dev for 8u122.
19-10-2016

I'd like to backport this to 8u. Backport applies cleanly.
19-10-2016

Changeset: 458041f5400a Author: vadim Date: 2016-10-18 23:48 +0300 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/458041f5400a
18-10-2016

+1
18-10-2016

Jonathan, Please review this fix: http://cr.openjdk.java.net/~vadim/8166847/webrev.00/ The first part is reverting the part of the fix for JDK-8097501, that is checking for overlap for individual labels. Instead as before that fix we calculate maximum label size and check if the total labels size (as if all of them are maximum size) exceeds the length of the axis. If it is, then we throw away every n-th label. I've also simplified that code so we call setPosition while creating tick marks, there is only one loop, and the logic dependent on which side is the axis was extracted to the double measureTickMarkSize(T value, Side side) method. The second part addresses the issue mentioned in the last couple of comments in the JDK-8097501, where overlapping would be possible if bounds are not integer, but the tick unit is. So there can be a situation where we have lower bound tick (and label) and the next integer tick and they can overlap. So I introduced the isTickLabelsOverlap method and I only use it to check bounds labels.
18-10-2016

I can say that it is in fact reproducible on 8u starting from 8u20
29-09-2016

[~avstepan] If this is the result of the fix for JDK-8097501 then it should also reproduce in a recent JDK 8u version. Can you check and comment?
29-09-2016

if the issue is a result of the fix for JDK-8097501 (mentioned in JDK-8163486 comments), then at least some part of the changes should probably be reverted to return to the normal state
28-09-2016

not reproducible with JDK8
28-09-2016