Calm motion: animations on this site only fade, with no movement
Range chart
Floating bars from a low to a high value for each row
Shows the span of each item, such as the shortest and the longest episode of each show, or the low and the high price of each day. For a box with the quartiles, use the box plot.
Basic
| Show | Shortest | Longest | Average |
|---|---|---|---|
| Morning Brief | 18 min | 32 min | 24 min |
| Deep Dive | 48 min | 96 min | 67 min |
| Weekend Chat | 35 min | 58 min | 44 min |
| Tech Corner | 22 min | 41 min | 30 min |
| Local News | 9 min | 15 min | 12 min |
datais a list of rows. Each row has alabel, alowvalue, and ahighvalue. An optionalvalueputs a mark inside the range, such as the average.- The bar goes from the low value to the high value on one axis for all rows. The mark is a dark line across the bar.
colorsets the color of the bars (defaultchart-1), andformatsets the text of a value.- For screen readers, the chart is a table. If a row has a mark, the table has a column for it.
labelnames the table. Name the columns withlabelsor a label pack:item,low,high, andvalue.
Usage
ts
import { BlessRangeChart } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
data* | BlessRangeRow[] | — | |
color | string | "chart-1" | |
format | ((v: number) => string) | — | |
label | string | "Chart" | names the chart and its table for screen readers |
labels | Partial<{ item: string; low: string; high: string; value: string; }> | — |