Skip to main content

Interface: CandlestickChartOptions

Defined in: src/mobjects/graphing/CandlestickChart.ts:32

Options for creating a CandlestickChart.

Properties​

axisColor?​

optional axisColor: string

Defined in: src/mobjects/graphing/CandlestickChart.ts:56

Color for the axes and labels. Default: WHITE


bearishColor?​

optional bearishColor: string

Defined in: src/mobjects/graphing/CandlestickChart.ts:38

Fill/stroke color for bearish candles (close < open). Default: RED.


bodyFillOpacity?​

optional bodyFillOpacity: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:48

Fill opacity of the candle body. Default: 0.9


bodyStrokeWidth?​

optional bodyStrokeWidth: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:46

Stroke width of the candle body outline. Default: 1.5


bullishColor?​

optional bullishColor: string

Defined in: src/mobjects/graphing/CandlestickChart.ts:36

Fill/stroke color for bullish candles (close >= open). Default: GREEN.


candleSpacing?​

optional candleSpacing: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:42

Gap between adjacent candles. Default: 0.2


candleWidth?​

optional candleWidth: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:40

Width of each candle body. Default: 0.5


data​

data: OHLC[]

Defined in: src/mobjects/graphing/CandlestickChart.ts:34

Array of OHLC data points, left to right.


height?​

optional height: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:52

Visual height of the price area. Default: 5


includeYLabels?​

optional includeYLabels: boolean

Defined in: src/mobjects/graphing/CandlestickChart.ts:60

Whether to include y-axis price labels. Default: true


includeYTicks?​

optional includeYTicks: boolean

Defined in: src/mobjects/graphing/CandlestickChart.ts:58

Whether to include y-axis tick marks. Default: true


showVolume?​

optional showVolume: boolean

Defined in: src/mobjects/graphing/CandlestickChart.ts:68

Whether to draw volume bars below the price area. Default: false


volumeHeight?​

optional volumeHeight: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:70

Visual height of the volume area. Default: 1


wickWidth?​

optional wickWidth: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:44

Stroke width of the high/low wick line. Default: 2


width?​

optional width: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:54

Visual width of the chart area. Default: 8


xLabelFontSize?​

optional xLabelFontSize: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:66

Font size for x-axis labels. Default: 20


xLabels?​

optional xLabels: string[]

Defined in: src/mobjects/graphing/CandlestickChart.ts:64

Explicit x-axis labels (overrides date/label on the data). Default: []


yLabelFontSize?​

optional yLabelFontSize: number

Defined in: src/mobjects/graphing/CandlestickChart.ts:62

Font size for y-axis labels. Default: 20


yRange?​

optional yRange: [number, number, number]

Defined in: src/mobjects/graphing/CandlestickChart.ts:50

Y-axis (price) range as [min, max, step]. Default: auto-scaled from data.