Candlestick
OHLC candlestick chart. Green for up, red for down. Renders inside ChartRoot.
Primitive:
ChartCandlestickInteractive demo
Usage
import { ChartRoot, ChartCandlestick } from '@ramtt/charts'
<ChartRoot data={ohlcData} height={300}>
<ChartCandlestick />
</ChartRoot>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| openAccessor | (d) => number | — | Open price accessor |
| highAccessor | (d) => number | — | High price accessor |
| lowAccessor | (d) => number | — | Low price accessor |
| closeAccessor | (d) => number | — | Close price accessor |
| upColor | string | '#22c55e' | Up candle color |
| downColor | string | '#ef4444' | Down candle color |