如果 OHLC 中的开盘价和收盘价相同,我可以在烛台上使用不同的颜色吗?

Can I have some different color on candle-stick if opening and closing values are same in OHLC?

OHLC 图表以红色(如果开盘值大于收盘值)或绿色显示烛台。使用 LightningChartJS 是否可以为具有相同开盘价和收盘价的柱线设置不同的颜色(如灰色)?目前显示为绿色。

.setPositiveStyle( (figure) => figure
                    .setStrokeStyle( (stroke) => stroke.setThickness(2) )
                   )
  .setNegativeStyle( (figure) => figure
                    .setStrokeStyle( (stroke) => stroke.setThickness(2) )
                   )

OHLCSeries.setStyle()可用于指定正负图形通用的样式器。您应该能够检查样式器内的开盘值和闭盘值是否相等并采取相应措施。

OHLCSeries.setStyle(( candlestick ) => {
    if ( candlestick.getClose() === candlestick.getOpen() ) {
         // Apply special style to candlestick.
    }
})