RFR: 8255572: Axis does not compute preferred height properly when autoRanging is off [v6]

Kevin Rushforth kcr at openjdk.java.net
Thu Apr 22 23:30:30 UTC 2021


On Mon, 1 Feb 2021 23:12:08 GMT, Jonathan Vusich <github.com+31666175+JonathanVusich at openjdk.org> wrote:

>> As noted in the corresponding JBS issue, `Axis` does not properly compute its preferred height when `autoRanging` is turned off. The simplest fix seems to be changing `CategoryAxis` so that `tickLabelRotation` is set to 90 degrees if there is not enough room for the category labels to layout horizontally. This fixes the fact that the axis labels are truncated and also ensures that the chart does not leave unused space from the layout calculations. `CategoryAxis` is already setting the `categorySpacing` property when `autoRanging` is off, so this seems to be an appropriate fix.
>
> Jonathan Vusich has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Add tests for vertical axis as well
>  - Improve layout calculations for rotated text

We generally prefer unit tests where feasible, but in this case, I think the system tests are fine. I'll review this soon (I had missed your earlier update and then got busy).

-------------

PR: https://git.openjdk.java.net/jfx/pull/342


More information about the openjfx-dev mailing list