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

BarChart does not show all data

XMLWordPrintable

      A barchart skips x-values on its x-axis if there is not enough room to show all of them. Apparently this also leads to skipping the corresponding bar. See attached screenshot and demo code for an example. It shows a line chart and a bar chart with the same data. The bar chart is emty, the line chart is not. Only in full screen, with enough horizontal room, the bars are visible. Users will get a wrong impression here: they will believe that there is no data, or that all values are zero. I think there should be at least a thin bar even if there is no corresponding label on the x-axis.

        1. MissingBarsChartSample.java
          5 kB
          Werner Lehmann
        2. missing-bars.png
          34 kB
          Werner Lehmann
        3. visible-bars.png
          91 kB
          Werner Lehmann
        4. RT-24813.patch
          1 kB
          Parvathi Somashekar
        5. MissingBarsChartSample.java
          6 kB
          Parvathi Somashekar
        6. barchart.png
          42 kB
          Parvathi Somashekar

            psomashe Parvathi Somashekar (Inactive)
            wlehmann Werner Lehmann
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: