Assuming that instance = greuler(options).update()
is called there are two ways to interact
with the graph
instance.graph
holds utility methods to manipulate the graph like adding/removing
nodes and edges and other utility methods like querying the adjacent nodes of some node, etc.
The convention I used for the project is to always use objects as the first parameter to
describe a node or edge (an array/function is needed in some cases of some methods of
instance.graph
but they describe multiple nodes/edges),
also all the methods of instance.graph
(but the ones who add nodes and edges) receive a
single parameter
Please take a look at all the methods of instance.graph
which can be found
here
instance.selector
holds utility methods to animate existing nodes/edges of the graph,
under the hood it uses instance.graph
and wraps the returning values inside d3 selections
Just like instance.graph
the first method will always be an object describing a node / edge,
the second parameter is an override of the styles predefined to be used during the animation