JavaFX Tutorial 16 - LineChart Java GUI
Code Source :
@Override
public void start(Stage primaryStage) {
BorderPane bp = new BorderPane();
CategoryAxis x = new CategoryAxis();
x.setLabel("Code Amir");
NumberAxis y = new NumberAxis(0,100,5);
y.setLabel("Ratio");
LineChart lc = new LineChart(x,y);
lc.setTitle("Consumption Ratio Chocolate In USA/World");
XYChart.Series java = new XYChart.Series();
java.setName("Years");
java.getData().add(new XYChart.Data("2010",40));
java.getData().add(new XYChart.Data("2019",30));
java.getData().add(new XYChart.Data("2020",65));
lc.getData().add(java);
bp.setCenter(lc);
Scene sc = new Scene(bp,800,600);
primaryStage.setScene(sc);
primaryStage.setTitle("Tutorial JavaFX");
primaryStage.show();
}
The JavaFX LineChart can draw line charts inside your JavaFX applications. The JavaFX LineChart component is represented by the class javafx.scene.chart.LineChart .
In questa pagina del sito puoi guardare il video online JavaFX Tutorial 16 - LineChart Java GUI della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Code Amir 01 gennaio 1970, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,523 volte e gli è piaciuto 7 spettatori. Buona visione!