patrickfuller / jgraph

An embeddable webGL graph visualization library.
http://patrickfuller.github.io/jgraph
MIT License
133 stars 31 forks source link

jgraph graphs do not render in Jupiter lab? #13

Open smartinsightsfromdata opened 6 years ago

smartinsightsfromdata commented 6 years ago

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?

leeweizhe1993 commented 5 years ago

Same as you @smartinsightsfromdata

CrashLaker commented 5 years ago

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!

andy-clapson commented 4 years ago

Same issue here, with the same exception.

patrickfuller commented 4 years ago

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!

andy-clapson commented 4 years ago

hey thanks so much @patrickfuller ! I'll use this fix for the moment, but we may take some time to send up a PR.

I really appreciate the quick response here. 👍