-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
320 additions
and
11 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.DS_Store | ||
.git | ||
docs | ||
.assets | ||
samples |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
// Ref: https://graphviz.gitlab.io/_pages/pdf/dotguide.pdf | ||
module.exports = require("./graph"); | ||
module.exports = require("./lib/graph"); |
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
let Graph = require('../index'); | ||
|
||
// Create new graph | ||
let g = new Graph(); | ||
g.set({'rankdir': 'LR'}); | ||
|
||
let n1 = g.addNode("node 1"); | ||
n1.set({"shape": "note"}); | ||
|
||
let n2 = g.addNode("node 2"); | ||
n2.set({"shape": "egg"}); | ||
|
||
let e1 = g.addEdge(n1, n2); | ||
e1.set({"color": "purple"}); | ||
|
||
console.log(g.toDot()); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
let Graph = require('../index'); | ||
|
||
// Create new graph | ||
let g = new Graph(); | ||
|
||
// Create nodes | ||
let a = g.addNode("A", {"color": "blue"}); | ||
let b = g.addNode("B"); | ||
let c = g.addNode("C"); | ||
|
||
// Add edge between the two nodes | ||
let e1 = g.addEdge(a, b); | ||
let e2 = g.addEdge(a, c); | ||
let e3 = g.addEdge(b, c, {'constraint': false}); | ||
|
||
// Print dot file | ||
let dotScript = g.toDot(); | ||
console.log(dotScript); |
Oops, something went wrong.