Using png or svg image as node (by viz.js)

hi,

I've tried to use a custom image node in viz.js :

s='digraph G {bgcolor="none";size="3.8,3.8";layout=circo;CNTZSW01181->CNTZSW01001 [arrowsize=0,color="#4781BD",penwidth=2];CNTZSW01181 [shape="record", img="sample.png",color="#385D8A",penwidth=2,fontcolor="#FFFFFF"];}';

It failed to load the image.

Anyone could help me?

It is totally unclear at

It is totally unclear at which location Viz.js expects the image to reside.
I have tried numerous places without success.
If you find out, please let us know.

This related thread (Non-Viz.js) may be interesting to you:
http://www.graphviz.org/content/can-i-put-image-node-referencing-url

$ echo "graph { Hermann[shape=none] }" | dot -Tpng  | pngtopnm | pnmcrop | ppmtopgm | pgmtopbm | pbmtobraille
⠈⣿⠁⠀⢹⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⣿⠒⠒⢺⡇⢀⡮⠭⠷⠔⣿⠊⠃⢹⡏⢹⡞⠉⣷⠀⠰⠏⣹⡆⢹⡗⠉⣷⠈⣿⠊⢹⡆⠀
⢀⣿⡀⠀⣸⣇⡈⢷⣄⡤⢀⣿⡀⠀⣸⡇⢸⣇⢀⣿⡀⢰⣏⠼⣇⣸⣇⢀⣿⢀⣿⡀⣸⣇⠀
$

 

Recent comments