Skip to Content
✨ QuickCode UI keeps growing! More components, more features, and more ways to make your projects shine. Stay tuned & maybe… hire me or sponsor me 😉 
DocumentationCandlestickChart

CandlestickChart

A financial chart component for displaying OHLC (Open, High, Low, Close) data commonly used in stock and cryptocurrency trading analysis.

Install Dependencies

npx
quickcode-ui add CandlestickChart

Examples

Default

DefaultExample

Custom Colors

CustomStyleExample

Props

PropTypeDefaultDescription
dataCandlestickDataPoint[]Array of candlestick data points with open, high, low, close values
configCandlestickChartConfig{}Configuration for chart colors and labels
showGridbooleantrueWhether to display the background grid
showTooltipbooleantrueWhether to display tooltip on hover
customTooltip(dataPoint, index) => JSXundefinedCustom tooltip renderer. Allows passing your own tooltip component/content
showLegendbooleanfalseWhether to display the chart legend
showVolumebooleanfalseWhether to display volume data in tooltip
candleWidthnumber8Width of each candlestick body in pixels
wickWidthnumber1Width of the candlestick wick lines in pixels
classNamestringAdditional CSS classes for the container

CandlestickDataPoint

PropertyTypeDescription
datestringDate or time label for the data point
opennumberOpening price
highnumberHighest price
lownumberLowest price
closenumberClosing price
volumenumber(Optional) Trading volume

CandlestickChartConfig

PropertyTypeDescription
date{ label?: string; color?: string }Configuration for date axis
bullish{ label?: string; color?: string }Configuration for bullish candles (close >= open)
bearish{ label?: string; color?: string }Configuration for bearish candles (close < open)
volume{ label?: string; color?: string }Configuration for volume display
Last updated on