15.3.1 Constructing the graph
There are four basic methods in ViewRenderer for describing the graph:
-
nodes:using:
andnodes:using:forEach:
are used for defining nodes and their associated shapes, -
edges:from:to:using:
is used for defining edges between existing nodes, and -
layout:
is used for setting the way the graph should be laid out.
ViewRenderer offers multiple other methods that are more convenient for most purposes, but these methods offer the means to describe completely a graph based on any model. In a way, they are like primitives that offer the means of transforming a given model into a graph. All the other graph construction methods in ViewRenderer are expressed in terms of these.