如何在样式样条图中显示系列的特定点?

How to display the specific points of the series in styled splines chart?

我正在使用 LightningchartJS,如果我将鼠标悬停在一个系列上,它会显示与该系列上的那个点关联的坐标,但我只想显示系列上的特定点,当我们 hover.How 我可以实现这个?

const series = chart.addSplineSeries({ pointShape: PointShape.Circle }) 
.setName('Power consumption') 
.setStrokeStyle((strokeStyle) => strokeStyle 
                .setThickness(4) 
                .setFillStyle(new SolidFill({ color: ColorHEX('#FFA500') })) 
               ) 
.setPointSize(8) 
.setResultTableFormatter((tableBuilder, series, x, y) => tableBuilder 
                         .addRow(series.getName()) 
                         .addRow(series.axisX.formatValue(x)) 
                         .addRow(series.axisY.formatValue(y) + ' kW') 
                        ) 
```                    

默认情况下,我们沿着系列插入光标值,当鼠标悬停在系列附近时,它显示光标沿着系列跟随。

您可以通过 setting the series' cursor interpolation 将光标设置为仅指向您为系列提供的数据点。

series.setCursorInterpolationEnabled(false)