Icicle chart — pure SVG, zero JS.
Renders a hierarchical horizontal partition chart where the root spans the full width and children subdivide the row below. Depth is shown top-to-bottom.
Examples
<.icicle_chart data={[
%{label: "Root", value: 100, children: [
%{label: "A", value: 60, children: [
%{label: "A1", value: 30, children: []},
%{label: "A2", value: 30, children: []}
]},
%{label: "B", value: 40, children: []}
]}
]} />
<.icicle_chart
data={[%{label: "Total", value: 200, children: [...]}]}
row_height={36}
gap={2}
/>
Summary
Functions
Attributes
data(:list) - Hierarchical data:[%{label, value, children: [...]}]. Defaults to[].colors(:list) - Override default palette. CSS color strings. Defaults to[].row_height(:integer) - Height of each depth row in pixels. Defaults to30.gap(:integer) - Gap between tiles in pixels. Defaults to1.animate(:boolean) - Enable entrance animations. Defaults totrue.animation_duration(:integer) - Animation duration in ms. Defaults to600.theme(:map) - Chart theme overrides (see ChartTheme). Defaults to%{}.id(:string) - Unique ID for the chart (auto-generated if not provided). Defaults tonil.title(:string) - Chart title rendered above the visualization. Defaults tonil.description(:string) - Chart description for context (rendered below title). Defaults tonil.class(:string) - Defaults tonil.- Global attributes are accepted.