]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/ikiwiki/directive/graph.mdwn
Give graph an optional "file" param, like table's.
[git.ikiwiki.info.git] / doc / ikiwiki / directive / graph.mdwn
1 The `graph` directive is supplied by the [[!iki plugins/graphviz desc=graphviz]] plugin.
3 This directive allows embedding [graphviz](http://www.graphviz.org/)
4 graphs in a page.  Example usage:
6         \[[!graph src="a -> b -> c; a -> c;"]]
8 Nodes on the graph can link to external urls using regular graphviz syntax,
9 and a clickable imagemap will be created. As a special extension for
10 ikiwiki, [[WikiLinks|ikiwiki/wikilink]] can also be used. For example:
12         \[[!graph src="""
13         google [ href="http://google.com/" ]
14         sandbox [ href=\[[SandBox]] ]
15         help [ href=\[[ikiwiki/formatting]] ]
16         newpage [ href=\[[NewPage]] ]
17         
18         google -> sandbox -> help -> newpage -> help -> google;
19         """]]
21 The `graph` directive supports the following parameters:
23 - `src` - The graphviz source to render.
24 * `file` - A file in the wiki containing the graphviz source.
25 - `type` - The type of graph to render: `graph` or `digraph`.  Defaults to
26   `digraph`.
27 - `prog` - The graphviz program to render with: `dot`, `neato`, `fdp`, `twopi`,
28   or `circo`.  Defaults to `dot`.
29 - `height`, `width` - Limit the size of the graph to a given height and width,
30   in inches. You must specify both to limit the size; otherwise, graphviz will
31   choose a size, without any limit.
33 [[!meta robots="noindex, follow"]]