Calm motion: animations on this site only fade, with no movement
Sunburst
A tree of parts as rings around a center
Shows how a whole splits into parts, and how each part splits again. The inner ring is the top level, and each ring out is one level down. For the same data in rectangles that you can open, use the treemap.
Basic
| Part | Value | Share |
|---|---|---|
| Production | 84k | 44% |
| Production › Editing | 42k | 22% |
| Production › Gear | 18k | 9.4% |
| Production › Studio rent | 24k | 12.6% |
| Hosts and guests | 72k | 37.7% |
| Hosts and guests › Hosts | 60k | 31.4% |
| Hosts and guests › Guest travel | 12k | 6.3% |
| Growth | 29k | 15.2% |
| Growth › Ads | 20k | 10.5% |
| Growth › Social clips | 9k | 4.7% |
| Hosting | 6k | 3.1% |
datatakes the same nodes as the treemap. Each node has anidand alabel. A leaf has avalue, and a parent is the sum of itschildren.- Each top part gets the next chart color, or its own
color. The children of a part use a lighter shade of the color of their parent. - The center shows the total. A hover on a part shows its path, value, and share.
sizesets the width of the circle in pixels (default 280), andformatsets the text of a value.- For screen readers, the chart is a table with a row for each part, such as "Production › Editing".
labelnames the table. Change the words withlabelsor a label pack:part,value,share, andtotal.
Usage
ts
import { BlessSunburst } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
data* | TreemapNode[] | — | the same nodes as the treemap: a leaf has a `value`, a parent is the sum of its children |
size | number | 280 | the width of the circle in pixels |
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<{ part: string; value: string; share: string; total: string; }> | — |