jgraph icon indicating copy to clipboard operation
jgraph copied to clipboard

jgraph graphs do not render in Jupiter lab?

Open smartinsightsfromdata opened this issue 6 years ago • 5 comments

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?

smartinsightsfromdata avatar Mar 22 '18 19:03 smartinsightsfromdata

Same as you @smartinsightsfromdata

leeweizhe1993 avatar Aug 20 '19 07:08 leeweizhe1993

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!

CrashLaker avatar Nov 18 '19 12:11 CrashLaker

Same issue here, with the same exception.

andy-clapson avatar Dec 18 '19 16:12 andy-clapson

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!

patrickfuller avatar Dec 18 '19 17:12 patrickfuller

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. 👍

andy-clapson avatar Dec 18 '19 17:12 andy-clapson