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

Jonathan Vusich github.com+31666175+jonathanvusich at openjdk.java.net
Wed Aug 4 14:09:19 UTC 2021


> 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains eight additional commits since the last revision:

 - Merge branch 'master' into jonathan/fix-chart-axis-labels
 - Updated per review comments
 - Add tests for vertical axis as well
 - Improve layout calculations for rotated text
 - Remove unused import
 - Unrotate labels if there is enough space for them
 - Added copyright header
 - Added fix and test

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

Changes:
  - all: https://git.openjdk.java.net/jfx/pull/342/files
  - new: https://git.openjdk.java.net/jfx/pull/342/files/9d2c8ac9..cc73f8dc

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jfx&pr=342&range=07
 - incr: https://webrevs.openjdk.java.net/?repo=jfx&pr=342&range=06-07

  Stats: 442103 lines in 7940 files changed: 245930 ins; 125567 del; 70606 mod
  Patch: https://git.openjdk.java.net/jfx/pull/342.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/342/head:pull/342

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


More information about the openjfx-dev mailing list