title: JavaFXML + Scenebuilder: LineChart is not showing values
body: <p>I've got a RootStage with some <code>MenuItem</code>s and want to set the center of my Rootstage to an <code>AnchorPane</code> with a <code>LineChart</code> in the middle.</p>
  
  <p>The chart got a <code>CategoryAxis</code> on the x-Axis and a <code>NumberAxis</code> on the y-Axis.</p>
  
  <p>But now if I call the Controller for the <code>Scene</code> with the <code>LineChart</code> on it, I can see the <code>LineChart</code> but it has no values. Or at least doesn't show them.</p>
  
  <p>Why is the <code>LineChart</code> not getting filled?</p>
  
  <p>Or why doesn't it show the values?</p>
  
  <p><strong>MainController.class</strong></p>
  
  <pre><code>public class MainController extends Application {
  
      private Stage primaryStage;
      private BorderPane rootLayout;
  
      @FXML
      private MenuBar menuBar;
  
      @FXML
      private Menu menuAnsicht, menuOptionen;
  
      @FXML
      private MenuItem menuItemTag, menuItemWoche, menuItemAbout, menuItemCloseWindow;
  
      @Override
      public void init() {
      }
  
      @Override
      public void start(Stage primaryStage) {
          this.primaryStage = primaryStage;
  
          initRootLayout();
      }
  
      private void initRootLayout() {
          try {
              FXMLLoader loader = new FXMLLoader();
              loader.setLocation(getClass().getResource("/de/mgo/temperaturstatistics/view/RootLayout.fxml"));
              rootLayout = (BorderPane) loader.load();
              Scene scene = new Scene(rootLayout);
              primaryStage.setScene(scene);
              primaryStage.show();
          } catch (Exception e) {
              logger.debug("ERROR: " + e.getMessage());
              e.printStackTrace();
          }
      }
  
      @FXML
      public void handleTagItem(ActionEvent event) {
          try {
              BorderPane nowLayout = (BorderPane) menuBar.getScene().getRoot();
              FXMLLoader loader = new FXMLLoader();
              loader.setLocation(getClass().getResource("/de/mgo/temperaturstatistics/view/DailyScene.fxml"));
              nowLayout.setCenter(loader.load());
          } catch (Exception e) {
              logger.debug("ERROR: " + e.getMessage());
              e.printStackTrace();
          }
      }
  </code></pre>
  
  <p><strong>DailySceneController.class</strong></p>
  
  <pre><code>public class DailySceneController extends Application {
  
      @FXML
      private Label titleDaily;
  
      @FXML
      private LineChart&lt;String, Number&gt; dailyChart;
  
      @FXML
      private CategoryAxis xDaily;
  
      @FXML
      private NumberAxis yDaily;
  
      public int count = 0;
  
      public DailySceneController() {
          count++;
          System.out.println(count);
      }
  
      @Override
      public void init() {
          this.setChartDaily();
      }
  
      @Override
      public void start(Stage primaryStage) {
  
      }
  
      public void setChartDaily() {
  
          LocalDate localDate = LocalDate.now().minusDays(0);
  
          List&lt;Temperaturen&gt; listeNodemcu_JHL = MainController.getListeNodemcu_JHL();
  
          this.xDaily.setAutoRanging(false);
          this.yDaily.setAutoRanging(false);
  
          this.dailyChart.setAnimated(false);
  
          XYChart.Series&lt;String, Number&gt; seriesJHL = new XYChart.Series&lt;String, Number&gt;();
          seriesJHL.setName("Nodemcu_JHL");
  
          seriesJHL.getData().add(new XYChart.Data&lt;String, Number&gt;("Test", 15));
          this.dailyChart.getData().add(seriesJHL);
      }
  }
  </code></pre>
  
  <p><strong>DailyScene.fxml</strong></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;?package de.mgo.temperaturstatistics.controller.Controller?&gt;
  &lt;?import javafx.scene.chart.CategoryAxis?&gt;
  &lt;?import javafx.scene.chart.LineChart?&gt;
  &lt;?import javafx.scene.chart.NumberAxis?&gt;
  &lt;?import javafx.scene.control.Label?&gt;
  &lt;?import javafx.scene.layout.BorderPane?&gt;
  &lt;?import javafx.scene.text.Font?&gt;
  
  
  &lt;BorderPane xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.mgo.temperaturstatistics.view.DailySceneController"&gt;
     &lt;top&gt;
        &lt;Label fx:id="titleDaily" text="Temperatur-Statistik Tagesansicht" BorderPane.alignment="CENTER"&gt;
           &lt;font&gt;
              &lt;Font name="System Bold" size="18.0" /&gt;
           &lt;/font&gt;
        &lt;/Label&gt;
     &lt;/top&gt;
     &lt;center&gt;
        &lt;LineChart fx:id="dailyChart" prefHeight="300.0" prefWidth="500.0" BorderPane.alignment="CENTER"&gt;
          &lt;xAxis&gt;
            &lt;CategoryAxis fx:id="xDaily" animated="false" label="Uhrzeit" side="BOTTOM" /&gt;
          &lt;/xAxis&gt;
          &lt;yAxis&gt;
            &lt;NumberAxis fx:id="yDaily" animated="false" autoRanging="false" label="Temperatur" lowerBound="10.0" side="LEFT" tickLabelGap="1.0" tickUnit="1.0" upperBound="30.0" /&gt;
          &lt;/yAxis&gt;
        &lt;/LineChart&gt;
     &lt;/center&gt;
  &lt;/BorderPane&gt;
  </code></pre>