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

LineChart Axis type ClassCastException when using FXML file

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Incomplete
    • Affects Version/s: 7u51
    • Fix Version/s: None
    • Component/s: javafx
    • Environment:

      Windows 8.1

    • Subcomponent:

      Description

      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>.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: