有没有办法获取我在 HighCharts stockChart 上绘制的 Segment 的坐标?

Is there a way to get the coordinates of a Segment that I draw on the HighCharts stockChart?

这是我目前使用的图表:https://www.highcharts.com/demo/stock/stock-tools-gui

我想知道是否可以获取使用他们内置的线工具绘制的线段(在代码中)的坐标。

使用库存工具添加的形状存储为注释,您可以通过以下方式参考它们:

chart.annotations[x].points;

现场演示: https://jsfiddle.net/BlackLabel/yf2c8oqk/

API参考:https://api.highcharts.com/highcharts/annotations