Open fredhohman opened 7 years ago
You can deep copy the jgraph
object to run independent canvases. Something like this should work:
var left, right;
left = $.extend({}, jgraph);
right = $.extend({}, jgraph);
left.create('.graph-left');
$.getJSON('graphs/lesmis.json', function (graph) {
left.draw(graph);
});
right.create('.graph-right');
$.getJSON('graphs/lesmis.json', function (graph) {
right.draw(graph);
});
Longer term, jgraph should be reorganized to make this easier.
Great, thanks!
Is it possible to render multiple jgraph views on one page? For example:
When I run this, the
.graph-right
div shows a jgraph, but.graph-left
does not.Thanks!