Example usage for javafx.scene.chart PieChart requestLayout

List of usage examples for javafx.scene.chart PieChart requestLayout

Introduction

In this page you can find the example usage for javafx.scene.chart PieChart requestLayout.

Prototype

public void requestLayout() 

Source Link

Document

Requests a layout pass to be performed before the next scene is rendered.

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    PieChart pieChart = new PieChart();
    pieChart.setData(getChartData());//from   w w  w  .j a  v a2 s .  c  om

    pieChart.setTitle("Title");
    pieChart.setLegendSide(Side.LEFT);
    pieChart.setClockwise(false);
    pieChart.setLabelsVisible(false);

    StackPane root = new StackPane();
    root.getChildren().add(pieChart);
    primaryStage.setScene(new Scene(root, 300, 250));
    primaryStage.show();

    pieChart.requestLayout();
}