Skip to content

Instantly share code, notes, and snippets.

@ignovak
Created October 6, 2013 21:04
Show Gist options
  • Save ignovak/6859109 to your computer and use it in GitHub Desktop.
Save ignovak/6859109 to your computer and use it in GitHub Desktop.
clearfix
/**
* clearfix
*/
.left, .right {
width: 200px;
margin: 20px;
}
.left {
float: left;
}
<div class='main'>
<div class='left'>
I have a data structure that represents a directed graph, and I want to render that dynamically on an HTML page. Does anyone know of any JavaScript code that can do a reasonable job with graph layout? These graphs will usually be just a few nodes, maybe ten at the very upper end, so my guess is that performance isn't going to be a big deal.
</div>
<div class='right'>
Ideally, I'd like to be able to hook it in with jQuery so that users can tweak the layout manually by dragging the nodes around.
Edit: Google's Visualization API seems to be more "graphs as charts" oriented than "graphs as nodes" oriented. I didn't see any node-oriented visualizations already built there, anyway. Do you know that one exists?
</div>
</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment