Graph Style Script @ViewStyle directive properties
@ViewStyle directive is used for defining style properties of a general
graph view: link distance, view, physics, repel force, etc. You can read more about
each property in the following sections.
Here is the list of all properties that can be defined in the
along with their expected types.
Sets the margin radius for each node from its centre. If node
collision-radius is set to
20, it means there will be
10 spaces left around each
node. No other node can be in that space.
collision-radius: 15sets the margin radius for each node from its centre to
Sets the strength of repel force between all nodes. If positive, it adds a force that moves nodes away from each other, if negative, it moves nodes towards each other.
repel-force: -100sets the repel force between all nodes to
Sets the minimum required distance between two connected nodes from their centres.
30. If node sizes are
20 and link distance is
nodes might overlap because the minimum distance from one node centre to another is
20 + 20 = 40.
link-distance: 30sets the minimum required distance to
Enables or disables physics which is a real-time simulation for graph node positions. When physics is enabled, the graph is not static anymore.
physics-enabled: Trueenables the physics.
physics-enabled: Greater(NodeCount(graph), 100)enables the physics for graphs with more than 100 nodes.
view: string: "default" | "map"
Sets the current graph view that can be either
"default" view is
a graph visualization on a blank background. The
"map" view is a graph visualization with a map
as a background where each node needs to provide
longitude to be positioned
on the map.
view: "default"sets the view to the default view.
view: "map"sets the view to the map view that will be shown only if at least one node has required geo information: