🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@mlvis/graph-builder

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mlvis/graph-builder

A thin wrapper over graph.gl for exploring a graph interactively.

1.1.0-alpha.14
Source
npm
Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

GraphBuilder

A generic node-link diagram

Usage

Example:

import GraphBuilder from '@mlvis/graph-builder';

const data = {
  nodes: [{id: '1'}, {id: '2'}, {id: '3'}],
  edge: [
    {id: 'e1', sourceId: '1', targetId: '2'},
    {id: 'e2', sourceId: '1', targetId: '3'},
    {id: 'e3', sourceId: '2', targetId: '3'},
  ],
};

const App = () => (
  <GraphBuilder
    data={data}
    nodeSize={10}
    nodeColor={'#7743CE'}
    edgeWidth={1}
    edgeColor={'#777777'}
    onNodeClick={n => console.log(n)}
    onEdgeClick={e => console.log(e)}
  />
);

FAQs

Package last updated on 05 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts