gremlin-graphviz
Use Graphviz to visualize Gremlin graphs.
This module is a mashup of ts-tinkerpop and
node-graphviz.
Usage
You must first install the Graphviz package in a platform-specific manner.
Check out the unit tests for more, but here is a taste:
var TP = require('ts-tinkerpop');
var gremlinGraph = TP.TinkerFactory.createClassic();
var gremlinGraphviz = require('gremlin-graphviz');
gremlinGraphviz(gremlinGraph).
then(function (graphvizGraph) {
var dotGraph = graphvizGraph.to_dot();
graphvizGraph.use = 'fdp';
graphvizGraph.output('png', function (data) {
require('fs').writeFileSync('graph.png', data);
}, function (code, stdout, stderr) {
throw new Error('fdp failed: ' + stderr);
});
});