Skip to content

Commit

Permalink
Added note to docs/InteractiveForceGraph.md related to render issue w…
Browse files Browse the repository at this point in the history
…hen alpha is not set to 1 in SimulationOptions. Addition discussed in issue #60
  • Loading branch information
RosaRomeroGomez committed Apr 4, 2018
1 parent 88f0141 commit 7c9cbd2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/InteractiveForceGraph.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@ import { InteractiveForceGraph, ForceGraphNode, ForceGraphLink } from 'react-vis
</InteractiveForceGraph>
```

**Important note:**
If the graph moves off the canvas in the upper-left, you need to set ```alpha``` in ```simulationOptions``` to ```1```.
For example, using the example above:
```
<InteractiveForceGraph
simulationOptions={{ height: 300, width: 300, **alpha:1** }}
labelAttr="label"
onSelectNode={(node) => console.log(node)}
highlightDependencies
>
....
(Rest of the code)
```


## Props

`<InteractiveForceGraph />` inherits all of the props from [`<ForceGraph />`](ForceGraph.md), and adds:
Expand Down

0 comments on commit 7c9cbd2

Please sign in to comment.