<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>graph</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="../../style.css" type="text/css" /> <link rel="stylesheet" href="../../local.css" type="text/css" /> <meta name="robots" content="noindex, follow" /> </head> <body> <div class="page"> <div class="pageheader"> <div class="header"> <span> <span class="parentlinks"> <a href="../../index.html">ikiwiki</a>/ <a href="../../ikiwiki.html">ikiwiki</a>/ <a href="../directive.html">directive</a>/ </span> <span class="title"> graph </span> </span> </div> </div> <div id="pagebody"> <div id="content" role="main"> <p>The <code>graph</code> directive is supplied by the <a href="http://ikiwiki.info/plugins/graphviz/">graphviz</a> plugin.</p> <p>This directive allows embedding <a href="http://www.graphviz.org/">graphviz</a> graphs in a page. Example usage:</p> <pre><code>[[!graph src="a -> b -> c; a -> c;"]] </code></pre> <p>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, <a href="../wikilink.html">WikiLinks</a> can also be used. For example:</p> <pre><code>[[!graph src=""" google [ href="http://google.com/" ] sandbox [ href=[[SandBox]] ] help [ href=[[ikiwiki/formatting]] ] newpage [ href=[[NewPage]] ] google -> sandbox -> help -> newpage -> help -> google; """]] </code></pre> <p>The <code>graph</code> directive supports the following parameters:</p> <ul> <li><code>src</code> - The graphviz source to render.</li> <li><code>file</code> - A file in the wiki containing the graphviz source.</li> <li><code>type</code> - The type of graph to render: <code>graph</code> or <code>digraph</code>. Defaults to <code>digraph</code>.</li> <li><code>prog</code> - The graphviz program to render with: <code>dot</code>, <code>neato</code>, <code>fdp</code>, <code>twopi</code>, or <code>circo</code>. Defaults to <code>dot</code>.</li> <li><code>height</code>, <code>width</code> - 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.</li> </ul> </div> </div> <div id="footer" class="pagefooter" role="contentinfo"> <div id="pageinfo"> <div id="backlinks"> Links: <a href="../../plugins/graphviz.html">plugins/graphviz</a> </div> <div class="pagedate"> Last edited <span class="date">Tue Feb 26 23:01:54 2019</span> <!-- Created <span class="date">Tue Feb 26 23:01:54 2019</span> --> </div> </div> <!-- from ikiwiki --> </div> </div> </body> </html>