Created
October 1, 2017 16:00
-
-
Save fabioricali/2a7d0db87c24cdb294aff356c971335d to your computer and use it in GitHub Desktop.
Dracula test
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
<html> | |
<head> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/raphael/2.2.1/raphael.js"></script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/graphdracula/1.0.3/dracula.min.js"></script> | |
<script type="text/javascript"> | |
function graph() { | |
var g = new Dracula.Graph(); | |
g.addEdge("strawberry", "cherry"); | |
g.addEdge("strawberry", "apple"); | |
g.addEdge("strawberry", "tomato"); | |
g.addEdge("tomato", "apple"); | |
g.addEdge("tomato", "kiwi"); | |
g.addEdge("cherry", "apple"); | |
g.addEdge("cherry", "kiwi"); | |
var layouter = new Dracula.Layout.Spring(g); | |
layouter.layout(); | |
var renderer = new Dracula.Renderer.Raphael('#canvas', g, 400, 300); | |
renderer.draw(); | |
} | |
</script> | |
</head> | |
<body onload="graph()"> | |
<div id="canvas" style="height: 400px; width: 600px;"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment