Gathering detailed insights and metrics for react-graph-vis
Gathering detailed insights and metrics for react-graph-vis
Gathering detailed insights and metrics for react-graph-vis
Gathering detailed insights and metrics for react-graph-vis
npm install react-graph-vis
Typescript
Module System
Node Version
NPM Version
81.8
Supply Chain
94.7
Quality
75.1
Maintenance
100
Vulnerability
97.9
License
JavaScript (99.31%)
HTML (0.69%)
Total Downloads
3,331,979
Last Day
1,853
Last Week
12,248
Last Month
74,935
Last Year
956,838
965 Stars
115 Commits
173 Forks
18 Watching
14 Branches
20 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.7
Package Id
react-graph-vis@1.0.7
Size
741.96 kB
NPM Version
6.14.10
Node Version
12.20.1
Publised On
15 Feb 2021
Cumulative downloads
Total Downloads
Last day
-34.4%
1,853
Compared to previous day
Last week
-28.8%
12,248
Compared to previous week
Last month
-3.1%
74,935
Compared to previous month
Last year
52.6%
956,838
Compared to previous year
5
1
3
A React component to display beautiful network graphs using vis.js
Show, don't tell: Demo
Make sure to visit visjs.org for more info.
Rendered graphs are scrollable, zoomable, retina ready, dynamic, and switch layout on double click.
Due to the imperative nature of vis.js, updating graph properties causes complete redraw of graph and completely porting it to React is a big project itself!
This component takes three vis.js configuration objects as properties:
1import React from "react"; 2import ReactDOM from "react-dom"; 3import Graph from "react-graph-vis"; 4 5import "./styles.css"; 6// need to import the vis network css in order to show tooltip 7import "./network.css"; 8 9function App() { 10 const graph = { 11 nodes: [ 12 { id: 1, label: "Node 1", title: "node 1 tootip text" }, 13 { id: 2, label: "Node 2", title: "node 2 tootip text" }, 14 { id: 3, label: "Node 3", title: "node 3 tootip text" }, 15 { id: 4, label: "Node 4", title: "node 4 tootip text" }, 16 { id: 5, label: "Node 5", title: "node 5 tootip text" } 17 ], 18 edges: [ 19 { from: 1, to: 2 }, 20 { from: 1, to: 3 }, 21 { from: 2, to: 4 }, 22 { from: 2, to: 5 } 23 ] 24 }; 25 26 const options = { 27 layout: { 28 hierarchical: true 29 }, 30 edges: { 31 color: "#000000" 32 }, 33 height: "500px" 34 }; 35 36 const events = { 37 select: function(event) { 38 var { nodes, edges } = event; 39 } 40 }; 41 return ( 42 <Graph 43 graph={graph} 44 options={options} 45 events={events} 46 getNetwork={network => { 47 // if you want access to vis.js network api you can set the state in a parent component using this property 48 }} 49 /> 50 ); 51} 52 53const rootElement = document.getElementById("root"); 54ReactDOM.render(<App />, rootElement); 55
You can also check out the demo in the example
folder.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 5/16 approved changesets -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
53 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More