0.0.5 • Published 2 years ago

simple-graph-ui v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

💫 Simple Graph UI

A simple React component library to create directed/undirected graph for visualization

👇 Installation

npm i simple-graph-ui

🌐 Components

Canvas (Must have)

  • A layout wrapper for the graph

Node

  • Create a node with the text label inside with custom x,y coordinates and edges
propstyperequireddescription
labelstringtrueLabel of the node
xnumbertruex position of the node
ynumbertruey position of the node
neighborstringfalseNeighbor of the node (currently have one only)

😎 Basic usage

import { Node, Canvas } from 'simple-graph-ui';
<Canvas>
  <Node label={'A'} x={75} y={75} neighbor="B"/>
  <Node label={'B'} x={600} y={85} neighbor="A"/>
  <Node label={'C'} x={600} y={500} neighbor="B"/>
</Canvas>

Result

🛠 Work in progress 🛠

0.0.5

2 years ago

0.0.4

2 years ago

0.0.32

2 years ago

0.0.31

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago