我正在使用 LightningChartJS 创建一个 OHLC 图表。默认情况下,条形图具有红色和绿色。如何更改这些条形图的颜色?如何添加填充样式.setPositiveStyle( (figure) => figure
.setStrokeStyle( (stroke) => stroke.setThickness(2) )
)
.setNegativeStyle( (figure) => figure
.setStrokeStyle( (stroke) => stroke.setThickness(2) )
)
1 回答
慕无忌1623718
TA贡献1744条经验 获得超4个赞
您可以使用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')})
)
添加回答
举报
0/150
提交
取消