ricklupton / ipysankeywidget

IPython / Jupyter Sankey diagram widget
MIT License
174 stars 24 forks source link

Stuck on "Loading widget" while plotting in jupyterlab #45

Closed alexwwang closed 4 years ago

alexwwang commented 5 years ago

Hey guys, I encounter a problem with sankey widget.

OS: Ubuntu with nodejs10 and d3-sankey package installed. Jupyterlab: 1.1.4 with jlab-manager plugin installed ipywidgets: 7.5.1 python: 3.7.4 browser: chrome and firefox

I make sure ipywidgets works proper but while I test the simple example listed in the document, it shows "Loading widget..." on displaying the sankeywidget object as coding shows below:

layout = Layout(width="500", height="200")
w = SankeyWidget(links=links, margins=dict(top=0, bottom=0, left=50, right=80), layout=layout)
w <- stuck here

I tried to print w.png and it is ''.

So what's the possible reason and what could I do to get the figure? Thanks in advance.

ricklupton commented 4 years ago

Hi, sorry for the slow reply, if you're using Jupyter Lab then ipysankeywidget didn't use to support it -- but now it does! Try the new version 0.3.0.