hydroxy

Icicle chart

A tree as rows of rectangles, one row per level, each as wide as its share of the row above. Click a cell to drill in; the top row or breadcrumb climbs back out.

main.jsnode_modulesreact-domclientdate-fnslocalechart.jscontro…scal…coreloda…srcpagesdashb…componen…ta…pol…
Bundle size by module
NodeValue
main.js428 kB
main.js > node_modules309 kB
main.js > node_modules > react-dom130 kB
main.js > node_modules > react-dom > client118 kB
main.js > node_modules > react-dom > server12 kB
main.js > node_modules > date-fns62 kB
main.js > node_modules > date-fns > locale46 kB
main.js > node_modules > date-fns > format9 kB
main.js > node_modules > date-fns > parse7 kB
main.js > node_modules > chart.js93 kB
main.js > node_modules > chart.js > controllers31 kB
main.js > node_modules > chart.js > scales24 kB
main.js > node_modules > chart.js > core38 kB
main.js > node_modules > lodash24 kB
main.js > src100 kB
main.js > src > pages53 kB
main.js > src > pages > dashboard28 kB
main.js > src > pages > settings14 kB
main.js > src > pages > billing11 kB
main.js > src > components39 kB
main.js > src > components > table17 kB
main.js > src > components > forms13 kB
main.js > src > components > charts9 kB
main.js > src > api8 kB
main.js > polyfills19 kB

Usage

use hydroxy_leptos::icicle_chart::*;
use leptos::prelude::*;

fn module(name: &str, files: &[(&str, f64)]) -> Tree {
    Tree::branch(name, files.iter().map(|(n, v)| Tree::leaf(*n, *v)).collect())
}

pub fn demo() -> AnyView {
    // A web app's JavaScript bundle, in kB after minification.
    let bundle = Tree::branch(
        "main.js",
        vec![
            Tree::branch(
                "node_modules",
                vec![
                    module("react-dom", &[("client", 118.0), ("server", 12.0)]),
                    module("date-fns", &[("locale", 46.0), ("format", 9.0), ("parse", 7.0)]),
                    module("chart.js", &[("controllers", 31.0), ("scales", 24.0), ("core", 38.0)]),
                    Tree::leaf("lodash", 24.0),
                ],
            ),
            Tree::branch(
                "src",
                vec![
                    module("pages", &[("dashboard", 28.0), ("settings", 14.0), ("billing", 11.0)]),
                    module("components", &[("table", 17.0), ("forms", 13.0), ("charts", 9.0)]),
                    Tree::leaf("api", 8.0),
                ],
            ),
            Tree::leaf("polyfills", 19.0),
        ],
    );

    view! { <IcicleChart root=bundle label="Bundle size by module" format=|v: f64| format!("{v:.0} kB") /> }.into_any()
}

Anatomy

Componentdata-partRenders
IcicleChartrootfigure with a screen-reader table of every node
breadcrumbPath from the root to the current zoom; earlier steps are buttons
marksFocusable SVG; arrow keys move between cells
cellOne node's rectangle and label; `data-depth`, `data-leaf`, `data-active`
tooltipName, value and share of the zoomed node
legendTop-level branches when there are two or more

Keyboard

KeyDoes
Arrow keysMove between cells in tree order
Home / EndJump to the first or last cell
Enter / SpaceDrill into the focused cell, or out from the top row
EscapeClear the focused cell, then climb out

Props

PropTypeNotes
rootTreeRequired. Branch values come from their children
labelStringRequired. What the chart shows; the accessible name
heightu16Plot height in px at an 800px drawing width. Default 320
formatFn(f64) -> StringFormats values in the tooltip and table

Events

