hydroxy

Edge bundling

Hierarchical edge bundling: the leaves of a tree sit round a circle and each link follows the tree between them, so links between the same branches gather into bundles. Hover, touch or step to a leaf to see what it links to in one colour and what links to it in another.

Module imports
LeafGroupImportsImported by
ButtonuiThemeDialog, Form
DialoguiButton, Theme
FormuiButton, Schema, Store
TableuiQuery, Theme, Store
ChartuiTheme, Query
Themeui Table, Chart, Dialog, Button
StorestateCache, SyncForm, Table, Session, Sync
RouterstateSession, Metrics
SessionstateAuth, StoreRouter
CachestateLoggerStore, Query
ClientdataAuth, Config, Logger, MetricsQuery, Sync
SchemadataLoggerForm, Query
QuerydataClient, Cache, SchemaTable, Chart
SyncdataClient, StoreStore
LoggerplatformConfigCache, Client, Schema, Auth
MetricsplatformConfigRouter, Client
Configplatform Client, Auth, Metrics, Logger
AuthplatformConfig, LoggerSession, Client

Usage

use hydroxy_leptos::edge_bundling_chart::*;
use leptos::prelude::*;

fn package(name: &str, modules: &[&str]) -> Tree {
    Tree::branch(name, modules.iter().map(|m| Tree::leaf(*m, 1.0)).collect())
}

#[component]
pub fn Demo() -> impl IntoView {
    let tree = Tree::branch(
        "app",
        vec![
            package("ui", &["Button", "Dialog", "Form", "Table", "Chart", "Theme"]),
            package("state", &["Store", "Router", "Session", "Cache"]),
            package("data", &["Client", "Schema", "Query", "Sync"]),
            package("platform", &["Logger", "Metrics", "Config", "Auth"]),
        ],
    );
    // Which module imports which.
    let imports = [
        ("Dialog", "Button"),
        ("Form", "Button"),
        ("Form", "Schema"),
        ("Form", "Store"),
        ("Table", "Query"),
        ("Table", "Theme"),
        ("Table", "Store"),
        ("Chart", "Theme"),
        ("Chart", "Query"),
        ("Dialog", "Theme"),
        ("Button", "Theme"),
        ("Store", "Cache"),
        ("Store", "Sync"),
        ("Router", "Session"),
        ("Router", "Metrics"),
        ("Session", "Auth"),
        ("Session", "Store"),
        ("Cache", "Logger"),
        ("Client", "Auth"),
        ("Client", "Config"),
        ("Client", "Logger"),
        ("Client", "Metrics"),
        ("Query", "Client"),
        ("Query", "Cache"),
        ("Query", "Schema"),
        ("Sync", "Client"),
        ("Sync", "Store"),
        ("Schema", "Logger"),
        ("Auth", "Config"),
        ("Auth", "Logger"),
        ("Metrics", "Config"),
        ("Logger", "Config"),
    ];
    let links: Vec<Link> = imports.iter().map(|(a, b)| Link::new(*a, *b, 1.0)).collect();

    view! { <EdgeBundlingChart tree=tree links=links label="Module imports" out_label="Imports" in_label="Imported by" /> }
}

Anatomy

Componentdata-partRenders
EdgeBundlingChartrootfigure; `data-active` while a leaf is picked out
plotFocusable group holding the drawing and the tooltip
linkB-spline routed through the tree; `data-role` is `out` or `in` relative to the picked leaf
leafDot and rotated label on the ring; `data-role` is `target`, `source` or `both` relative to the picked leaf, `data-selected` on the picked leaf
tooltipGroup and the number of links each way
legendThe two link colours
sr-liveAnnounces the picked leaf
sr-tableEvery leaf with its group and what it links to and from

Keyboard

KeyDoes
ArrowRight / ArrowLeftStep clockwise or anticlockwise round the circle
Home / EndJump to the first or last leaf
EscapeClear the picked leaf

Props

PropTypeNotes
treeTreeRequired. Tree::branch(name, children) and Tree::leaf(name, value); leaves go round the circle in order
linksVec<Link>Required. Link::new(from, to, value) by leaf name; values are ignored
labelStringRequired. What the chart shows; the accessible name
betaf64Bundling strength from 0 (straight) to 1 (follows the tree). Default 0.85
out_label / in_labelStringWhat a link means each way. Default "Links to" and "Linked from"
sizeu16Drawing width and height in px. Default 600

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
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