Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import ForceGraph from 'force-graph';
const graph = ForceGraph();
graph(new HTMLElement());
graph
.graphData({nodes: [], links: []})
.nodeId('testNode')
.linkSource('source')
.linkTarget('target')
.width(100)
.height(100)
.backgroundColor('#FFF')
.nodeRelSize(4)
.nodeVal(1)
.nodeVal('val')
.nodeVal((node) => node.val)
.nodeLabel('name')
.nodeLabel((node) => node.name)