Closed zedrdave closed 3 years ago
Hello @zedrdave
Thanks for submitting this. I'll look into this in the morning if you can share some more information about your environment and how to reproduce this please.
Are you running Jupyter Lab or Jupyter Notebook? Chord pro only supports outputting to Jupyter Lab cells, just in case you're using the latter.
If that's not the issue, please let me know what package versions you're using, and if you are connecting via a VPN, etc! If outputting to png works, it could be Jupyter Lab plug-in causing an issue - which are installed?
Best,
Shahin
I am indeed running Jupyter Notebook, not Lab. I didn't realise that .show()
wasn't supposed to work with the former…
The HTML seems to be mostly displayable (it even works using .to_html()
and %%html
), except for that strange error mentioned above.
Hi @zedrdave
It seems that's the cause! Jupyter Lab had become popular as their "next-generation" [1] web interface when I first created the chord
library, so I focussed support on that. It still operates on Jupyter notebooks, but functions a little differently behind the scenes [2].
I think I would need to write a Jupyter Notebook extension to get it working in both! However, I believe the diagram is being generated correctly, this is why .to_html()
works (as it does from python at terminal too).
[1] https://jupyterlab.readthedocs.io/en/stable/getting_started/overview.html [2] https://github.com/shahinrostami/chord#the-chord-package
Just installed and ran the latest version (with a Pro licence) and can't seem to get the HTML display to work in Jupyter.
I tested with the sample code, and png works, but
.show()
just results in an empty output.Digging through the browser console, I'm seeing:
[Error] ReferenceError: Can't find variable: d3 (anonymous function) (Script Element 10:24)
… Line 24 contains:colors = d3.schemeSet1;
There indeed seems to be a problem in how d3 is imported…