Im having trouble using some of the Javafx examples from Oracle as the 'scenes' are not created with the Scene Builder so the code differs from what I want to use it for.
Im trying to create a layout with scenebuilder that holds a Pie Chart. I have set the fxid of the chart to 'myPieChart' with the corresponding @FXML private Chart myPieChart;
at the start of my code.
I have also added the following code that gets executed on initialisation that I thought would have crated the chart:-
ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList(
new PieChart.Data("Grapefruit", 13),
new PieChart.Data("Oranges", 25),
new PieChart.Data("Plums", 10),
new PieChart.Data("Pears", 22),
new PieChart.Data("Apples", 30));
PieChart myPieChart = new PieChart(pieChartData);
All of the values are being put into an observable list and then the Pie Chart is instantiated with the ObsevableList value.
Unfortunately my pie chart is not showing....what am I missing guys?
Cheers for any help.