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

NumberAxis: no zero axes and ticks when the directions of the axes are inverted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8, 9
    • Fix Version/s: tbd
    • Component/s: javafx

      Description

      Win. 7, JDK9 b129

      Please run the attached test case having
        NumberAxis x = new NumberAxis("x", -2., 2., 0.5);
        NumberAxis y = new NumberAxis("y", -2., 2., 0.5);
      The chart looks as "plot_1.png" - ok.

      Then please swap the lower and the upper bounds for the axes:
        NumberAxis x = new NumberAxis("x", 2., -2., 0.5);
        NumberAxis y = new NumberAxis("y", 2., -2., 0.5);

      1) the chart is plotted (hopefully this is an expected result)
      2) the chart looks as "plot_2.png" - nok: no zero axes and ticks (please try also to set tick unit = -0.5 - still no ticks)

      Probably the docs should be updated as well (see NumberAxis constructor):
      "minValue - The min data value that needs to be plotted on this axis
       maxValue - The max data value that needs to be plotted on this axis"
      Here -2 is "max" value and 2 is "min", - but this is a question of terminology ("lower/upper bound" instead of "min/max"?)...

        Attachments

        1. AxisTest.java
          1 kB
        2. AxisTest2.java
          1 kB
        3. plot_1.png
          plot_1.png
          10 kB
        4. plot_2.png
          plot_2.png
          6 kB

          Activity

            People

            Assignee:
            arapte Ambarish Rapte
            Reporter:
            avstepan Alexander Stepanov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: