TLmaK0 / gravizo

How to include graphviz graphs in github README

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Github example doesn't work

sim6 opened this issue · comments

Hello,

Firstly, thanks for your work.

The following text is copyed from https://gravizo.com

  • Code:
![Alt text](https://g.gravizo.com/svg?
  digraph G {
    aize ="4,4";
    main [shape=box];
    main -> parse [weight=8];
    parse -> execute;
    main -> init [style=dotted];
    main -> cleanup;
    execute -> { make_string; printf}
    init -> make_string;
    edge [color=red];
    main -> printf [style=bold,label="100 times"];
    make_string [label="make a string"];
    node [shape=box,style=filled,color=".7 .3 1.0"];
    execute -> compare;
  }
)
  • Result:
    ![Alt text](https://g.gravizo.com/svg?
    digraph G {
    aize ="4,4";
    main [shape=box];
    main -> parse [weight=8];
    parse -> execute;
    main -> init [style=dotted];
    main -> cleanup;
    execute -> { make_string; printf}
    init -> make_string;
    edge [color=red];
    main -> printf [style=bold,label="100 times"];
    make_string [label="make a string"];
    node [shape=box,style=filled,color=".7 .3 1.0"];
    execute -> compare;
    }
    )

I cannot see the graph using the preview.

It works encoding the graph description

  • Code:
![Alt text](https://g.gravizo.com/svg?digraph%20G%20%7B%0A%20%20aize%20%3D%224%2C4%22%3B%0A%20%20main%20%5Bshape%3Dbox%5D%3B%0A%20%20main%20-%3E%20parse%20%5Bweight%3D8%5D%3B%0A%20%20parse%20-%3E%20execute%3B%0A%20%20main%20-%3E%20init%20%5Bstyle%3Ddotted%5D%3B%0A%20%20main%20-%3E%20cleanup%3B%0A%20%20execute%20-%3E%20%7B%20make_string%3B%20printf%7D%0A%20%20init%20-%3E%20make_string%3B%0A%20%20edge%20%5Bcolor%3Dred%5D%3B%0A%20%20main%20-%3E%20printf%20%5Bstyle%3Dbold%2Clabel%3D%22100%20times%22%5D%3B%0A%20%20make_string%20%5Blabel%3D%22make%20a%20string%22%5D%3B%0A%20%20node%20%5Bshape%3Dbox%2Cstyle%3Dfilled%2Ccolor%3D%22.7%20.3%201.0%22%5D%3B%0A%20%20execute%20-%3E%20compare%3B%0A%7D)
  • Result:
    Alt text

Thanks again

Hi @sim6, a months ago Github removed the multi-line feature from urls #29, so the only way today to make it work with Github is using the indirect way http://www.gravizo.com#howto

of course, I should update the gravizo.com documentation.

The title of this issue should actually be "http://www.gravizo.com/ example doesn't work" - I think the GitHub examples all work. See also #47.