how to change the type of layout by using viz.js

Dear erg,

Thanks for answering my former questions.

Now, in order to have a better visual effect, I'd like to change the type of the layout, like radial or something else.
For example:

var g = 'digraph G {size = "3,5"; a->b->c;d->e->c;f->g->c;}';

I wanna display this graph by the layout like http://www.graphviz.org/content/twopi2 or http://www.graphviz.org/content/softmaint (has a center, like a circle). Is that possible?

Thanks in advanced.
Best regards.

I got the solution. var g =

I got the solution.

var g = 'digraph G {size = "3,5";layout="twopi"; a->b->c;d->e->c;f->g->c;}';

 

Cool ! There is another

Cool !

There is another option to achieve the same, see "engine":
https://github.com/mdaines/viz.js#usage

I just tested it, "layout" (if specified in .dot file) takes precedence over "engine" setting.

Hermann.

Recent comments