splitbrain / dokuwiki-plugin-graphviz

Create Graphviz graphs from within DokuWiki
http://www.dokuwiki.org/plugin:graphviz
12 stars 15 forks source link

features: svg object with links and styles #14

Open fajan opened 9 years ago

fajan commented 9 years ago

examples:

<graphviz dot center> 
digraph example_links{ 
    inpage [URL="[[#TOC title]]"]
    crosspage [URL="[[sibling:niece]]"]
    interwiki [URL="[[doku>plugins:graphviz]]"]
    external [URL="[[http://example.com]]"]
    withtext [URL="[[sibling|Tooltip to use]]"]
    inpage -> crosspage [label="url to head", headURL="[[:rootpage|with tooltip]]"]
    interwiki -> external [label="default url is label", URL="[[:rootns:page]]"]
</graphvhiz>

set style plugin config:

$conf['plugin']['graphviz']['styles'] = '<style name="fixed_green_circle">node [width=.9, shape=circle, style=filled, fillcolor=green, fixedsize=true, fontcolor=white]</style>
<style name=dotted_blue_edges>edge [style=dotted,color=blue]</style>';

and then use styles in graphviz tag, to apply styles:

<graphviz dot center  fixed_green_circle dotted_blue_edges> 
digraph example_style{ 
   node1 -> node2;
}
</graphvhiz>
robbertmichel commented 7 years ago

Hi, Quick question: Did this ever get resolved?

Additionally, @mdaines 's viz.js does this... might it be an idea to piggyback on his solution? That would also solve the URL issues that are requested in 2 of the other pulls.

fajan commented 7 years ago

Hi, resolved 2 years ago, but I'm not sure.

vis.js: I don't see it, how could an npm package help in PHP?

BTW: did you tried out the example code? I tested everything under IE8, chrome and FF, and all url types was fine and clickable.