diff options
author | Michael Foiani <sotech117@michaels-mbp-3.lan> | 2021-04-16 18:27:46 -0400 |
---|---|---|
committer | Michael Foiani <sotech117@michaels-mbp-3.lan> | 2021-04-16 18:27:46 -0400 |
commit | 868c250d5c9ab45be1c5a478d2ff5cd82ec60f2d (patch) | |
tree | 7eb7bbc1e2d44ecb4be92aa8abca0db798a048f6 /maps-frontend/src/components/Visualization.js | |
parent | 5f1c8ad8dd2944d6791971ba7fc5a4da97a9e9ac (diff) |
Working on the request to get info on an investor.
Diffstat (limited to 'maps-frontend/src/components/Visualization.js')
-rw-r--r-- | maps-frontend/src/components/Visualization.js | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/maps-frontend/src/components/Visualization.js b/maps-frontend/src/components/Visualization.js index c33339b..c0e5811 100644 --- a/maps-frontend/src/components/Visualization.js +++ b/maps-frontend/src/components/Visualization.js @@ -15,33 +15,28 @@ function Visualization(props) { const options = { edges: { color: "#ffffff" - } + }, + autoResize: true }; - const events = { - select: event => { - console.log(event); - } + select: () => event => props.setSelected(event.nodes[0]) }; - const [graphState, setGraphState] = useState({ nodes: [], edges: [] }); - const getNodes = () => { let nodes = []; props.data.forEach(hub => { nodes.push({ id: hub.id, label: hub.name, - size: hub.suspicionScore * 50 + size: hub.suspicionScore * 10 }); }); return nodes; } - const getEdges = () => { let edges = [] props.data.forEach(hub => { |