Skip to content

Instantly share code, notes, and snippets.

@ANorwell
Created December 31, 2010 23:36
Show Gist options
  • Save ANorwell/761427 to your computer and use it in GitHub Desktop.
Save ANorwell/761427 to your computer and use it in GitHub Desktop.
Graph.js server storage
function loadGraph(canvasId, gid) {
var canvas = document.getElementById(canvasId);
var G = new Graph(canvas);
$.get(gServer,
{ type: "graph", id: gid },
function(data) {
G.fromJSON(data[0]["graph"]);
});
return G;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment