Network

@nivo/network

A network component connecting nodes with links using various forces, the resulting layout will depends on linkDistance, centeringStrength and repulsivity, so you should play with those parameters in order to achieve the desired result.

You can also add some extra constrains via distanceMin and distanceMax.

The responsive alternative of this component is ResponsiveNetwork.

Please note that you can also use the useNetwork React hook if you want to handle the rendering by yourself, it accepts an object with almost the same props as the component and returns computed nodes & links.

roll the dice
69 nodes
Actions Logs
Start interacting with the chart to log actions
Base
{ nodes: NetworkInputNode[], links: NetworkInputLink[] }required

Chart data defining nodes and links.

numberrequired

Chart width for non-responsive component.

numberoptional

Chart default width for responsive component.

numberrequired

Chart height for non-responsive component.

numberoptional

Chart default height for responsive component.

number (ms)optional

Debounce width/height updates for responsive component.

(dimensions: { width: number; height: number }) => voidoptional

A callback for when responsive component is resized.

numberoptionaldefault:'Depends on device'

Adjust pixel ratio, useful for HiDPI screens.

supportsvgcanvas
objectoptional
px
px
px
px

Chart margin.

Ref<SVGSVGElement | HTMLCanvasElement>optional

Ref to the chart's container. Used on this page to generate/download the chart's image via html-to-image.

Simulation
Style
Nodes
Links
Interactivity
Annotations
Customization
Accessibility
Motion