Labelled Force-directed Layout
Let's enhance this view by labelling nodes, and scaling each label based ont eh degree of the corresponding node.
Visualization
NetPanorama specification
| |
Calculate the degree of each node. |
|
| |
Define a scale mapping from degree to text size... |
|
...and use this to scale a label for each node. |
|
|
Note that rather than defining a scale for the text size, we could instead specify an equivalent expression:
"fontSize": {"expression": "1.1 * datum.degree"}