Example usage for javafx.scene.chart PieChart setData

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

Introduction

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

Prototype

public final void setData(ObservableList<Data> value) 

Source Link

Usage

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    PieChart pieChart = new PieChart();
    pieChart.setData(getChartData());

    pieChart.setTitle("Title");
    pieChart.setLegendSide(Side.LEFT);//w w w . j a v a 2s  .c o m
    pieChart.setClockwise(false);
    pieChart.setLabelsVisible(false);

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

    System.out.println(pieChart.labelLineLengthProperty());
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    PieChart pieChart = new PieChart();
    pieChart.setData(getChartData());

    pieChart.setTitle("Title");
    pieChart.setLegendSide(Side.LEFT);//from  w w w.  j av  a  2s . c o  m
    pieChart.setClockwise(false);
    pieChart.setLabelsVisible(false);

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

    System.out.println(pieChart.getStartAngle());
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    PieChart pieChart = new PieChart();
    pieChart.setData(getChartData());

    pieChart.setTitle("Title");
    pieChart.setLegendSide(Side.LEFT);//  w  ww  .java 2 s  .  co m
    pieChart.setClockwise(false);
    pieChart.setLabelsVisible(false);

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

    pieChart.setLabelLineLength(8);
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    PieChart pieChart = new PieChart();
    pieChart.setData(getChartData());

    pieChart.setTitle("Title");
    pieChart.setLegendSide(Side.LEFT);/*from  ww  w.j av  a  2s.co m*/
    pieChart.setClockwise(false);
    pieChart.setLabelsVisible(false);

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

    System.out.println(pieChart.labelsVisibleProperty());
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    PieChart pieChart = new PieChart();
    pieChart.setData(getChartData());

    pieChart.setTitle("Title");
    pieChart.setLegendSide(Side.LEFT);/* ww w .j av a  2  s  . c  o  m*/
    pieChart.setClockwise(false);
    pieChart.setLabelsVisible(false);

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

    pieChart.setLabelsVisible(true);
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    PieChart pieChart = new PieChart();
    pieChart.setData(getChartData());

    pieChart.setTitle("Title");
    pieChart.setLegendSide(Side.LEFT);/*from w w w. ja v a 2s . c  o m*/
    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();
}

From source file:Main.java

@Override
public void start(Stage primaryStage) {
    PieChart pieChart = new PieChart();
    pieChart.setData(getChartData());

    pieChart.setTitle("Title");
    pieChart.setLegendSide(Side.LEFT);//from   w w  w . jav  a  2 s  . co  m
    pieChart.setClockwise(false);
    pieChart.setLabelsVisible(false);

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

    System.out.println(pieChart.isClockwise());
}