Skip to content
Calm motion: animations on this site only fade, with no movement

Radial bar ​

Rings that fill to a share, one ring for each goal

Shows how far each goal is, as rings in one circle. Each ring fills to the share of its goal. For one value with a needle, use the gauge. For parts of one whole, use the donut chart.

Basic
  • Episodes published75% · 3 / 4
  • Social clips75% · 9 / 12
  • Guest calls100% · 5 / 5
  • Newsletter50% · 0.5 / 1
  • data is a list of goals. Each goal has a label, a value, an optional max (default 100), and an optional color. The first goal is the outer ring.
  • A ring stops at full. If a value is more than its max, the legend still shows the real value.
  • The circle has room for four rings. If the list is longer, the legend shows all goals, but the circle draws only the first four.
  • The legend shows the name, the share, the value, and the max of each goal. format sets the text of a value, and size sets the width of the circle in pixels (default 180).
  • For screen readers, the circle is hidden and the legend is a list. label names the chart.

Usage ​

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

API ​

Props

NameTypeDefaultDescription
data*BlessRadialBarItem[]—one ring for each item, from the outside in
sizenumber180the width of the circle in pixels
format((v: number) => string)—text for one value, for example `(v) => v + " min"`
labelstring"Chart"names the chart for screen readers

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