不負(fù)相思意
2021-12-02 15:39:12
我正在使用 LightningChartJS 創(chuàng)建一個(gè) OHLC 圖表。默認(rèn)情況下,條形圖具有紅色和綠色。如何更改這些條形圖的顏色?如何添加填充樣式.setPositiveStyle( (figure) => figure
.setStrokeStyle( (stroke) => stroke.setThickness(2) )
)
.setNegativeStyle( (figure) => figure
.setStrokeStyle( (stroke) => stroke.setThickness(2) )
)
1 回答

慕無(wú)忌1623718
TA貢獻(xiàn)1744條經(jīng)驗(yàn) 獲得超4個(gè)贊
您可以使用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')})
)
添加回答
舉報(bào)
0/150
提交
取消