0
這是我的控制器java類,其中繪製了具有多個系列和多個值的折線圖動態X類軸和Y是數軸,並且我想顯示懸停在點上的值。我怎樣才能做到這一點,因爲我有多個系列和多個值如何在javafx中懸停在折線圖上時顯示值?
Stage stage = new Stage();
stage.setTitle("Performance Analysis");
final CategoryAxis xAxis = new CategoryAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Values");
//yAxis.setLabel("Engines");
LineChart<String, Number> lineChart = new LineChart<String,Number>(xAxis,yAxis);
Scene scene = new Scene(lineChart,800,600);
lineChart.setTitle("Performance Analysis");
lineChart.setCursor(Cursor.CROSSHAIR);
ParameterSelectionController psc = new ParameterSelectionController();
performance performvalues = new performance(lineChart, refined, collection, al4); //this is another class which in parameter
performvalues.generateChart();
stage.setScene(scene);
stage.show();
https://stackoverflow.com/questions/14615590/javafx-linechart-hover-values – Sedrick
請發表更多代碼! –