Skip to content
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
Episode length of each show
ShowShortestLongestAverage
Morning Brief18 min32 min24 min
Deep Dive48 min96 min67 min
Weekend Chat35 min58 min44 min
Tech Corner22 min41 min30 min
Local News9 min15 min12 min
  • data is a list of rows. Each row has a label, a low value, and a high value. An optional value puts 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.
  • color sets the color of the bars (default chart-1), and format sets 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. label names the table. Name the columns with labels or a label pack: item, low, high, and value.

Usage ​

ts
import { BlessRangeChart } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
data*BlessRangeRow[]—
colorstring"chart-1"
format((v: number) => string)—
labelstring"Chart"names the chart and its table for screen readers
labelsPartial<{ item: string; low: string; high: string; value: string; }>—

Released under the MIT License. Character names and artwork belong to their owners.