Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Is it possible to create a stripped down version for browsers that only generates dot code? #15

Closed
shobhitg opened this issue May 21, 2013 · 1 comment

Comments

@shobhitg
Copy link

Hi,

This is a great Node module for Graphviz diagrams. Unfortunately this can't work in browsers because graphviz isn't available. But what if we could have a browser friendly stripped down version that generates dot code string.
And then I can use https://github.com/mdaines/viz.js to greate diagrams with that dot code in browsers without Node.JS.
Since the author understands his code best, I am requesting you if you can please create a stripped down version that just generates dot code?
Thanks...

@glejeune
Copy link
Owner

You can use to_dot method of the Graph class :

var util = require('util'),
graphviz = require('../lib/graphviz');
var g = graphviz.digraph("G");

// ...

console.log(g.to_dot())

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants