question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jgraph graphs do not render in Jupiter lab?

See original GitHub issue

I run the example notebook in Jupiter notebook and everything works.

I tried to do the same in jupyter lab but the graphs are not rendered.

Any suggestion please?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickfullercommented, Dec 18, 2019

Quick Fix

Run this in the top notebook cell:

%%bash
wget https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.js
wget https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.js

Jupyter lab no longer imports these libraries by default. This cell should download the files to your lab directory, making them importable.

The Right Fix

These dependencies aren’t needed by jgraph and the code could be modified easily enough. (however, I don’t want to support two different implementations for notebook and lab.) If there’s enough interest in using this library, I can put some time into modifying it. I’m also more than willing to review a PR.

Let me know if this helps!

1reaction
CrashLakercommented, Nov 18, 2019

Hi all.

I’m facing the same situation. Is there a fix to this?

image

image

I’m using chrome jgraph-0.2.1 jupyter 4.4.0

thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Graphviz.Source not rendering in Jupyter Notebook
iPython display seems to work for other objects including Matplotlib plots and Pandas dataframes. I should note the example on Graphviz' site also...
Read more >
jgraph by patrickfuller
jgraph. An embeddable webGL graph visualization library. ... The IPython notebook is an open-source tool poised to replace MATLAB in many applications.
Read more >
org.jgraph.graph.GraphConstants.getExtraLabelPositions java ...
Returns the extralabelpositions attribute from the specified map. Extra labels only work with edges currently. Popular methods of GraphConstants. setBounds.
Read more >
Embed a diagram in GitHub markdown
You can use a versioned diagram in a Github README file in a number of ... even if you don't plan to display...
Read more >
How to Draw Graphs in Jupyter Notebook - MakeUseOf
Display your data with Jupyter Notebook graphs. ... jupyter notebook. Note: Do not close the terminal window that you run this command in....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found