layout icon indicating copy to clipboard operation
layout copied to clipboard

Feature request: support some GraphViz features

Open DavidBJaffe opened this issue 3 years ago • 6 comments

Hi -- this crate is really cool!!

I tested an example

digraph G {
node [width=0.13,height=0.13,fontsize=10,shape=point];
edge [fontsize=18,penwidth=1.3,arrowsize=1.3,fontname=Arial];
rankdir=LR;
labeljust=l;
margin=0;
15 -> 10 [minlen=2,color=red,label="0 (len=173,supp=807)"];
5 -> 15 [minlen=2,color=red,label="1 (len=430,supp=1567)"];
10 -> 7 [minlen=1,color=black,label="2 (len=26,supp=541)"];
7 -> 10 [minlen=1,color=black,label="3 (len=30,supp=951)"];
0 -> 7 [minlen=2,color=red,label="4 (len=618,supp=3220)"];
14 -> 13 [minlen=2,color=red,label="5 (len=632,supp=269)"];
11 -> 15 [minlen=1,color=black,label="6 (len=43,supp=40)"];
}

and got this output

image

as compared to what running dot yields

image

It would be awesome to get closer to the dot output.

Thank you very much!!

DavidBJaffe avatar Dec 10 '22 15:12 DavidBJaffe

There are a few things that layout can do better. First, it does not support he shape 'point'. Second, the edge crosses one of the labels. Third, I agree that it would be better to round some of the edges (the support for that is limited).

nadavrot avatar Dec 10 '22 23:12 nadavrot

@DavidBJaffe were there charts that the program rendered well?

nadavrot avatar Dec 10 '22 23:12 nadavrot

Well I have a lot of graphs that look kind of like the above one (and which are generated by another program). I think it's pretty good as is.

DavidBJaffe avatar Dec 11 '22 01:12 DavidBJaffe