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

LineChart Axis type ClassCastException when using FXML file

XMLWordPrintable

      If I inject a field LineChart<Number, Number> lineChart, it will throw a ClassCastException:

      java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
      at javafx.scene.chart.CategoryAxis.invalidateRange(CategoryAxis.java:399)
      at javafx.scene.chart.XYChart.updateAxisRange(XYChart.java:603)
      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)

      Works with LineChart<String, Number>.

            msladecek Martin Sládeček
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: