package bugsfiling; import javafx.application.Application; import javafx.builders.PieChartBuilder; import javafx.builders.StackPaneBuilder; import javafx.collections.FXCollections; import javafx.scene.Scene; import javafx.scene.chart.PieChart; import javafx.scene.layout.StackPane; import javafx.stage.Stage; /** * * @author Alexander Kouznetsov */ public class PieChartResize extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { PieChart pieChart = PieChartBuilder.create() .legendVisible(false) .data(FXCollections.observableArrayList( new PieChart.Data("A", 10), new PieChart.Data("B", 20), new PieChart.Data("C", 1), new PieChart.Data("D", 50))) .build(); // pieChart.setLegendVisible(false); StackPane root = StackPaneBuilder.create() .children(pieChart) .layoutX(10) .layoutY(10) .build(); Scene scene = new Scene(root); stage.setScene(scene); stage.setVisible(true); } }