Calm motion: animations on this site only fade, with no movement
Candlestick
The open, high, low, and close of each period
Shows how a price or a range moves each day. Each period is a candle. The thin line goes from the low to the high, and the box goes from the open to the close. For one value each day, use the line chart.
Basic
| Period | Open | High | Low | Close |
|---|---|---|---|---|
| 3 Nov | $120 | $126 | $118 | $124 |
| 4 Nov | $124 | $128 | $121 | $122 |
| 5 Nov | $122 | $123 | $115 | $116 |
| 6 Nov | $116 | $120 | $113 | $119 |
| 7 Nov | $119 | $125 | $118 | $125 |
| 10 Nov | $125 | $131 | $124 | $130 |
| 11 Nov | $130 | $132 | $126 | $127 |
| 12 Nov | $127 | $129 | $122 | $123 |
| 13 Nov | $123 | $128 | $121 | $127 |
| 14 Nov | $127 | $134 | $126 | $133 |
datais a list of periods. Each period has alabeland the numbersopen,high,low, andclose.- A period that closes at or above its open is hollow, in the
upcolor (defaultsuccess). A period that closes below its open is filled, in thedowncolor (defaultdanger). The shape tells the two apart, so the color is not the only sign. - The axis starts and ends at round numbers around the lowest low and the highest high. If the chart is narrow, the labels under the candles skip some periods.
formatsets the text of a value, andheightsets the height in pixels (default 260).- For screen readers, the chart is a table with a row for each period.
labelnames the table. Change the column names withlabelsor a label pack:period,open,high,low, andclose.
Usage
ts
import { BlessCandlestick } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
data* | BlessCandle[] | — | |
height | number | 260 | |
up | string | "success" | the color of a period that closes at or above its open; drawn hollow |
down | string | "danger" | the color of a period that closes below its open; drawn filled |
format | ((v: number) => string) | — | text for one value, for example `(v) => "$" + v` |
label | string | "Chart" | names the chart and its table for screen readers |
labels | Partial<{ period: string; open: string; high: string; low: string; close: string; }> | — |