CandlestickChart

Candles that grow from their middle when scrolled into view. Point at one: the rest dim and a readout gives open, high, low and close. Finance.

Open playground

About

CandlestickChart is a React component in the Finance category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { CandlestickChart } from "@ashutoshswamy/smoui" and set data, currency, height.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { CandlestickChart } from "@ashutoshswamy/smoui";

<CandlestickChart data={[{ label: "Mon", open: 120, high: 126, low: 118, close: 124 }]} />

Props 3

data

One candle per entry.

{ label; open; high; low; close }[]
currency

ISO currency code.

stringdefault "USD"
height

Chart height in px.

numberdefault 240