Hi All.
Has anyone played with accessing the graphviz plugin from Velocity?
I have managed to get it creating graphs from my objects and
displaying with various options, but I seem to be stumbling on the
last step of adding client side image maps to allow the user to drill
down easily.
The problem is that if I call $xwiki.graphviz.outputDotImage($graph,
"cmapx", true) it will only render the mapping file (which I need)
instead of the whole page so I am assuming I have to call
$xwiki.graphviz.getDotImage($graph, "cmapx", true) and then display
it. I have also tried to write it, then access it via
$xwiki.getExternalURL() but no go.
It works as expected when you retrieve it from a separate file, but
not on the fly. Just a reference returned that doesn't seem to
respond to Name or Value methods.
Example below:
#set($graph = 'digraph abstract {"Node 1"[URL=WebHome];"Node
2"[URL=WebHome]; "Node 1" -> "Node 2";}')
#set($graphfilename = $xwiki.graphviz.writeDotImage($graph, "jpg",
true))
<img src="/xwiki/bin/dot/$doc.web/$doc.name/$graphfilename"
usemap="#abstract">
#set($graphmap = $xwiki.graphviz.getDotImage($graph, "cmapx", true))
$graphmap
Any suggestions are gratefully accepted.
Cheers,
Mark