formatting
[ikiwiki.git] / doc / ikiwiki / directive / graph.mdwn
1 The `graph` directive is supplied by the [[!iki plugins/graphviz desc=graphviz]] plugin.
2
3 This directive allows embedding [graphviz](http://www.graphviz.org/)
4 graphs in a page.  Example usage:
5
6         \[[!graph src="a -> b -> c; a -> c;"]]
7
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:
11
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         """"]]
20
21 The `graph` directive supports the following parameters:
22
23 - `src` - The graphviz source to render.
24 - `type` - The type of graph to render: `graph` or `digraph`.  Defaults to
25   `digraph`.
26 - `prog` - The graphviz program to render with: `dot`, `neato`, `fdp`, `twopi`,
27   or `circo`.  Defaults to `dot`.
28 - `height`, `width` - Limit the size of the graph to a given height and width,
29   in inches. You must specify both to limit the size; otherwise, graphviz will
30   choose a size, without any limit.
31
32 [[!meta robots="noindex, follow"]]