Icicle — Hierarchical Banded Chart
Signature
sp.icicle(title, labels, parents, values, *, variant="basic", palette=None, **kwargs) -> Chart
Aliases: sp.icicle, sp.icicles, sp.icicle_chart, sp.icicle_family, sp.build_icicle
Description
sp.icicle() renders a hierarchy as stacked bands: each depth level of the tree is one horizontal row, and the width of each node inside its row is proportional to its value. It is a rectangular alternative to sunburst() and shares the exact same input schema (labels / parents / values), so any dataset already used with sunburst() or treemap() works unchanged.
Hierarchy encoding —
labelslists every node,parentsgives the parent label of each node (""for a root). Leaf values come fromvalues; internal-node values at0are auto-rolled-up from descendants.
Variants
Data
labels (list[str]) — Node labels (one per row). parents (list[str]) — Parent label of each node ("" for roots). values (list[float]) — Leaf values; internal zeros are auto-rolled-up.
Parameters
Themes
Returns
Chart — object with .html property and .show() method.
Root row at the top, depth-based opacity, white separators between bands.
Rounded corners with a small gap between every node, both across and between rows.
Root column on the left, depth grows rightward instead of downward.
The same hierarchy in polar coordinates instead of cartesian — depth becomes ring radius, horizontal span becomes angular span. The classic icicle/sunburst duality: identical data, identical layout math (`xspan`, `depth`), different coordinate system.
Colors every node by its value rank among its same-depth peers (indigo → red, lowest to highest) instead of by raw share of the grand total — makes cross-branch comparisons at a given level obvious even when one branch is much bigger than another.