@visx/network
TypeScript icon, indicating that this package has built-in type declarations

3.3.0 • Public • Published

@visx/network

A simple package to visualize a network or graph layout. Does not currently handle network layout.

Example Usage

import { Graph, DefaultLink, DefaultNode } from '@visx/network';
const nodes = [
  { x: 50, y: 20 },
  { x: 200, y: 300 },
  { x: 300, y: 40 },
];

const dataSample = {
  nodes,
  links: [
    { source: nodes[0], target: nodes[1] },
    { source: nodes[1], target: nodes[2] },
    { source: nodes[2], target: nodes[0] },
  ],
};

const MyGraph = () => (
  <Graph graph={dataSample} linkComponent={DefaultLink} nodeComponent={DefaultNode} />
);

Installation

npm install --save @visx/network

/@visx/network/

    Package Sidebar

    Install

    npm i @visx/network

    Weekly Downloads

    55,342

    Version

    3.3.0

    License

    MIT

    Unpacked Size

    21.3 kB

    Total Files

    31

    Last publish

    Collaborators

    • vx-hshoff
    • hshoff
    • christopher.card.williams
    • lencioni