Skip to content

Network Graph

ChartsSince 0.13.0

Accessible SVG network graph: nodes and edges laid out by a deterministic force-directed simulation (seeded; it settles, then stops). The settling animates only when animation is allowed and the user has not asked for reduced motion. Node groups get palette colors and marker shapes; nodes can be pinned by dragging or with Shift+Arrow; zoom and pan use the shared chart zoom. Arrow keys move between connected nodes, neighbors are highlighted on focus, and the data table is an adjacency list.

  • Deterministic layoutA seeded force simulation that settles and stops; reduced motion skips the animation.
  • Neighbor navigationArrow keys move to the connected node in that direction; neighbors light up on focus.
  • Pin by drag or keyDrag a node or press Shift with an arrow key to pin it; U unpins.
  • Adjacency tableEvery connection, with weights, in an accessible table.

Use it for

  • Relationships between entities: team collaboration, service dependencies, referral networks.
  • Spotting clusters, hubs, and isolated nodes.

Use something else for

  • Hierarchies: use Org Chart or Treemap.
  • Flows with quantities between stages: use Funnel Chart or Bar Chart.
  • Thousands of nodes: a force layout becomes a hairball; aggregate first.
Anatomy
<div class="aui-chart aui-network-graph [aui-network-graph--lit aui-chart--zoomable]">
<div class="aui-chart__header">title, description, <div class="aui-chart__toolbar">zoom buttons</div></div>
<ul class="aui-chart__legend">group toggle buttons</ul>
<div class="aui-chart__body">
<svg class="aui-chart__svg" role="group" aria-roledescription="network graph" aria-labelledby="T" aria-describedby="S">
<g class="aui-network-graph__edges" aria-hidden="true"><line class="aui-network-graph__edge"/>...</g>
<g class="aui-network-graph__nodes"><g class="aui-network-graph__node-group aui-chart__series--c1"><path class="aui-network-graph__node aui-chart__mark" role="img" aria-label="Ana, Design, 2 connections: Ben and Dev" tabindex="0"/></g>...</g>
<g class="aui-network-graph__labels" aria-hidden="true">...</g>
</svg>
<div class="aui-chart__tooltip" aria-hidden="true" hidden/>
</div>
<p class="aui-chart__summary" hidden/> <div class="aui-chart__data">Show data table, adjacency table</div>
</div>

Use the bar above each frame to switch theme, density, direction, and locale.

Network Graph in the Advanced visualizations showcase

Section titled “Network Graph in the Advanced visualizations showcase”

The part of the Advanced visualizations showcase that uses Network Graph. Change its options, use it with the keyboard, and watch the event log; the link in the frame opens the full showcase. The bar above the frame switches theme, density, direction, and locale.

Showcase source
// Advanced visualizations showcase: an illustrative share price as candles on a trading-day axis, team collaboration as a network
// graph, and absences in a calendar heatmap with holidays. All data is small, inline, and
// made up. Style and animation are switchable; events are logged.
import { plainDate, type PlainDate } from '@absoluteui/core';
import { createBusinessCalendar } from '@absoluteui/components/business-calendar';
import { CalendarHeatmap } from '@absoluteui/components/calendar-heatmap';
import { CandlestickChart, type CandlestickPoint } from '@absoluteui/components/candlestick-chart';
import { NetworkGraph } from '@absoluteui/components/network-graph';
import { action, chartControls, chartLook, choice, createShowcase, hostIn, section, toggle } from './kit.js';
const sc = createShowcase({
title: 'Advanced visualizations',
description: 'Three special charts on the same chart layer: prices, networks, and calendars. Each one works with the keyboard, has a data table, and follows the theme.',
});
const calendar = createBusinessCalendar({
holidays: [
{ date: plainDate(2026, 1, 1), name: 'New Year' },
{ date: plainDate(2026, 4, 3), name: 'Good Friday' },
{ date: plainDate(2026, 4, 6), name: 'Easter Monday' },
{ date: plainDate(2026, 5, 1), name: 'Labour Day' },
],
});
// 1. Share price on trading days (weekends and the holidays above are skipped).
const s2 = section(sc, 'Share price', ['candlestick-chart']);
const sessions: CandlestickPoint[] = [];
{
let date: PlainDate = plainDate(2026, 3, 2);
let price = 48;
for (let i = 0; i < 90; i++) {
const open = price;
const close = Math.round((open * (1 + Math.sin(i / 5) * 0.015 + Math.cos(i / 2) * 0.01 + 0.002)) * 100) / 100;
const spread = open * 0.012;
sessions.push({ date, open, close, high: Math.round((Math.max(open, close) + spread) * 100) / 100, low: Math.round((Math.min(open, close) - spread) * 100) / 100, volume: 40000 + ((i * 7919) % 30000) });
price = close;
date = calendar.addWorkingDays(date, 1);
}
}
const candles = CandlestickChart.create(hostIn(s2), {
label: 'Share price (illustrative)',
description: 'Trading days only: weekends and public holidays take no space. Zoom with the toolbar, + and -, or Ctrl and the wheel.',
data: sessions,
businessCalendar: calendar,
movingAverages: [{ period: 10 }, { period: 30, style: { dash: 'dashed' } }],
valueFormat: { style: 'currency', currency: 'EUR' },
zoom: true,
zoomRange: { from: 40, to: 89 },
height: 340,
});
const grid = hostIn(sc.stage);
grid.className = 'sc-grid';
const networkSection = section(sc, 'Team collaboration', ['network-graph']);
const absenceSection = section(sc, 'Absences', ['calendar-heatmap']);
grid.append(networkSection, absenceSection);
// 2. Team collaboration.
const network = NetworkGraph.create(hostIn(networkSection), {
label: 'Team collaboration',
description: 'Drag a person to pin them, or press Shift and an arrow key. Arrow keys move to a connected person.',
nodes: [
{ id: 'ana', label: 'Ana', group: 'design', value: 6 },
{ id: 'ben', label: 'Ben', group: 'eng', value: 9 },
{ id: 'chi', label: 'Chi', group: 'eng', value: 7 },
{ id: 'dev', label: 'Dev', group: 'product', value: 8 },
{ id: 'eli', label: 'Eli', group: 'eng', value: 4 },
{ id: 'fay', label: 'Fay', group: 'design', value: 3 },
{ id: 'gus', label: 'Gus', group: 'data', value: 5 },
{ id: 'hal', label: 'Hal', group: 'data', value: 2 },
{ id: 'ivy', label: 'Ivy', group: 'product', value: 4 },
{ id: 'jon', label: 'Jon' },
],
edges: [
{ source: 'ana', target: 'ben', weight: 4 },
{ source: 'ana', target: 'fay', weight: 3 },
{ source: 'ben', target: 'chi', weight: 6 },
{ source: 'ben', target: 'eli', weight: 2 },
{ source: 'chi', target: 'dev', weight: 3 },
{ source: 'dev', target: 'ana', weight: 2 },
{ source: 'dev', target: 'ivy', weight: 4 },
{ source: 'gus', target: 'chi', weight: 2 },
{ source: 'gus', target: 'hal', weight: 3 },
{ source: 'ivy', target: 'gus' },
],
groups: [
{ id: 'design', label: 'Design' },
{ id: 'eng', label: 'Engineering' },
{ id: 'product', label: 'Product' },
{ id: 'data', label: 'Data' },
],
height: 340,
});
// 3. Absences over the first half of the year.
const absences = CalendarHeatmap.create(hostIn(absenceSection), {
label: 'Absences, January to June',
description: 'Dashed squares are weekends; dots are public holidays.',
from: plainDate(2026, 1, 1),
to: plainDate(2026, 6, 30),
data: Array.from({ length: 181 }, (_, i) => {
const date = calendar.addWorkingDays(plainDate(2025, 12, 31), 1 + Math.floor(i * 0.7));
return { date, value: (i * 13) % 7 };
}),
businessCalendar: calendar,
colorScale: { color: 4, steps: 4 },
height: 200,
});
for (const [name, chart] of [
['candles', candles],
['network', network],
['calendar', absences],
] as const) {
sc.listen(chart.host, ['aui-series-toggle', 'aui-zoom', 'aui-point-click', 'aui-node-pin'], name);
}
chartControls(sc, [candles, network, absences]);
chartLook(sc, [candles, network, absences]);
choice(
sc,
'Candles',
[
{ value: 'candle', label: 'Candles' },
{ value: 'ohlc', label: 'OHLC bars' },
],
'candle',
(type) => {
candles.update({ type });
},
['candlestick-chart'],
);
toggle(sc, 'Trading days only', true, (on) => {
candles.update({ businessCalendar: on ? calendar : null, zoomRange: null });
}, ['candlestick-chart']);
action(sc, 'Re-run network layout', () => {
network.relayout();
}, ['network-graph']);
import { NetworkGraph } from '@absoluteui/components/network-graph';
const host = document.createElement('div');
document.body.append(host);
NetworkGraph.create(host, {
label: 'Team collaboration',
nodes: [
{ id: 'ana', label: 'Ana', group: 'design' },
{ id: 'ben', label: 'Ben', group: 'eng' },
{ id: 'chi', label: 'Chi', group: 'eng' },
{ id: 'dev', label: 'Dev', group: 'product' },
],
edges: [
{ source: 'ana', target: 'ben', weight: 3 },
{ source: 'ben', target: 'chi', weight: 5 },
{ source: 'chi', target: 'dev' },
{ source: 'dev', target: 'ana' },
],
groups: [
{ id: 'design', label: 'Design' },
{ id: 'eng', label: 'Engineering' },
{ id: 'product', label: 'Product' },
],
});
import { NetworkGraph, type NetworkGraphNodePinDetail } from '@absoluteui/components/network-graph';
const host = document.querySelector<HTMLElement>('#deps');
if (host) {
const graph = NetworkGraph.create(host, {
label: 'Service dependencies',
nodes: [{ id: 'web', label: 'Web' }, { id: 'api', label: 'API' }, { id: 'db', label: 'Database' }],
edges: [{ source: 'web', target: 'api' }, { source: 'api', target: 'db' }],
directed: true,
seed: 7,
pinned: [{ id: 'db', x: 0, y: 0 }],
});
host.addEventListener('aui-node-pin', (e) => {
const detail = (e as CustomEvent<NetworkGraphNodePinDetail>).detail;
if (!detail.pinned) graph.relayout();
});
}
Terminal window
npm install @absoluteui/components @absoluteui/core @absoluteui/theme

Registry setup, the theme stylesheet, and the Content Security Policy are covered in Installation.

import { NetworkGraph } from '@absoluteui/components/network-graph';
import '@absoluteui/components/network-graph/style.css';
import { NetworkGraph } from '@absoluteui/components/network-graph';
import '@absoluteui/components/network-graph/style.css';
const host = document.querySelector<HTMLElement>('#network');
if (host) {
NetworkGraph.create(host, {
label: 'Referrals',
nodes: [{ id: 'a', label: 'Alpha' }, { id: 'b', label: 'Beta' }, { id: 'c', label: 'Gamma' }],
edges: [{ source: 'a', target: 'b' }, { source: 'a', target: 'c' }],
animate: false,
});
}
More usage

Team collaboration:

import { NetworkGraph } from '@absoluteui/components/network-graph';
const host = document.createElement('div');
document.body.append(host);
NetworkGraph.create(host, {
label: 'Team collaboration',
nodes: [
{ id: 'ana', label: 'Ana', group: 'design' },
{ id: 'ben', label: 'Ben', group: 'eng' },
{ id: 'chi', label: 'Chi', group: 'eng' },
{ id: 'dev', label: 'Dev', group: 'product' },
],
edges: [
{ source: 'ana', target: 'ben', weight: 3 },
{ source: 'ben', target: 'chi', weight: 5 },
{ source: 'chi', target: 'dev' },
{ source: 'dev', target: 'ana' },
],
groups: [
{ id: 'design', label: 'Design' },
{ id: 'eng', label: 'Engineering' },
{ id: 'product', label: 'Product' },
],
});

Directed edges, pins, and the pin event:

import { NetworkGraph, type NetworkGraphNodePinDetail } from '@absoluteui/components/network-graph';
const host = document.querySelector<HTMLElement>('#deps');
if (host) {
const graph = NetworkGraph.create(host, {
label: 'Service dependencies',
nodes: [{ id: 'web', label: 'Web' }, { id: 'api', label: 'API' }, { id: 'db', label: 'Database' }],
edges: [{ source: 'web', target: 'api' }, { source: 'api', target: 'db' }],
directed: true,
seed: 7,
pinned: [{ id: 'db', x: 0, y: 0 }],
});
host.addEventListener('aui-node-pin', (e) => {
const detail = (e as CustomEvent<NetworkGraphNodePinDetail>).detail;
if (!detail.pinned) graph.relayout();
});
}

Using Angular? See Network Graph for Angular.

NetworkGraph.create(host: HTMLElement, options: NetworkGraphOptions): NetworkGraph

Global configuration key: networkGraph (see Configuration).

Option Type Default Description
label string Chart title: visible text and the accessible name of the plot (aria-labelledby); also the data table caption. Required.
hideLabel boolean false Visually hide the title; it stays the accessible name.
description string Visible description below the title, also referenced by aria-describedby (text only).
summary string Replaces the generated accessible summary (node, edge, and group counts, the most connected node, nodes without connections, hidden groups).
valueFormat Intl.NumberFormatOptions Number format for values in the tooltip and table.
formatValue (value: number) => string Custom value text; overrides valueFormat everywhere.
hiddenSeries readonly string[] Ids of hidden groups (legend toggles): their nodes and edges are not drawn and not reachable.
theme ChartTheme Look and feel: { palette?: string[] (1-8 CSS colors for slots 1-8); fontFamily?; fontSize? (8-32 px); textColor?; gridLines?: boolean; gridColor?; gridDash?; axisColor?; lineWidth?; markerSize?; cornerRadius?; barRadius?; cellRadius?; sliceRadius?; boxRadius?; swatchRadius?; tooltipRadius?; controlRadius?; lineJoin?; areaOpacity?; gradient?; valueLabelColor?; tooltip?: { background?, color?, borderColor? }; legendPosition?: ‘top’ | ‘bottom’ | ‘start’ | ‘end’; animation?: boolean | { duration?: number } }. Applied as –aui-chart-* custom properties and classes on the host through the CSSOM (CSP-safe); colors are validated with CSS.supports(‘color’). Animation is opt-in and never runs with prefers-reduced-motion: reduce or [data-aui-animation=‘none’].
renderTooltip (context: ChartTooltipContext) => Node | null Custom tooltip content as DOM nodes (never HTML strings). context: { title, rows: { label, value, seriesId }[], column, row, source: “pointer” | “focus” | “sync” }. Return null for the default tooltip. The tooltip stays aria-hidden; the focused mark keeps its accessible label.
syncGroup string Shared chart option; a network graph has no column concept, so it has no effect.
nodes readonly NetworkNode[] Nodes: { id: string (unique, non-empty); label: string; group?: string (color, shape, legend); value?: number >= 0 (radius grows with its square root) }. At most 1,000. Required.
edges readonly NetworkEdge[] Edges: { source: node id; target: node id (not the source); weight?: positive number (line thickness, table) }. At most 5,000. Required.
groups readonly NetworkGroup[] Group labels, colors, and legend order: { id; label; color?: 1-8; colorValue?: CSS color }. Default: groups in order of first appearance, labelled by id; nodes without a group share one labelled “Other”.
directed boolean false Draw arrowheads at edge targets.
seed number 1 Layout seed (integer 0-4294967295): the same data and seed always give the same layout.
linkDistance number 60 Preferred edge length in layout units (10-400).
charge number 120 Node repulsion (1-2000).
pinned readonly NetworkPin[] Nodes fixed at a position in layout units: { id; x; y } (the coordinate space of positions). Dragging and Shift+Arrow add pins.
zoom boolean true Zoom and pan: toolbar buttons, + / - / 0 keys, Ctrl/Cmd + wheel, drag on the background to pan, Shift + drag to select.
legend 'auto' | 'show' | 'hide' "auto" Legend of node groups (toggle buttons): auto shows it with more than one group, show always, hide never. Globally configurable.
dataTable 'toggle' | 'visible' | 'hidden' | 'none' "toggle" Data table fallback (an adjacency list: node, group, connection count, connected nodes with weights): behind a Show data table button (built on first open), always visible, visually hidden (screen readers only), or none. Globally configurable.
tooltip boolean true Tooltip on pointer hover and keyboard focus. Globally configurable.
patterns boolean false Shared chart option; groups already differ by marker shape, so it has no extra effect. Globally configurable.
height number 400 Plot height in CSS px (integer 120-2000); the width follows the container. Globally configurable.
nodeLabels 'auto' | 'always' | 'none' "auto" Node labels: auto (graphs up to 50 visible nodes), always, or none. Globally configurable.
animate boolean true Animate the layout settling; never with prefers-reduced-motion: reduce or animation: ‘none’ (the final layout is then computed before the first paint). Globally configurable.
locale string "en-US" Number, date, and message locale. Globally configurable. Inherited from common configuration.
direction 'ltr' | 'rtl' "ltr" rtl puts node labels on the left; the layout is not mirrored. Globally configurable. Inherited from common configuration.
Property Type Description
host HTMLElement The host element.
element SVGSVGElement The plot (svg role=“group”), named by the title and described by the summary.
summary string The generated (or custom) accessible summary.
hiddenSeries string[] Ids of hidden items (legend toggles).
positions Record<string, { x: number; y: number }> Current node positions in layout units, by node id.
pins NetworkPin[] Pinned nodes.
Method Description
update(options: Partial<NetworkGraphOptions>): void Merge, validate, and re-render. Invalid options throw and keep the previous state. Keyboard focus stays on the same mark.
setSeriesVisible(id: string, visible: boolean): void Show or hide an item programmatically (no event).
relayout(): void Run the layout again from the current positions; pinned nodes stay.
unpinAll(): void Remove every pin (no event); call relayout() to let the nodes move.
destroy(): void Remove rendering, host classes, listeners, the resize observer, timers, and the configuration subscription.
Event Detail Bubbles Cancelable Description
aui-point-click NetworkGraphPointClickDetail = ChartPointClickDetail: { seriesId: string | null; column: number; row: number; label: string; series: string; value: string; source: 'pointer' | 'keyboard' } Yes No A node was activated: pointer click or tap, or Enter / Space on the focused node. seriesId is the node id, series its group, value its connection count.
aui-node-pin NetworkGraphNodePinDetail: { id: string; pinned: boolean; x: number; y: number; pins: NetworkPin[]; source: 'pointer' | 'keyboard' | 'api' } Yes No A node was pinned (drag end or Shift+Arrow) or unpinned (U); also announced politely.
aui-series-toggle NetworkGraphSeriesToggleDetail: { id: string; visible: boolean; hidden: string[] } Yes No A group was shown or hidden from the legend.
aui-zoom NetworkGraphZoomDetail: { x: ChartZoomRange | null; y: ChartZoomRange | null; reason } Yes No The visible window changed (fractions 0-1 of the layout bounds).

All rules live in the aui.components cascade layer, so application styles override them without specificity battles.

Class Purpose
aui-chart Host (shared chart chrome).
aui-network-graph Host modifier for this chart type.
aui-chart__header / __title / __title--hidden / __description / __toolbar Title, description, and the toolbar (zoom buttons).
aui-chart__legend / __legend-entry / __legend-item / __legend-label / __swatch Legend and its aria-hidden keys.
aui-chart__body / __svg / __layer Plot container (height from –aui-chart-height), SVG, and drawing layer.
aui-chart__series--c1 ... --c8 Palette slot classes; set –aui-chart-color from –aui-chart-<n>.
aui-chart__mark / __mark--active / __mark--hover Focusable marks and their states.
aui-chart__tooltip / __tooltip--custom / __tooltip-title / __tooltip-row Tooltip (aria-hidden; the focused mark carries the same text).
aui-chart__empty / __summary Empty state text and the hidden summary referenced by aria-describedby.
aui-chart__data / __data--hidden / __table-toggle / __table-scroll / __table Data table fallback.
aui-chart--legend-bottom / --legend-start / --legend-end / --animate / --entering theme.legendPosition and theme.animation.
aui-network-graph--lit A neighborhood is highlighted (focus or hover); the rest fades.
aui-network-graph__edges / __edge / __arrow aria-hidden edges and arrowheads.
aui-network-graph__nodes / __node-group / __node / __node--pinned Nodes (focusable marks, marker shape per group) and pinned nodes.
aui-network-graph__lit Elements of the highlighted neighborhood.
aui-network-graph__labels / __label aria-hidden node labels with a surface halo.
aui-chart--zoomable / --zoomed / aui-chart__zoom / __tool / __brush Zoom toolbar and selection brush.

Tokens this stylesheet reads (verified in CI). Override them in a theme or with the Theme Designer.

--aui-border-width | --aui-color-border | --aui-color-border-strong | --aui-color-chart-1 | --aui-color-chart-2 | --aui-color-chart-3 | --aui-color-chart-4 | --aui-color-chart-5 | --aui-color-chart-6 | --aui-color-chart-7 | --aui-color-chart-8 | --aui-color-chart-axis | --aui-color-chart-grid | --aui-color-error-fg | --aui-color-focus-ring | --aui-color-hover | --aui-color-info-fg | --aui-color-link | --aui-color-success-fg | --aui-color-surface | --aui-color-surface-sunken | --aui-color-text | --aui-color-text-muted | --aui-color-warning-fg | --aui-duration-fast | --aui-easing-standard | --aui-focus-ring-offset | --aui-focus-ring-width | --aui-font-family-sans | --aui-font-size-md | --aui-font-size-sm | --aui-font-size-xs | --aui-font-weight-medium | --aui-font-weight-regular | --aui-font-weight-semibold | --aui-line-height-normal | --aui-line-height-tight | --aui-radius-md | --aui-radius-sm | --aui-shadow-md | --aui-space-1 | --aui-space-2 | --aui-space-3 | --aui-tooltip-max-width | --aui-touch-target-min

TypeScript definitions
type NetworkGraphNodeLabels = 'auto' | 'always' | 'none';
interface NetworkGraphConfig extends ChartBaseConfig { nodeLabels: NetworkGraphNodeLabels; animate: boolean }
interface NetworkNode { id: string; label: string; group?: string; value?: number }
interface NetworkEdge { source: string; target: string; weight?: number }
interface NetworkGroup { id: string; label: string; color?: ChartColor; colorValue?: string }
interface NetworkPin { id: string; x: number; y: number }
interface NetworkGraphOptions extends ChartCommonOptions, Partial<NetworkGraphConfig> {
nodes: readonly NetworkNode[];
edges: readonly NetworkEdge[];
groups?: readonly NetworkGroup[];
directed?: boolean;
seed?: number;
linkDistance?: number;
charge?: number;
pinned?: readonly NetworkPin[];
zoom?: boolean;
}

Pattern: SVG node-link diagram as a named, described group (role=“group” with aria-roledescription “network graph”) of role=“img” nodes with roving focus and neighbor navigation; legend of group toggle buttons; zoom toolbar; adjacency-list data table.

Checked on every docs build: the showcase passes axe (WCAG 2.2 A and AA rules) in the default, dark, and high-contrast themes and right to left; the playground loads without errors and passes axe before and after every on/off option is switched, with no Content Security Policy violations.

Key Context Action
ArrowLeft / ArrowRight / ArrowUp / ArrowDown Node focused The connected node closest to that direction (within 60 degrees); nothing happens when there is none.
PageDown / PageUp Node focused Next / previous node in data order (reaches nodes without connections).
Home / End Node focused First / last node in data order.
Shift + Arrow keys Node focused Move the node 10px and pin it (the keyboard alternative to dragging, aui-node-pin).
U Node focused, pinned Unpin the node (aui-node-pin).
+ / = and - / _ Mark focused, zoom on Zoom in / out around the focused mark (announced politely, aui-zoom).
0 Mark focused, zoom on Reset the zoom.
Enter / Space Mark focused Fires aui-point-click with source “keyboard”.
Escape Tooltip visible Hides the tooltip without moving focus (WCAG 1.4.13); it returns on the next move.
Tab / Shift+Tab Any One tab stop for the plot (the active mark), the zoom buttons, the legend buttons, then the Show data table button and the table region.
Element Role
svg.aui-chart__svg group with aria-roledescription “network graph” (localized), named by the title
nodes (path.aui-network-graph__node) img with an aria-label: label, group, connection count, and up to five neighbors
legend list of toggle buttons (aria-pressed) for groups
data table table (native): node, group, connections, connected to
edges, arrowheads, labels, tooltip aria-hidden (the adjacency is in names and the table)
Attribute Element Value
aria-labelledby svg id of the visible (or visually hidden) title
aria-describedby svg description id (when provided) and the generated summary id
aria-roledescription svg Localized “network graph”
tabindex active mark 0 on exactly one mark (roving); other marks have none
aria-expanded / aria-controls Show data table button Table open state and the table region id
aria-label each mark Localized: label, group, connection count, and up to five neighbors

Roving focus: one node is in the tab sequence and keeps the last visited node across re-renders, layout, and zoom. Focusing a node highlights it, its neighbors, and its edges.

Criterion Level Note
1.1.1 Non-text Content A
1.3.1 Info and Relationships A
1.4.1 Use of Color A
1.4.3 Contrast (Minimum) AA
1.4.10 Reflow AA
1.4.11 Non-text Contrast AA
1.4.13 Content on Hover or Focus AA
2.1.1 Keyboard A
2.2.2 Pause, Stop, Hide A
2.3.3 Animation from Interactions AAA
2.4.3 Focus Order A
2.4.7 Focus Visible AA
2.5.7 Dragging Movements AA
4.1.2 Name, Role, Value A

Automated test results: Accessibility and compliance.

  • Groups differ by color and marker shape; each node name carries its group and neighbors; the adjacency table lists every connection.
  • The layout animation stops by itself (about five seconds at most) and never runs with reduced motion (WCAG 2.2.2, 2.3.3).
  • Dragging has single-pointer and keyboard alternatives: Shift+Arrow moves and pins, U unpins (WCAG 2.5.7).
  • Manual screen-reader verification (NVDA, JAWS, VoiceOver, TalkBack) is pending.
  • Directional navigation depends on the layout; PageUp / PageDown always reach every node.
Import cost Minified gzip brotli CSS brotli
@absoluteui/components/network-graph 89.4 kB 30.8 kB 27.0 kB 2.5 kB

Measured at build time, including every AbsoluteUI module the component pulls in. No third-party runtime dependencies.

Budget (enforced in CI) Limit
NetworkGraph.create with 150 nodes and 300 edges, synchronous layout (reduced motion) and the first render < 250 ms in headless Chromium

Tested scale: Designed for up to about 300 nodes and 1,000 edges; at most 1,000 nodes and 5,000 edges are accepted (the layout cools faster above 300 nodes, since repulsion is O(n^2) per step).

Budget: NetworkGraph.create with 150 nodes and 300 edges, synchronous layout (reduced motion) and the first render < 250 ms in headless Chromium. One number formatter per render; the data table is built lazily.

Measured run times: Performance.

States

laying out (animated settle); settled; node focused or hovered (neighbors highlighted); node pinned; zoomed; group hidden (legend); empty (no nodes: No data); table open.

State transitions
From Trigger To
created layout (animated or synchronous) settled
plot not focused Tab active node focused, neighborhood highlighted, tooltip shown
node focused arrow keys / PageUp / PageDown / Home / End another node focused
node drag or Shift+Arrow pinned (aui-node-pin)
pinned node U unpinned (aui-node-pin)
any legend button group hidden or shown (aui-series-toggle)
any new nodes, edges, seed, linkDistance, charge, or pinned layout runs again from the current positions
Accessibility notes
  • Groups differ by color and marker shape; each node name carries its group and neighbors; the adjacency table lists every connection.
  • The layout animation stops by itself (about five seconds at most) and never runs with reduced motion (WCAG 2.2.2, 2.3.3).
  • Dragging has single-pointer and keyboard alternatives: Shift+Arrow moves and pins, U unpins (WCAG 2.5.7).
  • Manual screen-reader verification (NVDA, JAWS, VoiceOver, TalkBack) is pending.
  • Directional navigation depends on the layout; PageUp / PageDown always reach every node.
Responsive behavior

The width follows the container (ResizeObserver); the layout is fitted to the plot keeping its aspect ratio, so it never overflows. Labels (auto) are shown for up to 50 visible nodes. Wide data tables scroll in a focusable region.

Right-to-left

direction rtl puts node labels on the left of the nodes. The layout itself is not mirrored (positions have no reading direction); arrow keys are spatial.

Theming

Nodes use their group palette slot (–aui-chart-<n>) and marker shape with a color-surface outline; edges use color-chart-axis; pinned nodes get a dashed color-text outline; the focused or hovered neighborhood stays opaque while the rest fades. Forced colors: CanvasText nodes and edges, Highlight for the neighborhood and focus.

Global configuration
configureAbsoluteUI({ components: { networkGraph: { nodeLabels: 'auto', animate: true, dataTable: 'visible' } } });

Changes apply to existing instances immediately.

Component configuration

Instance options override global and theme defaults. All options are dynamic.

Icons

The zoom toolbar uses the built-in plus, minus, and refresh icons (register replacements through the icon registry).

Security

All text uses textContent; SVG uses createElementNS; colors are classes or CSSOM custom properties. No innerHTML or style attributes.

Data handling

No persistence, network access, or telemetry.

Supported data scale

Designed for up to about 300 nodes and 1,000 edges; at most 1,000 nodes and 5,000 edges are accepted (the layout cools faster above 300 nodes, since repulsion is O(n^2) per step).

Edge cases
  • Nodes without edges are reachable with PageUp / PageDown and listed in the summary.
  • Duplicate edges between the same nodes are drawn on top of each other; their weights add up in the table.
  • Changing data keeps known nodes where they are and settles from there.
  • Pinned positions outside the layout extend the fitted bounds.
Errors

Invalid options throw a configuration error (code NETWORK_GRAPH_OPTIONS) naming the option and the expected value, before anything renders; update() with invalid options throws and keeps the previous state. Errors never include option values.

Known limitations
  • Pairwise repulsion is O(n^2) per step; very large graphs lay out slowly.
  • Dragging pins a node where it is dropped; other nodes keep their positions until the layout runs again (relayout() or new data).
  • Straight edges only; parallel edges overlap.
  • Manual screen-reader verification is pending.
Unsupported scenarios
  • Hierarchical, circular, or custom layouts.
  • Edge labels.
  • Editing nodes and edges by pointer.