1 Reply Latest reply: Dec 11, 2012 5:17 AM by 866629 RSS

    Is there a bug with StackedBarChart when assigned to a BorderPane?

    866629
      Hi All,

      I just want to confirm if other programmers are having problems with adding a StackedBarChart to a BorderPane?
      Before submitting a bug through JIRA.

      When adding all other charts (Bar Chart, Line Chart, Scatter Chart) these all work fine with a BorderPane.
      Furthermore I can definitely confirm the StackedBarChart is NOT empty as I have tested for this occasion
      using:
      if(stackedBarChart.getData().isEmpty() == true){Print Message here!}
      else{Print Message here! We have data!}
      Whenever I try this line:
      newChartLayoutFirst.setCenter(stackedBarChart);
      I get the following error message:
      java.lang.NullPointerException
           at java.util.ArrayList.addAll(ArrayList.java:530)
           at javafx.scene.chart.StackedBarChart.updateAxisRange(StackedBarChart.java:360)
           at javafx.scene.chart.XYChart.layoutChartChildren(XYChart.java:620)
           at javafx.scene.chart.Chart$1.layoutChildren(Chart.java:84)
           at javafx.scene.Parent.layout(Parent.java:1018)
           at javafx.scene.Scene.layoutDirtyRoots(Scene.java:513)
           at javafx.scene.Scene.doLayoutPass(Scene.java:484)
           at javafx.scene.Scene.access$3900(Scene.java:169)
           at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2199)
           at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:363)
           at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
           at com.sun.javafx.tk.quantum.QuantumToolkit$9.run(QuantumToolkit.java:329)
           at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
           at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
           at com.sun.glass.ui.win.WinApplication$2$1.run(WinApplication.java:67)
           at java.lang.Thread.run(Thread.java:722)
      I'm using JavaFX 2.2.0 with JDK 7u6 on a Windows 7 x64 machine.

      Edited by: 863626 on Dec 10, 2012 10:20 PM