How to add shapes on JavaFX LineChart
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am going to add some shapes on LineChart . I put LineChart and AnchorPane into the StackPane . I added shapes to AnchorPane by getting x and y coordinates from the chart series. Here is example. LineChartApp.java package shapes; import javafx.application.Application; import javafx.scene.Scene; import javafx.stage.Stage; public class LineChartApp extends Application { @Override public void start(Stage primaryStage) throws Exception { primaryStage.setScene(new Scene(new ChartContent())); primaryStage.setMaximized(true); primaryStage.show();