graphviz.js的图形及属性简单用法

 digraph  A {
     graph[bgcolor="cadetblue" label="图的标题" fontsize=48 fontcolor="green",fontname="FangSong"];//字体为仿宋,其他有kaiti
      a [label="Foo"];
    b [shape=box];
    c [shape=egg];    
    d [shape=point];
    e [shape=circle];
    r [shape=triangle];
    f [shape=plaintext]
    g [shape=diamond]
    h [shape=trapezium]
    i [shape=parallelogram]
    j [shape=house]
    k [shape=pentagon]
    l [shape=hexagon]
    m [shape=septagon]
    n [shape=octagon]
    o [shape=doublecircle]
    p [shape=doubleoctagon]
    q [shape=tripleoctagon]
     a->o[label="sdfddd\ndfdfdf"]
     o->p->q;
     a->l->m->n;
     a->i->j->k;
     a->f->g->h;    
     a -> b ->e[color=blue];
     a->c[label="h y"];
     c -> d->r[style=dotted];
    
   
 }

对应图形:

posted on 2017-05-10 10:20  世界之大追梦者  阅读(828)  评论(0编辑  收藏  举报

导航