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

Bar chart bar has inverted corners after trying to render a bar with a negative value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • fx2.0.2
    • javafx

      In the course of fixing RT-15906 so that clipped round-rect region background fills are rendered sanely, I discovered another anomaly that happens to bar charts when some of their bars go negative. This happened both before and after the fixes for RT-15906 and whether or not you patch the chart demo to have a fixed vertical range.

      If you set one of the values in the apps/experiments/SwingJavaFXChart demo to a negative number then the bar renders with the rounded corners on the bottom and the square corners on the top (where the axis is on an inverted negative bar).

      However, if you then set its value back to a positive value, then it animates back above the axis as you would expect, but it still has the rounded corners on the wrong side (i.e. the top side that is now away from the axis on an upright positive bar). It looks like the bar picks up a negative scale factor when it goes negative that it never loses.

        1. Main.java
          9 kB
          Martin Sládeček

            jgiles Jonathan Giles
            flar Jim Graham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: