如何修改 OHLC 图表中条形图的默认颜色?

How can I modify the default color of bar figures in an OHLC chart?

我正在使用 LightningChartJS 创建 OHLC 图表。默认情况下,条形图有红色和绿色。我怎样才能改变这些条形图的颜色? 如何将填充样式添加到

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

您可以使用 setBodyFillStyle 方法更改 OHLC 图形的主体。

const series = chart.addOHLCSeries()
// Style a positive OHLC figure
series.setPositiveStyle( (figure) => figure
    // Style the body of a Positive Figure
    .setBodyFillStyle( new SolidFill({ color: ColorHEX('#E69965')})
)
// Style a negative OHLC figure
series.setNegativeStyle( (figure) => figure
    // Style the body of a Negative Figure
    .setBodyFillStyle( new SolidFill({color: ColorHEX('#E659A5')})
)