Adding interactivity
Now, let's add some interactivity.
When the user mouses-over a node, highlight the links to and from that node.
| |
We add two parameters |
|
This selection parameter records the currently selected node. |
|
This selection parameter records the links connected to from the selected node. |
|
| |
Mousing-over the node will update the value of the selected_node selection |
|
| |
The labels for nodes with in-degree <= 10 will have fill set to "none", so they won't intercept mouseover events for node circles underneath them. |
|
| |
Draw a red line on top of the visualization for currently selected links. |
|
|