Die graph-Anweisung wird durch die graphviz-Erweiterung bereitgestellt.
Diese Anweisung erlaubt es, von graphviz erzeugte Graphen in eine Seite einzubinden. Verwendungsbeispiel:
[[!graph src="a -> b -> c; a -> c;"]]
Knoten des Graphen können mit der üblichen graphviz-Syntax auf externe Seiten verlinken, hierzu wird eine klickbare imagemap erzeugt. Als eine besondere Erweiterung für ikiwiki können auch WikiLinks verwendet werden. Zum Beispiel:
[[!graph src="""
google [ href="http://google.com/" ]
sandkasten [ href=[[SandBox]] ]
hilfe [ href=[[ikiwiki/formatting]] ]
neueseite [ href=[[NewPage]] ]
google -> sandkasten -> hilfe -> neueseite -> hilfe -> google;
"""]]
Die graph-Anweisung unterstützt die folgenden Parameter:
src- The graphviz source to render.file- A file in the wiki containing the graphviz source.type- The type of graph to render:graphordigraph. Defaults todigraph.prog- The graphviz program to render with:dot,neato,fdp,twopi, orcirco. Defaults todot.height,width- Limit the size of the graph to a given height and width, in inches. You must specify both to limit the size; otherwise, graphviz will choose a size, without any limit.