1.5.0 • Published 7 months ago

@dechegaray/react-graph-network v1.5.0

Weekly downloads
-
License
-
Repository
-
Last release
7 months ago

network-graph

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install @dechegaray/react-graph-network

Usage

import React from 'react'
import { NetworkGraph } from '@dechegaray/react-graph-network'

const viewportHeight = 300

const exampleData = {
  nodes: [
    { id: 'node1', label: 'Node 1' },
    { id: 'node2', label: 'Node 2' },
    { id: 'node3', label: 'Node 3' },
  ],
  links: [
    { source: 'node1', target: 'node2' },
    { source: 'node1', target: 'node3' },
  ],
}

function App() {
  return (
    <div style={{ height: viewportHeight }}>
      <NetworkGraph id='network-graph' data={exampleData} />
    </div>
  )
}

Development

For development simply cd into the root folder of this project and run the following:

  • npm install to install dependencies for your project
  • npm link to create a symlink to this package

After your changes are completed

  • cd ./examples to execute the sample project
  • npm install to install dependencies on the sample project
  • npm link @dechegaray/react-graph-network to add a reference to the symlink created above and avoiding the need of installing the actual dependency
  • npm run dev to start your dev server and see your changes live

Add proper unit/component test as needed

License

MIT ©

1.2.0

7 months ago

0.0.10

7 months ago

0.0.11

7 months ago

1.5.0

7 months ago

1.4.0

7 months ago

1.3.0

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

10 months ago

0.0.6

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago

1.0.0

11 months ago