A graph is specified as follows:
graph: { }
Nodes, edges, graph attributes etc. are specified inside the graph, i.e. between the curly brackets.
A node is specified as follows:
node: { title: "the node's title" }
All node titles have to be unique. The titles are case-sensitive
and whitespace-sensitive. For example, the names "a",
"A" and
"a " refer to three different nodes.
An edge is specified as follows:
edge: { source: "source node title" target: "target node title" }
Example of a simple graph:
|
![]() |
By default, nodes are labeled with their titles. To specify a different label for a node, use the attribute “label”.
|
Labels may contain the special characters
“\n” (new line), “\t” (tab), and
“\"” (double quotes).
|
![]() |
The graph specification may contain comments
in C style (a comment is enclosed between “/*” and “*/”)
and in C++ style (a comment starts with a “//” and continues until the end of the line):
// This is a comment
// in C++ style
/* And this is a
comment in C style */
Example graph:
|
![]() |
graph:”,
“node:” and “edge:”.