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

Having two data sets with overlapping categories causes wrong order on Bar Chart's X-Axis

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u15
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 7, Netbeans 7.3 with jdk cobundle

      Description

      I have two data sets of probability distributions that I display on a bar chart;

      Data Set 1: [Data[40.8,0.02343050660724011,null], Data[40.9,0.2677825839285379,null], Data[41.0,0.4237334818997302,null], Data[41.1,0.2795760849833176,null], Data[41.2,0.005477342581174217,null]]

      Data Set 2: [Data[41.0,0.016648945254609863,null], Data[41.1,0.30015480984833043,null], Data[41.2,0.544611129781338,null], Data[41.3,0.1385796058684502,null], Data[41.4,5.509247271545289E-6,null]]

      The string-representations above are obtained from the observable list via toString() call to the observable lists putted in the bar charts that display them (thus this is the actual content taken from the bar chart, not from the original data).

      I first display the data set 1, and observe a bar chart with correct category order. (40.8, 40.9, 41.0, 41.1, 41.2)
      Then I change the bar chart's data with the content of data set 2 and observe a bar chart with correct order again. (41.0, 41.1, 41.2, 41.3, 41.4)
      However, if I change the bar chart's data once more with the content of data set 1 after displaying the data set 2, the category axis order of displayed chart is changing although the chart data has still the correct order.
      Namely the data in memory is once more the same
      Data Set 1: [Data[40.8,0.02343050660724011,null], Data[40.9,0.2677825839285379,null], Data[41.0,0.4237334818997302,null], Data[41.1,0.2795760849833176,null], Data[41.2,0.005477342581174217,null]]
      but this time it is displayed with the wrong category axis as (41.0, 41.1, 41.2, 40.8, 40.9)
      Note that the first 3 items is the same with the first 3 items of data set 2, and the first 2 items of data set 1 is displayed as the last two elements of the category axis.
      The order is destroyed.

      I want to attach the screenshots of these charts but unfortunately could not find attach file menu item on the "More Actions" menu of this issue.

        Attachments

          Activity

            People

            • Assignee:
              psomashe Parvathi Somashekar (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:
                Imported: