sy-network-graph

Network Graph

Explore entities and their connections as a network.

sy-network-graph

Inspect dependencies, collaboration, or service connections.

On-screen distance is a layout result. Do not interpret it as actual distance or relationship strength without an explicit definition.

Base chart tier: Pro. Features such as additional renderers and custom branding have separate entitlement requirements.

InputData description
datanodes and links with source and target.
layoutChoose circular, force, or hierarchical.

Complete implementation example

html
<div id="chart-container" style="width: 100%; min-width: 0;"></div>

<script type="module">
  import { defineCustomElement as define0 } from '@syidax/advanced-pro/components/sy-network-graph.js';
  define0();

  // Pro: complete registerLicense at app startup using your issued certificate.
  // The website preview certificate is not for use in customer apps.
  const specs = [
    {
      "id": "example-chart",
      "tag": "sy-network-graph",
      "props": {
        "data": {
          "links": [
            {
              "source": "Seoul",
              "target": "Busan",
              "value": 24
            },
            {
              "source": "Busan",
              "target": "Daegu",
              "value": 18
            },
            {
              "source": "Daegu",
              "target": "Seoul",
              "value": 30
            },
            {
              "source": "Seoul",
              "target": "Jeju",
              "value": 12
            },
            {
              "source": "Jeju",
              "target": "Busan",
              "value": 9
            }
          ]
        },
        "layout": "circular",
        "nodeLabels": "show",
        "width": 640,
        "height": 360,
        "brandPosition": "bottom-right",
        "brandLogo": ""
      }
    }
  ];
  const container = document.querySelector('#chart-container');
  const elements = specs.map(({ tag, id, props }) => {
    const element = document.createElement(tag);
    element.id = id;
    Object.assign(element, props);
    element.setAttribute('aria-label', 'network-graph example chart');
    return element;
  });
  container.replaceChildren(...elements);
  const chart = elements.at(-1);
  const onEvent = event => {
    console.log('nodeClick', event.detail);
  };
  chart.addEventListener('nodeClick', onEvent);
  const observer = new ResizeObserver(([entry]) => {
    const width = Math.max(160, Math.floor(entry.contentRect.width));
    elements.forEach(element => { element.width = width; });
  });
  observer.observe(container);

  // In an SPA, call this function when the view is disposed.
  function disposeChart() {
    observer.disconnect();
    chart.removeEventListener('nodeClick', onEvent);
    container.replaceChildren();
  }
</script>

Properties

data

nodes and links with source and target.

ItemValue
JavaScript propertydata
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeNetworkGraphData
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

width

Chart width in pixels. If the container width changes, update width from a ResizeObserver.

ItemValue
JavaScript propertywidth
HTML attributewidth
Typenumber
Default900

height

Chart height in pixels. Allow space for axes, titles, and the legend.

ItemValue
JavaScript propertyheight
HTML attributeheight
Typenumber
Default400

brandPosition

The corner where the logo is anchored. Community and Pro both support all four corners, using the same position on screen and in image exports.

ItemValue
JavaScript propertybrandPosition
HTML attributebrand-position
Type'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
Default'bottom-right'
Allowed valuestop-left, top-right, bottom-left, bottom-right

nodeRadius

The radius of each node in CSS pixels, including isolated nodes.

ItemValue
JavaScript propertynodeRadius
HTML attributenode-radius
Typenumber
DefaultNETWORK_GRAPH_DEFAULT_NODE_RADIUS

linkWidth

The connecting line's width in CSS pixels; link values do not change its width.

ItemValue
JavaScript propertylinkWidth
HTML attributelink-width
Typenumber
DefaultNETWORK_GRAPH_DEFAULT_LINK_WIDTH

layout

Choose circular, force, or hierarchical.

ItemValue
JavaScript propertylayout
HTML attributelayout
TypeNetworkGraphLayout
Default'circular'
Allowed valuescircular, force, hierarchical

layoutIterations

Maximum force iterations, clamped to 0…10000; other layouts ignore this option. The solver also enforces its work budget.

ItemValue
JavaScript propertylayoutIterations
HTML attributelayout-iterations
Typenumber
DefaultNETWORK_GRAPH_DEFAULT_LAYOUT_ITERATIONS

linkDistance

Desired force spring length in CSS pixels; other layouts ignore this option.

ItemValue
JavaScript propertylinkDistance
HTML attributelink-distance
Typenumber
DefaultNETWORK_GRAPH_DEFAULT_LINK_DISTANCE

repulsion

Force repulsion strength; zero disables repulsion. Other layouts ignore this option.

ItemValue
JavaScript propertyrepulsion
HTML attributerepulsion
Typenumber
DefaultNETWORK_GRAPH_DEFAULT_REPULSION

bundling

none or force: bundle the connecting lines of distinct endpoint pairs toward compatible neighbours; positions, identities, lanes and hit rules stay.

ItemValue
JavaScript propertybundling
HTML attributebundling
TypeNetworkGraphBundling
Default'none'
Allowed valuesnone, force

bundleStrength

The bundling attraction, 0 … 1 (0 keeps straight centrelines); ignored while bundling is none.

ItemValue
JavaScript propertybundleStrength
HTML attributebundle-strength
Typenumber
DefaultNETWORK_GRAPH_BUNDLING_DEFAULT_STRENGTH

color

The nodes' fill: auto (the palette by index) or a CSS colour; a node's own color wins.

ItemValue
JavaScript propertycolor
HTML attributecolor
Typestring
DefaultAUTO_COLOR

linkColor

The links' colour: source / target (the node's colour at that end) or a CSS colour; a link's own color wins.

ItemValue
JavaScript propertylinkColor
HTML attributelink-color
Typestring
Default'source'

linkOpacity

The connecting lines' opacity (0 … 1).

ItemValue
JavaScript propertylinkOpacity
HTML attributelink-opacity
Typenumber
DefaultDEFAULT_LINK_OPACITY

linkCurvature

Connecting-line curvature (0 … 1). Self and parallel links keep distinct paths.

ItemValue
JavaScript propertylinkCurvature
HTML attributelink-curvature
Typenumber
DefaultNETWORK_GRAPH_DEFAULT_CURVATURE

clustering

Community detection over the current graph, independent of layout: none or louvain; with color="auto" the palette follows the group instead of the node index.

ItemValue
JavaScript propertyclustering
HTML attributeclustering
TypeNetworkGraphClustering
Default'none'
Allowed valuesnone, louvain

nodeLabels

the node labels beside the nodes: auto (hidden where they would overlap), show, hide; node-label-value appends the throughput.

ItemValue
JavaScript propertynodeLabels
HTML attributenode-labels
TypeNetworkGraphLabelMode
Default'auto'
Allowed valuesauto, show, hide

nodeLabelValue

Set as an HTML attribute or JavaScript property. type: boolean.

ItemValue
JavaScript propertynodeLabelValue
HTML attributenode-label-value
Typeboolean
Defaultfalse

neighbourDim

with a hovered / focused node, the links touching neither of its ends fade to this alpha factor (0 … 1; 1 = no dim).

ItemValue
JavaScript propertyneighbourDim
HTML attributeneighbour-dim
Typenumber
DefaultDEFAULT_NEIGHBOUR_DIM

activeColor

The hovered / focused node or link.

ItemValue
JavaScript propertyactiveColor
HTML attributeactive-color
Typestring
DefaultDEFAULT_ACTIVE_COLOR

chartTitle

The title inside the chart. Explain the data's unit and meaning alongside it.

ItemValue
JavaScript propertychartTitle
HTML attributechart-title
Typestring
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

chartSubtitle

The subtitle inside the chart.

ItemValue
JavaScript propertychartSubtitle
HTML attributechart-subtitle
Typestring
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

enableMouseTracking

Set as an HTML attribute or JavaScript property. type: boolean.

ItemValue
JavaScript propertyenableMouseTracking
HTML attributeenable-mouse-tracking
Typeboolean
Defaulttrue

nodeDrag

Nodes can be dragged with a pointer (mouse, touch, pen) and nudged with Ctrl / ⌘ + arrows; a dragged node stays pinned where it was dropped.

ItemValue
JavaScript propertynodeDrag
HTML attributenode-drag
Typeboolean
Defaulttrue

tooltip

The tooltip (the shared cartesian tooltip input: trigger, format, html, connector …), its switch, a formatter of the default text.

ItemValue
JavaScript propertytooltip
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianTooltipInput
Defaultundefined
Literals in the typeauto, off

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

tooltipEnabled

Set as an HTML attribute or JavaScript property. type: boolean.

ItemValue
JavaScript propertytooltipEnabled
HTML attributetooltip-show
Typeboolean
Defaulttrue

tooltipFormat

Pass as a JavaScript property. type: (detail: NetworkGraphHitDetail) => string.

ItemValue
JavaScript propertytooltipFormat
HTML attributePass objects, arrays, and callbacks as JavaScript properties
Type(detail: NetworkGraphHitDetail) => string
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

animated

Whether to animate initial display and data changes.

ItemValue
JavaScript propertyanimated
HTML attributeanimate
Typeboolean
Defaultfalse

animationDuration

Animation duration in milliseconds.

ItemValue
JavaScript propertyanimationDuration
HTML attributeanimation-duration
Typenumber
Default600

animationEasing

Allowed values: linear, ease-out, ease-in, ease-in-out. Default: 'ease-out'.

ItemValue
JavaScript propertyanimationEasing
HTML attributeanimation-easing
TypeNetworkGraphEasing
Default'ease-out'
Allowed valueslinear, ease-out, ease-in, ease-in-out

animationType

Allowed values: initial, update. Default: undefined.

ItemValue
JavaScript propertyanimationType
HTML attributeanimation-type
TypeNetworkGraphAnimationType
Defaultundefined
Allowed valuesinitial, update

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

streamSource

§3.6: an external stream source (link upserts); without one the chart keeps its own on the first push.

ItemValue
JavaScript propertystreamSource
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeNetworkGraphStreamSource
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

streamMax

Links tracked by the internal stream at most (the oldest leave as windowSlid).

ItemValue
JavaScript propertystreamMax
HTML attributestream-max
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

streamWindow

The newest N streamed links the chart renders (the whole buffer when unset).

ItemValue
JavaScript propertystreamWindow
HTML attributestream-window
Typenumber
Defaultundefined

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

zoom

Zoom: 'x' | 'y' | 'xy' | true (x) enable the drag rectangle, the pan, the wheel, the pinch and the keyboard over the diagram's unit extents (x 0 → 1 left → right, y 0 → 1 bottom → top — the hidden frame's extents); an object refines mode / drag / keyboard / minRangePx / resetButton / pan / wheel / pinch / inside. Off by default. zoomTo / zoomBy / panBy / resetZoom work regardless of the gesture switches.

ItemValue
JavaScript propertyzoom
HTML attributePass objects, arrays, and callbacks as JavaScript properties
TypeCartesianZoomInput
Defaultundefined
Literals in the typeauto, off, true, false, x, y, xy, inside

undefined means this property was not explicitly set. The effective value may depend on the chart type and other settings.

engine

Renderer selection: auto, standard, or pro. Engine selection is separate from permission to use a Pro chart type.

ItemValue
JavaScript propertyengine
HTML attributeengine
TypeNetworkGraphEngineMode
Default'auto'
Allowed valuesauto, standard, pro

unavailable

Allowed values: fallback, error. Default: 'fallback'.

ItemValue
JavaScript propertyunavailable
HTML attributeunavailable
TypeNetworkGraphUnavailableBehaviour
Default'fallback'
Allowed valuesfallback, error

Events

rendered

Emits rendering results in detail when chart drawing completes.

Event name: rendered. Names are case-sensitive. Read the payload from detail on CustomEvent<NetworkGraphRenderResult & { tier: NetworkGraphEngineTier }>.

javascript
chart.addEventListener('rendered', event => {
  console.log(event.detail); // NetworkGraphRenderResult & { tier: NetworkGraphEngineTier }
});

nodeClick

CustomEvent.detail type: NetworkGraphNodeEventDetail. Event names are case-sensitive.

Event name: nodeClick. Names are case-sensitive. Read the payload from detail on CustomEvent<NetworkGraphNodeEventDetail>.

javascript
chart.addEventListener('nodeClick', event => {
  console.log(event.detail); // NetworkGraphNodeEventDetail
});

nodeHover

CustomEvent.detail type: NetworkGraphNodeEventDetail | null. Event names are case-sensitive.

Event name: nodeHover. Names are case-sensitive. Read the payload from detail on CustomEvent<NetworkGraphNodeEventDetail | null>.

javascript
chart.addEventListener('nodeHover', event => {
  console.log(event.detail); // NetworkGraphNodeEventDetail | null
});

linkClick

CustomEvent.detail type: NetworkGraphLinkEventDetail. Event names are case-sensitive.

Event name: linkClick. Names are case-sensitive. Read the payload from detail on CustomEvent<NetworkGraphLinkEventDetail>.

javascript
chart.addEventListener('linkClick', event => {
  console.log(event.detail); // NetworkGraphLinkEventDetail
});

linkHover

CustomEvent.detail type: NetworkGraphLinkEventDetail | null. Event names are case-sensitive.

Event name: linkHover. Names are case-sensitive. Read the payload from detail on CustomEvent<NetworkGraphLinkEventDetail | null>.

javascript
chart.addEventListener('linkHover', event => {
  console.log(event.detail); // NetworkGraphLinkEventDetail | null
});

selectionChanged

the selection (the pinned highlight) changed: a node or a link (never both) or nothing, and what changed it.

Event name: selectionChanged. Names are case-sensitive. Read the payload from detail on CustomEvent<NetworkGraphSelectionChangeEventDetail>.

javascript
chart.addEventListener('selectionChanged', event => {
  console.log(event.detail); // NetworkGraphSelectionChangeEventDetail
});

nodeDragStart

CustomEvent.detail type: NetworkGraphNodeDragEventDetail. Event names are case-sensitive.

Event name: nodeDragStart. Names are case-sensitive. Read the payload from detail on CustomEvent<NetworkGraphNodeDragEventDetail>.

javascript
chart.addEventListener('nodeDragStart', event => {
  console.log(event.detail); // NetworkGraphNodeDragEventDetail
});

nodeDragMove

CustomEvent.detail type: NetworkGraphNodeDragEventDetail. Event names are case-sensitive.

Event name: nodeDragMove. Names are case-sensitive. Read the payload from detail on CustomEvent<NetworkGraphNodeDragEventDetail>.

javascript
chart.addEventListener('nodeDragMove', event => {
  console.log(event.detail); // NetworkGraphNodeDragEventDetail
});

nodeDragEnd

CustomEvent.detail type: NetworkGraphNodeDragEventDetail. Event names are case-sensitive.

Event name: nodeDragEnd. Names are case-sensitive. Read the payload from detail on CustomEvent<NetworkGraphNodeDragEventDetail>.

javascript
chart.addEventListener('nodeDragEnd', event => {
  console.log(event.detail); // NetworkGraphNodeDragEventDetail
});

pointContextMenu

CustomEvent.detail type: ChartPointContextMenuEventDetail<NetworkGraphHitDetail>. Event names are case-sensitive.

Event name: pointContextMenu. Names are case-sensitive. Read the payload from detail on CustomEvent<ChartPointContextMenuEventDetail<NetworkGraphHitDetail>>.

javascript
chart.addEventListener('pointContextMenu', event => {
  console.log(event.detail); // ChartPointContextMenuEventDetail<NetworkGraphHitDetail>
});

appended

CustomEvent.detail type: { count: number; replaced: number }. Event names are case-sensitive.

Event name: appended. Names are case-sensitive. Read the payload from detail on CustomEvent<{ count: number; replaced: number }>.

javascript
chart.addEventListener('appended', event => {
  console.log(event.detail); // { count: number; replaced: number }
});

windowSlid

CustomEvent.detail type: { dropped: number }. Event names are case-sensitive.

Event name: windowSlid. Names are case-sensitive. Read the payload from detail on CustomEvent<{ dropped: number }>.

javascript
chart.addEventListener('windowSlid', event => {
  console.log(event.detail); // { dropped: number }
});

tooltipShow

The shared tooltip events (the controller emits them).

Event name: tooltipShow. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianTooltipEventDetail>.

javascript
chart.addEventListener('tooltipShow', event => {
  console.log(event.detail); // CartesianTooltipEventDetail
});

tooltipHide

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: tooltipHide. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('tooltipHide', event => {
  console.log(event.detail); // void
});

tooltipAction

CustomEvent.detail type: CartesianTooltipActionEventDetail. Event names are case-sensitive.

Event name: tooltipAction. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianTooltipActionEventDetail>.

javascript
chart.addEventListener('tooltipAction', event => {
  console.log(event.detail); // CartesianTooltipActionEventDetail
});

chartAnimationStart

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: chartAnimationStart. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('chartAnimationStart', event => {
  console.log(event.detail); // void
});

chartAnimationEnd

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: chartAnimationEnd. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('chartAnimationEnd', event => {
  console.log(event.detail); // void
});

chartAnimationInterrupted

CustomEvent.detail type: void. Event names are case-sensitive.

Event name: chartAnimationInterrupted. Names are case-sensitive. Read the payload from detail on CustomEvent<void>.

javascript
chart.addEventListener('chartAnimationInterrupted', event => {
  console.log(event.detail); // void
});

zoomChange

Fired after every zoom change (drag / pan / wheel / pinch / keyboard / api / reset) with the new state.

Event name: zoomChange. Names are case-sensitive. Read the payload from detail on CustomEvent<CartesianZoomChangeEventDetail>.

javascript
chart.addEventListener('zoomChange', event => {
  console.log(event.detail); // CartesianZoomChangeEventDetail
});

Methods

redraw

Redraw the chart using its current data and options. Inspect the rendered result after the returned Promise resolves.

typescript
redraw(): Promise<NetworkGraphRenderResult>

Return type: Promise<NetworkGraphRenderResult>. Call the method after element registration and await its Promise result.

getActiveTier

An asynchronous method. Check the argument and return types below.

typescript
getActiveTier(): Promise<NetworkGraphEngineTier>

Return type: Promise<NetworkGraphEngineTier>. Call the method after element registration and await its Promise result.

getUnavailableReason

Why the WebGPU renderer could not run (the fallback notice's reason); undefined when nothing fell back.

typescript
getUnavailableReason(): Promise<string | undefined>

Return type: Promise<string | undefined>. Call the method after element registration and await its Promise result.

setData

Replace the bar set.

typescript
setData(data: NetworkGraphData): Promise<void>
ArgumentsTypeRequired
dataNetworkGraphDataRequired

Return type: Promise<void>. Call the method after element registration and await its Promise result.

appendPoint

Append one value to the stream. Check the argument type and the licensing requirements for streaming.

typescript
appendPoint(link: NetworkGraphLinkInput): Promise<void>
ArgumentsTypeRequired
linkNetworkGraphLinkInputRequired

Return type: Promise<void>. Call the method after element registration and await its Promise result.

appendBatch

Append multiple values to the stream. Check the argument type and the licensing requirements for streaming.

typescript
appendBatch(links: ReadonlyArray<NetworkGraphLinkInput>): Promise<void>
ArgumentsTypeRequired
linksReadonlyArray<NetworkGraphLinkInput>Required

Return type: Promise<void>. Call the method after element registration and await its Promise result.

shift

Drop the oldest streamed links (the data links are not the stream).

typescript
shift(count: number): Promise<void>
ArgumentsTypeRequired
countnumberRequired

Return type: Promise<void>. Call the method after element registration and await its Promise result.

replace

Swap the streamed set (replace([]) clears it); the base values never leave. Without chart.streaming the dies upsert into the base like a batch (quietly: no appended, no binChanged, as a ring replace).

typescript
replace(links: ReadonlyArray<NetworkGraphLinkInput>): Promise<void>
ArgumentsTypeRequired
linksReadonlyArray<NetworkGraphLinkInput>Required

Return type: Promise<void>. Call the method after element registration and await its Promise result.

getStreamSource

The stream session's source (Chart Pro): like the stream methods it waits for a license still being confirmed.

typescript
getStreamSource(): Promise<NetworkGraphStreamSource | undefined>

Return type: Promise<NetworkGraphStreamSource | undefined>. Call the method after element registration and await its Promise result.

getEngineStatus

Requested vs effective engine and why (CHART-ADD-08), with the chart.type.network-graph license state.

typescript
getEngineStatus(): Promise<ChartEngineStatus>

Return type: Promise<ChartEngineStatus>. Call the method after element registration and await its Promise result.

setAnimation

An asynchronous method. Check the argument and return types below.

typescript
setAnimation(options: { duration?: number; easing?: NetworkGraphEasing; enabled?: boolean; type?: NetworkGraphAnimationType }): Promise<void>
ArgumentsTypeRequired
options{ duration?: number; easing?: NetworkGraphEasing; enabled?: boolean; type?: NetworkGraphAnimationType }Required

Return type: Promise<void>. Call the method after element registration and await its Promise result.

pauseAnimation

Pause the current animation.

typescript
pauseAnimation(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

resumeAnimation

Resume a paused animation.

typescript
resumeAnimation(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

replayAnimation

Replay the initial sweep from min → value(s). No-op when animation is off / reduced.

typescript
replayAnimation(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

hitTest

The node or link under a host-local CSS point (a node first, else the topmost link), or null (always without a valid license).

typescript
hitTest(cssX: number, cssY: number): Promise<NetworkGraphHitDetail | null>
ArgumentsTypeRequired
cssXnumberRequired
cssYnumberRequired

Return type: Promise<NetworkGraphHitDetail | null>. Call the method after element registration and await its Promise result.

getNode

An asynchronous method. Check the argument and return types below.

typescript
getNode(index: number): Promise<NetworkGraphNode | null>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<NetworkGraphNode | null>. Call the method after element registration and await its Promise result.

getNodeById

An asynchronous method. Check the argument and return types below.

typescript
getNodeById(id: string): Promise<NetworkGraphNode | null>
ArgumentsTypeRequired
idstringRequired

Return type: Promise<NetworkGraphNode | null>. Call the method after element registration and await its Promise result.

getNodes

An asynchronous method. Check the argument and return types below.

typescript
getNodes(): Promise<NetworkGraphNode[]>

Return type: Promise<NetworkGraphNode[]>. Call the method after element registration and await its Promise result.

getNodeCount

An asynchronous method. Check the argument and return types below.

typescript
getNodeCount(): Promise<number>

Return type: Promise<number>. Call the method after element registration and await its Promise result.

getLinkCount

An asynchronous method. Check the argument and return types below.

typescript
getLinkCount(): Promise<number>

Return type: Promise<number>. Call the method after element registration and await its Promise result.

getExtent

An asynchronous method. Check the argument and return types below.

typescript
getExtent(): Promise<NetworkGraphExtent>

Return type: Promise<NetworkGraphExtent>. Call the method after element registration and await its Promise result.

pinNode

Holds a node (by id) at a plot-local, unzoomed position, as a finished drag does: the paths re-route and an update morph moves it there. Returns the applied (clamped) position, or null for an unknown id.

typescript
pinNode(id: string, x: number, y: number): Promise<NetworkGraphPinnedNode | null>
ArgumentsTypeRequired
idstringRequired
xnumberRequired
ynumberRequired

Return type: Promise<NetworkGraphPinnedNode | null>. Call the method after element registration and await its Promise result.

unpinNode

Releases a pinned node back to its layout position (with an update morph); false when it was not pinned.

typescript
unpinNode(id: string): Promise<boolean>
ArgumentsTypeRequired
idstringRequired

Return type: Promise<boolean>. Call the method after element registration and await its Promise result.

clearPinnedNodes

Network Graph — release every pinned node; the count released.

typescript
clearPinnedNodes(): Promise<number>

Return type: Promise<number>. Call the method after element registration and await its Promise result.

getPinnedNodes

The pinned nodes of the current graph in id order, at their applied (clamped) positions.

typescript
getPinnedNodes(): Promise<NetworkGraphPinnedNode[]>

Return type: Promise<NetworkGraphPinnedNode[]>. Call the method after element registration and await its Promise result.

getLayoutStats

Settled node/link geometry, relationship totals and target layout diagnostics. A target's statistics do not describe animation progress.

typescript
getLayoutStats(): Promise<{ nodes: number; links: number; total: number; dropped: number; nodeRadius: number; linkWidth: number; layout: NetworkGraphLayout; curvature: number; force?: NetworkGraphForceStats; hierarchical?: NetworkGraphHierarchicalStats; bundling?: NetworkGraphBundlingStats; pinned?: number }>

Return type: Promise<{ nodes: number; links: number; total: number; dropped: number; nodeRadius: number; linkWidth: number; layout: NetworkGraphLayout; curvature: number; force?: NetworkGraphForceStats; hierarchical?: NetworkGraphHierarchicalStats; bundling?: NetworkGraphBundlingStats; pinned?: number }>. Call the method after element registration and await its Promise result.

getClusters

The current graph's communities while clustering="louvain" (deep copies; null when none). Layout, zoom and animation do not change them.

typescript
getClusters(): Promise<NetworkGraphClusteringResult | null>

Return type: Promise<NetworkGraphClusteringResult | null>. Call the method after element registration and await its Promise result.

getLabels

the placed node labels in HOST-local CSS px as shown (the plot offset added; under a zoom the labels of the nodes outside the window are left out), shown or hidden with the reason.

typescript
getLabels(): Promise<NetworkGraphNodeLabel[]>

Return type: Promise<NetworkGraphNodeLabel[]>. Call the method after element registration and await its Promise result.

getLayout

Host-local geometry as shown. Scale fields preserve ellipses under non-uniform viewport zoom.

typescript
getLayout(): Promise<NetworkGraphLayoutResult>

Return type: Promise<NetworkGraphLayoutResult>. Call the method after element registration and await its Promise result.

showTooltipAtIndex

Open a tooltip by point index: all nodes first, then links.

typescript
showTooltipAtIndex(index: number): Promise<CartesianTooltipEventDetail | null>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<CartesianTooltipEventDetail | null>. Call the method after element registration and await its Promise result.

hideTooltip

Close the currently visible tooltip.

typescript
hideTooltip(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

focusNodeAt

Move the keyboard focus ring to a node (null off the nodes); emits nodeHover like the walk.

typescript
focusNodeAt(index: number): Promise<NetworkGraphNodeEventDetail | null>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<NetworkGraphNodeEventDetail | null>. Call the method after element registration and await its Promise result.

selectNodeAt

Select (pin) a node: its neighbourhood stays highlighted after the pointer leaves; a negative or unknown index releases the selection. Emits selectionChanged when it changes.

typescript
selectNodeAt(index: number): Promise<NetworkGraphNodeEventDetail | null>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<NetworkGraphNodeEventDetail | null>. Call the method after element registration and await its Promise result.

selectLinkAt

Select (pin) a link: its link keeps the accent after the pointer leaves; a negative or unknown index releases the selection.

typescript
selectLinkAt(index: number): Promise<NetworkGraphLinkEventDetail | null>
ArgumentsTypeRequired
indexnumberRequired

Return type: Promise<NetworkGraphLinkEventDetail | null>. Call the method after element registration and await its Promise result.

clearSelection

Release the selection (emits selectionChanged when there was one).

typescript
clearSelection(): Promise<void>

Return type: Promise<void>. Call the method after element registration and await its Promise result.

getSelection

The selection: the selected node's / link's detail (null = none); its anchors are Pro-derived, refused without a valid license.

typescript
getSelection(): Promise<NetworkGraphSelection>

Return type: Promise<NetworkGraphSelection>. Call the method after element registration and await its Promise result.

zoomTo

Zoom to explicit windows over the unit extents: x / y as { min, max } or [min, max] (null clears that orientation).

typescript
zoomTo(request: CartesianZoomRequest): Promise<CartesianZoomChangeEventDetail | null>
ArgumentsTypeRequired
requestCartesianZoomRequestRequired

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

zoomBy

Scale the current windows by factor (< 1 zooms in) around anchorFraction (0..1, default centre).

typescript
zoomBy(factor: number, anchorFraction?: number): Promise<CartesianZoomChangeEventDetail | null>
ArgumentsTypeRequired
factornumberRequired
anchorFractionnumberOptional

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

panBy

Slide the zoomed windows by unit-extent units ({ x?, y? }); a no-op at the full extent.

typescript
panBy(delta: { x?: number; y?: number }): Promise<CartesianZoomChangeEventDetail | null>
ArgumentsTypeRequired
delta{ x?: number; y?: number }Required

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

resetZoom

Reset the zoomed or panned range to the original data range.

typescript
resetZoom(): Promise<CartesianZoomChangeEventDetail | null>

Return type: Promise<CartesianZoomChangeEventDetail | null>. Call the method after element registration and await its Promise result.

getZoom

Read the current zoom range. Check the return type's nullability and the range for each axis.

typescript
getZoom(): Promise<CartesianZoomState | null>

Return type: Promise<CartesianZoomState | null>. Call the method after element registration and await its Promise result.

getZoomExtent

The full extent (0 … 1) and key of the diagram's orientations (null before the first layout).

typescript
getZoomExtent(request?: CartesianZoomExtentRequest): Promise<CartesianZoomExtentDetail | null>
ArgumentsTypeRequired
requestCartesianZoomExtentRequestOptional

Return type: Promise<CartesianZoomExtentDetail | null>. Call the method after element registration and await its Promise result.