PropTypeNotes
on_hoverCallback<Option<Datum>>The mark under the pointer or keyboard focus changes, or is left. Fires only on a change
on_selectCallback<Datum>Click, tap or Enter on a mark
viewSignal<View>Controlled focused node. Uncontrolled when left off
on_view_changeCallback<View>Called when the focused node changes; not for changes that came from `view`
Actions
Button
Icon button
Toolbar
Theme menu
Display
Avatar
Badge
Card
Chip
Code block
Markdown
Doc card
Due pill
Kbd
Priority mark
Source chip
Space icon
Status diamond
Tag
Value diff
Carousel
Reveal
Media timeline
QR code
Transcript viewer
Audio waveform
Audio player
Forms
Calendar
Checkbox
Combobox
Date picker
Color picker
Cron builder
Theme editor
Mention input
Signature pad
Image cropper
Date field
Date range picker
Duration field
Quantity stepper
Filter chip
Input
Markdown editor
Radio group
Search field
Segmented control
Select
Slider
Range slider
Rating
Toggle button
File dropzone
Upload queue
Attachment
Switch
Tags input
Number field
Money field
Phone field
Time field
OTP input
Password field
Questionnaire
Availability picker
Voice input
Recording control
Inline edit
Async validated input
Shortcut recorder
Data
Spreadsheet grid
Week scheduler
Virtual list
Stat card
Step track
Kanban board
Sortable list
Filter builder
Data table
Grid
Access editor
File manager
Gantt chart
Log stream
Diff viewer
JSON inspector
Terminal
Node editor
Whiteboard
Navigation
Table of contents
Breadcrumb
Tabs
Wizard
Nav item
Nav section
Tree view
Pagination
Menubar
Navigation menu
Saved views
Layout
Master detail
App shell
Sidebar layout
Resizable panels
Dashboard layout
Dock layout
Feedback
Callout
Check list
Empty state
Progress bar
Toast
Approval card
Skeleton
Notification center
Bars
Bar chart
Diverging bar chart
Span chart
Pictogram chart
Stacked bar chart
Funnel chart
Bullet chart
Waffle chart
Marimekko chart
Dot plot chart
Error bar chart
Pareto chart
Waterfall chart
Lollipop chart
Grouped bar chart
Bar race chart
KPIs and frames
Chart frame
Metric card
Sparkline
Points
Scatter chart
Smith chart
Strip plot
Beeswarm chart
Parallel coordinates
Ternary chart
Bland-Altman chart
Quiver chart
Connected scatter chart
Grids and tables
Heatmap chart
Chart table
Cohort chart
Radial
Radial charts
Radar chart
Polar area chart
Stat ring
Clock chart
Spiral chart
Lines and areas
Bump chart
Slope chart
Line chart
Composed chart
Small multiples
Cycle plot chart
Horizon chart
Stacked area chart
Threshold chart
Split line chart
Linked charts
Confidence band chart
Forecast fan chart
Step chart
Range area chart
Distributions
Contour chart
Histogram
Box plot
Density chart
Ridgeline chart
Violin chart
Q-Q chart
Survival chart
ECDF chart
Raincloud plot
Forest plot
Maps
Geo map
Bubble map
Hexbin map
Cartogram
Flow map
Parts of a whole
Donut chart
Voronoi treemap
Nested donut chart
Treemap chart
Sunburst chart
Bubble pack chart
Icicle chart
Flame graph chart
Pie chart
Word cloud
Relationships
Sankey chart
Network chart
Chord chart
UpSet chart
Venn chart
Alluvial chart
Adjacency matrix chart
Dependency graph chart
Tree chart
Arc diagram
Hive plot
Edge bundling
Finance
Candlestick chart
OHLC chart
Depth chart
Renko chart
Time
Timeline chart
Calendar heatmap chart
Spectrogram chart
Marey chart
Overlays
Tour
Lightbox
Alert dialog
Command palette
Dialog
Menu
Popover
Tooltip
Sheet
Hover card
Context menu
Utilities
Pacer
Hotkeys
Disclosure
Accordion
Collapsible
Chat
Chat bubble
Voice session
Composer
Thread
Thread list
Assistant composer
Assistant MCP
Assistant modal
Assistant thread
Assistant thread list
Message scroller
Insight note
Emoji picker
Tool trace
Model picker
Citation popover
Activity
Activity feed
Comment thread
Timeline
Presence bar
Live cursors
Reaction bar
Guides
Getting started
All components
All charts