Getting Started
Charts
- Charts
- Line Chart
- Bar Chart
- Area Chart
- Scatter Chart
- Pie Chart
- Donut Chart
- Dot Plot Chart
- Lollipop Chart
- Dumbbell Chart
- Slope Chart
- Range Chart
- Histogram Chart
- Box Plot Chart
- Violin Chart
- Polar Chart
- Parallel Coordinates
- SPLOM Chart
- Parcats Chart
- Candlestick Chart
- OHLC Chart
- Waterfall Chart
- Funnel Chart
- Heatmap Chart
- Contour Chart
- Density Chart
- Ternary Chart
- Radar Chart
- Treemap Chart
- Sunburst Chart
- Sankey Chart
- Gauge Chart
- Bullet Chart
- Icicle Chart
- Network Graph
- Dendrogram
- Choropleth Chart
"use client"
import { IcicleChart } from "@/components/ui/charts"
const data = {
name: "Company",
children: [
{
name: "Engineering",
children: [
{ name: "Frontend", value: 25, color: "#1e40af" },
{ name: "Backend", value: 30, color: "#2563eb" },
{ name: "DevOps", value: 15, color: "#3b82f6" },
{ name: "QA", value: 12, color: "#60a5fa" },
],
},
{
name: "Product",
children: [
{ name: "Design", value: 18, color: "#1e40af" },
{ name: "Research", value: 10, color: "#2563eb" },
{ name: "Analytics", value: 8, color: "#3b82f6" },
],
},
{
name: "Sales",
children: [
{ name: "Enterprise", value: 22, color: "#1e40af" },
{ name: "SMB", value: 15, color: "#2563eb" },
{ name: "Partners", value: 10, color: "#3b82f6" },
],
},
{
name: "Operations",
children: [
{ name: "HR", value: 12, color: "#1e40af" },
{ name: "Finance", value: 10, color: "#2563eb" },
{ name: "Legal", value: 5, color: "#3b82f6" },
],
},
],
}
export function IcicleChartDemo() {
return (
<div className="mx-auto w-full max-w-lg">
<IcicleChart data={data} orientation="vertical" showLabels />
</div>
)
}
About
The Icicle Chart displays hierarchical data as nested rectangles. Unlike treemap which uses area, icicle charts use length to represent values and show hierarchy through horizontal or vertical stacking.
Installation
pnpm dlx shadcn@latest add https://ui.simplifying.ai/r/icicle-chart.json
Usage
import { IcicleChart } from "@/components/ui/charts"
const data = {
name: "Company",
children: [
{
name: "Engineering",
children: [
{ name: "Frontend", value: 25 },
{ name: "Backend", value: 30 },
],
},
],
}
export function Example() {
return <IcicleChart data={data} orientation="vertical" />
}API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| data | IcicleNode | required | Hierarchical data structure |
| orientation | "horizontal" | "vertical" | "vertical" | Chart orientation |
| showLabels | boolean | true | Show segment labels |
| labelMinSize | number | 40 | Minimum size to show labels |
| padding | number | 1 | Padding between segments |
Notes
- The icicle chart is ideal for displaying hierarchical data with depth and proportional values
- Unlike treemaps which use area to represent values, icicle charts use length (width or height)
- The vertical orientation stacks hierarchy from top to bottom, with parent nodes at the top
- The horizontal orientation displays hierarchy from left to right, with parent nodes on the left
- Labels are automatically hidden when segments are too small to accommodate them (controlled by
labelMinSize) - The component automatically calculates segment sizes based on the sum of child values
- Padding between segments can be adjusted for visual clarity and separation
- Hierarchical navigation is naturally represented through the stacked rectangular layout
- Colors are automatically assigned to different hierarchy levels and branches
- The chart is particularly effective for organizational structures, file systems, and budget breakdowns
Deploy and Scale Agents with Simplifying AI
Simplifying AI delivers the infrastructure and developer experience you need to ship reliable audio & agent applications at scale.
Talk to an expert