aboutsummaryrefslogtreecommitdiff
path: root/react-frontend/src/components/Visualization.js
diff options
context:
space:
mode:
authorJulia McCauley <skurvyj@gmail.com>2021-04-18 10:53:24 -0400
committerJulia McCauley <skurvyj@gmail.com>2021-04-18 10:53:24 -0400
commit79ff716c29a80d7a53abce69cb406a23953320c8 (patch)
treed6b71e420f753470331c5052912f4917fba0237a /react-frontend/src/components/Visualization.js
parent7c1fc6472bfbc10bdb4e5bfa41c778020bd1c8fd (diff)
parent4cfdb31be3697565e5c4ae95cdc4b60161bd4e84 (diff)
Merge branch 'master' of github.com:cs0320-2021/term-project-cohwille-jmccaul3-mfoiani-rhunt2
# Conflicts: # src/main/java/edu/brown/cs/student/term/hub/SuspicionRanker.java
Diffstat (limited to 'react-frontend/src/components/Visualization.js')
-rw-r--r--react-frontend/src/components/Visualization.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/react-frontend/src/components/Visualization.js b/react-frontend/src/components/Visualization.js
index 91082e9..1975e86 100644
--- a/react-frontend/src/components/Visualization.js
+++ b/react-frontend/src/components/Visualization.js
@@ -15,8 +15,7 @@ function Visualization(props) {
const options = {
edges: {
color: "#ffffff"
- },
- autoResize: true
+ }
};
const events = {
select: () => event => props.setSelected(event.nodes[0])
@@ -29,11 +28,13 @@ function Visualization(props) {
const getNodes = () => {
let nodes = [];
props.data.forEach(hub => {
- nodes.push({
- id: hub.id,
- label: hub.name,
- size: hub.suspicionScore * 10
- });
+ if (hub.followers) {
+ nodes.push({
+ id: hub.id,
+ label: hub.name,
+ size: hub.suspicionScore
+ });
+ }
});
return nodes;
}