X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9921a4a8a1a696ce69acce5e14943f0149d926ff..c18b85451625ff5b7ba8940c43f6703cc3b795d3:/doc/ikiwiki/directive/graph.mdwn?ds=sidebyside diff --git a/doc/ikiwiki/directive/graph.mdwn b/doc/ikiwiki/directive/graph.mdwn index 48eb7e340..1463420d7 100644 --- a/doc/ikiwiki/directive/graph.mdwn +++ b/doc/ikiwiki/directive/graph.mdwn @@ -1,17 +1,27 @@ -The `graph` directive is supplied by the [[!iki plugins/graphviz]] plugin. +The `graph` directive is supplied by the [[!iki plugins/graphviz desc=graphviz]] plugin. -This directive allows embedding [graphviz](http://www.graphviz.org/) graphs in a -page. Example usage: +This directive allows embedding [graphviz](http://www.graphviz.org/) +graphs in a page. Example usage: \[[!graph src="a -> b -> c; a -> c;"]] -Note that graphs will only show up in previews if your browser has -[[!wikipedia data: URI]] support, or if the same graph already exists on that -page. +Nodes on the graph can link to external urls using regular graphviz syntax, +and a clickable imagemap will be created. As a special extension for +ikiwiki, [[WikiLinks|ikiwiki/wikilink]] can also be used. For example: + + \[[!graph src=""" + google [ href="http://google.com/" ] + sandbox [ href=\[[SandBox]] ] + help [ href=\[[ikiwiki/formatting]] ] + newpage [ href=\[[NewPage]] ] + + google -> sandbox -> help -> newpage -> help -> google; + """]] The `graph` directive supports the following parameters: - `src` - The graphviz source to render. +* `file` - A file in the wiki containing the graphviz source. - `type` - The type of graph to render: `graph` or `digraph`. Defaults to `digraph`. - `prog` - The graphviz program to render with: `dot`, `neato`, `fdp`, `twopi`,