import javafx.scene.chart.BarChart; ... @FXML BarChart barChart1; ... /* set texts */ barChart1.setTitle( "This is a chart" ); barChart1.getXAxis().setLabel( "x axis" ); barChart1.getYAxis().setLabel( "y axis" ); barChart1.setLegendVisible( false ); /* add data */ XYChart.Series series1 = new XYChart.Series(); series1.getData().add( new XYChart.Data( "Q1", 5 ) ); series1.getData().add( new XYChart.Data( "Q2", 5.5 ) ); series1.getData().add( new XYChart.Data( "Q3", 8 ) ); series1.getData().add( new XYChart.Data( "Q4", 3 ) ); barChart1.getData().add( series1 );Output:
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
Wednesday, March 21, 2018
JAVAFX - How fill and work with BarChart (graph)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment