title: Automatic resizing of LineChart fails if embedded in a pane
body: <p>The following program fails to resize the line chart horizontally when embedded in a Pane (or borderpane of anchorpane for the matter)
  If the line chart is directly parented to the VBox instead, then everything works as expected.</p>
  
  <p>I found I needed to bind the chart size to the parent pane, which I assume must be done automatically by VBox and HBox.</p>
  
  <p>After trying different combination of enclosing in HBox/VBox, setting growing and alignment policies, I am quite confused about how layouts work.
  I observe that there are differences in how ui components behave wrt resizing.</p>
  
  <p>Any clarification (or digest insight on javadoc unclear documentation) is appreciated.</p>
  
  <p>Best regards.</p>
  
  <p>Source edited and clarified</p>
  
  <pre><code>import javafx.application.Application;
  import javafx.scene.*;
  import javafx.scene.chart.*;
  import javafx.scene.layout.*;
  import javafx.stage.Stage;
  
  public class App extends Application {
  
      @Override
      public void start(Stage stage) {
          NumberAxis xAxis = new NumberAxis();
          NumberAxis yAxis = new NumberAxis();
          xAxis.setLabel("X");
          yAxis.setLabel("Y");
  
          final LineChart&lt;Number, Number&gt; lineChart = new LineChart&lt;&gt;(xAxis, yAxis);
          lineChart.setTitle("x = f(y)");
  
          XYChart.Series data = new XYChart.Series();
          data.setName("Serie 1");
          for (int i = 0; i &lt; 10; i++) {
              data.getData().add(new XYChart.Data(i, i * i));
          }
          lineChart.getData().add(data);
  
          VBox vb = new VBox();
          vb.setFillWidth(true);
          HBox hb = new HBox();
          hb.getChildren().add(lineChart);
          hb.setFillHeight(true);
          vb.getChildren().add(hb);
  
          HBox.setHgrow(lineChart, Priority.ALWAYS);
          VBox.setVgrow(hb, Priority.ALWAYS);
  
          Scene scene = new Scene(vb);
  
          stage.setScene(scene);
          stage.centerOnScreen();
          stage.setResizable(true);
          stage.show();
      }
  
      public static void main(String[] args) {
          launch(args);
      }
  }
  </code></pre>