We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to render multiple jgraph views on one page? For example:
jgraph.create('.graph-left'); $.getJSON('graphs/lesmis.json', function (graph) { jgraph.draw(graph); }); jgraph.create('.graph-right'); $.getJSON('graphs/lesmis.json', function (graph) { jgraph.draw(graph); });
When I run this, the .graph-right div shows a jgraph, but .graph-left does not.
.graph-right
.graph-left
Thanks!
The text was updated successfully, but these errors were encountered:
You can deep copy the jgraph object to run independent canvases. Something like this should work:
jgraph
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.
Sorry, something went wrong.
Great, thanks!
No branches or pull requests
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!
The text was updated successfully, but these errors were encountered: