CandlestickCartesianLayer
Use CandlestickCartesianLayer
to create candlestick charts. Each candle’s style is defined by its corresponding Candle
. The Candle
s are provided by a CandleProvider
:
absolute
. This is commonly used for filled candles.absoluteRelative
. This is commonly used for hollow candles.CandleProvider
.At the CandlestickCartesianLayer
level, you can set the minimum body height, change the candle spacing, and toggle wick scaling.
For more, see 5.3.1 (Compose) and 8.3.1 (views).
Transaction.candlestickSeries
CandlestickCartesianLayer
s use CandlestickCartesianLayerModel
s. When using a CartesianChartModelProducer
, add CandlestickCartesianLayerModel
s via candlestickSeries
:
candlestickSeries
also has an overload with no x
parameter, which uses the indices of the prices as the x values:
CandlestickCartesianLayerModel
creationWhen creating a CartesianChartModel
directly, you can add a CandlestickCartesianLayerModel
by using build
:
This function also has an overload with no x
parameter: