Created
April 14, 2017 06:16
-
-
Save jakkaj/2cc7a86dab64f4112efd079de5cc9adc to your computer and use it in GitHub Desktop.
Test run of GraphViz generation in Node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var viz = require('viz.js'); | |
var fs = require('fs'); | |
var svg2png = require("svg2png"); | |
var result = viz("digraph { x -> y -> z; }", { format: "svg" }); | |
svg2png(result) | |
.then(buffer => fs.writeFile("dest.png", buffer)) | |
.catch(e => console.error(e)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment