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

XYChart: add support to secondary axis



    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: fx2.0
    • Fix Version/s: tbd
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 7 64bit, Java 7 64bit b144, JavaFX 64bit b32


      In scientific display it's not uncommon for charts to have 2 Y axis. We need to have support for a secondary Y axis that is displayed on the other side of the chart.
      This secondary axis would not used to compute the chart's grid.

      However we need to be able to specify is a Series is mapped on the primary or secondary axis. By default a series always maps to the primary Y axis.

      If the location of the primary Y axis can be changed (see [RT-14709]), to its opposite location the secondary axis needs to jump to the opposite of its own location.

      ie: our primary Y axis is set on AxisLocation.LEADING. This means our secondary Y axis (if shown) is on AxisLocation.TRAILING.
      Now we change the primary axis to AxisLocation.TRAILING. Automatically our secondary jumps to AxisLocation.LEADING.
      The chart does not need to be reploted as none of the axis' bounds changed.
      This side switch does not apply if one of the axis is set to AxisLocation.NONE.

      It's possible we may need support for secondary X axis as well, for example in the case of BarChart where the category axis is the Y axis. In such case we would need support for secondary X axis.

      There might a problem with the support of category axis in BarChart. It's very unlikely we want two category axis in such graph and we do not want to map series to a secondary category axis as well (as far as I though about this issue).
      This is not an issue with LineChart, BubbleChart, AreaChart and ScatterChart.


          Issue Links



              Unassigned Unassigned
              fbouyajfx Fabrice Bouyé (Inactive)
              4 Vote for this issue
              3 Start watching this issue