[[PageOutline(2-5,Contents,pullout)]] = Render xdot formatted graphs == Description Canviz is a wiki macro plugin to render xdot formatted graphs. Canviz is a !JavaScript and [http://code.google.com/p/canviz/ Canvas based graph rendering library] available on Google Code. xdot is a more extensive format than [wikipedia:DOT_(graph_description_language) dot for graphs]. It is used merely because that is what the Canviz project uses. I created this plugin to have something simpler than Graphviz and to push rendering out to the browser rather than on the server. You do not need to install Graphviz, unless you need access to the dot utility (see below). An example Hello World for a Trac wiki is as follows: {{{ {{{ #!canviz digraph G { node [label="\N"]; graph [bb="0,0,74,108", _draw_="c 5 -white C 5 -white P 4 0 0 0 108 74 108 74 0 ", xdotversion="1.2"]; Hello [pos="37,90", width="0.92", height="0.50", _draw_="c 5 -black e 37 90 33 18 ", _ldraw_="F 14.000000 11 -Times-Roman c 5 -black T 37 85 0 32 5 -Hello "]; World [pos="37,18", width="1.03", height="0.50", _draw_="c 5 -black e 37 18 37 18 ", _ldraw_="F 14.000000 11 -Times-Roman c 5 -black T 37 13 0 37 5 -World "]; Hello -> World [pos="e,37,36 37,72 37,64 37,55 37,46", _draw_="c 5 -black B 4 37 72 37 64 37 55 37 46 ", _hdraw_="S 5 -solid S 15 -setlinewidth(1) c 5 -black C 5 -black P 3 41 46 37 36 34 46 "]; } }}} }}} Canviz uses the XDOT format. To convert from DOT to XDOT you can use the `dot` command. To create the above example from DOT: {{{#!sh echo "digraph G {Hello->World}" | dot -Txdot -otemp.xdot }}} which produces the image: [[Image(helloworld.png)]] You can find more extensive examples at [http://www.ryandesign.com/canviz/]. '''Note''': a graphing library offering similar features and with a lower barrier to entry is the MermaidMacro. == Bugs/Feature Requests Existing bugs and feature requests for CanvizPlugin are [report:9?COMPONENT=CanvizPlugin here]. If you have any issues, create a [/newticket?component=CanvizPlugin new ticket]. [[TicketQuery(component=CanvizPlugin&group=type,format=progress)]] == Download Download the zipped source from [export:canvizplugin here]. == Source You can check out CanvizPlugin from [/svn/canvizplugin here] using Subversion, or [source:canvizplugin browse the source] with Trac. == Installation General instructions on installing Trac plugins can be found on the [TracPlugins#InstallingaTracplugin TracPlugins] page. == Recent Changes [[ChangeLog(canvizplugin, 3)]] == Author/Contributors '''Author:''' [wiki:mixedpuppy] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:'''