Skip to content

Type Alias: SunburstTrace ​

ts
type SunburstTrace = Omit<CommonTraceAttributes, 'hoverinfo'> & DomainTraceAttributes & object;

Sunburst: a hierarchy as rings of sectors, children outside their parents, with drill-down.

Type Declaration ​

NameTypeDescription
branchvalues?"remainder" | "total"How values of branches are read: remainder adds each node's value to its descendants' (a branch is bigger than its children), total takes it as the branch's total, which must not be less than its children's sum (the trace is not drawn otherwise).
count?"branches" | "leaves" | "branches+leaves" | "leaves+branches"Without values: what a node counts to size it — the leaves below it, its branches, or both.
hoverinfo?PerPoint< | "label" | "text" | "value" | "name" | "current path" | "percent root" | "percent entry" | "percent parent" | `${"label" | "text" | "value" | "name" | "current path" | "percent root" | "percent entry" | "percent parent"}+${string}` | "all" | "none" | "skip">Which fields hover labels show, in a fixed order (percentages read '25% of Eve'); 'skip' also turns hover events off for this trace.
insidetextfont?SunburstTraceInsidetextfontFont of labels inside nodes. Defaults to textfont, with a color contrasting the node.
insidetextorientation?"horizontal" | "radial" | "tangential" | "auto"Orientation of labels inside sectors: horizontal, radial (along the radius), tangential (across it), or auto (whichever is largest).
labels?DataColumnLabel of each sector. Without ids, labels are also the node ids parents refer to, so they must be unique among parents.
leaf?SunburstTraceLeafLeaf style.
level?unknownId of the node shown as the root (the entry): '' or unset for the whole hierarchy. Clicking a node sets it (drill-down); clicking the entry goes back up.
marker?SunburstTraceMarkerSector style.
maxdepth?numberLevels drawn from the entry down, the entry included; -1 draws them all. Deeper nodes appear when drilling in.
outsidetextfont?SunburstTraceOutsidetextfontFont of the root's label when the root is transparent (it sits on the background; not with a colorscale or several roots). Defaults to textfont.
parents?DataColumnParent of each node: its id (an ids entry, else a labels entry). '' marks a root; several roots get a generated root above them. Without any '', the one parent that is not a node becomes the root.
root?SunburstTraceRootRoot style.
rotation?numberRotates the whole diagram counterclockwise by this many degrees. By default the first sector starts at 3 o'clock.
sort?booleanOrder siblings by value, largest first; otherwise in data order.
text?DataColumnText per sector, shown with the text flag of textinfo, and in hover labels unless hovertext is set.
textfont?SunburstTraceTextfontFont of node labels. Defaults to layout.font.
textinfo?| "label" | "text" | "value" | "current path" | "percent root" | "percent entry" | "percent parent" | `${"label" | "text" | "value" | "current path" | "percent root" | "percent entry" | "percent parent"}+${string}` | "none"What node labels show, one per line in a fixed order: label, value, current path, the percentages (of the parent, the entry, the root; '25% of parent' when several), text. Default 'label', 'text+label' when text is an array. Use texttemplate for other layouts.
texttemplate?PerPoint<string | number>Template for node labels, overriding textinfo: %{label}, %{value}, %{currentPath}, %{percentParent}, %{parent}, %{percentEntry}, %{entry}, %{percentRoot}, %{root}, %{text}, %{color}, %{customdata}, %{meta}, with optional d3 formats (%{percentRoot:.1%}).
type"sunburst"Trace type.
values?DataColumnValue of each sector, a number ≥ 0 (rows with other values are dropped). How branches add up is branchvalues; without values, nodes are sized by count.

Released under the MIT License.