Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8093722

NumberAxis autoranging: unexpected behaviour when constructing via builder or FXML

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Incomplete
    • Affects Version/s: 7u10
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:

      Description

      By default a chart axis uses autoranging. When it is constructed with upper and lower bound the autoranging is turned off:

      new NumberAxis(0, 50, 1)

      However, when doing the same in FXML, autoranging stays on. This is quite unexpected and not at all obvious, since the same parameters are used:

      <NumberAxis lowerBound="0" upperBound="50" tickUnit="1"/>

      To work around this it is necessary to explicitly add autoRanging="false" to the FXML. This is probably simply caused by the fact that the NumberAxisBuilder first calls the no-args constructor which keeps autoranging on. Later the bounds are applied but that does not turn off autoranging.

        Attachments

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              wlehmann Werner Lehmann
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: