dash-cytoscape
dash-cytoscape copied to clipboard
cose-bilkent does not work
few issues with this
https://github.com/plotly/dash-cytoscape/blob/master/demos/usage-cose-bilkent-layout.py
throws an error about the conflict between serving locally and external scripts
You have set your config to serve_locally=True
but A local version of https://cdn.rawgit.com/cytoscape/cytoscape.js-cose-bilkent/d810281d/cytoscape-cose-bilkent.js is not available.
If you added this file with app.scripts.append_script
or app.css.append_css
, use external_scripts
or external_stylesheets
instead.
See https://dash.plotly.com/external-resources
seems like you have built in 'close-bilkent' into your code somewhere instead of 'cose-bilkent' as you get an error pop up saying it is looking for 'close-bilkent'
Invalid argument layout.name
passed into Cytoscape with ID "cytoscape".
Expected one of ["random","preset","circle","concentric","grid","breadthfirst","cose","close-bilkent","cola","euler","spread","dagre","klay"].
demo works if you replace the external script loading with
cyto.load_extra_layouts()
then replace all instances of 'close-bilkent' in the local cyto files with 'cose-bilkent'
Hey @hroyd! Pull request #147 handles this fix. It's been merged into master to go out with the next release. In the meantime, you can install the repo directly by using the below options.
For the latest commit on master:
pip install git+https://github.com/plotly/dash-cytoscape
or to install the specific #147 merge commit
pip install git+https://github.com/plotly/dash-cytoscape@81714a031307594a1c01b73bbc869b4f40bde094
It'd be great if this fix could be pushed out :-D
Thanks @MrTeale! I got this error though:
WARNING: pipenv requires an #egg fragment for version controlled dependencies. Please install remote dependency in the form git+https://github.com/plotly/dash-cytoscape#egg=
. ✘ Installation Failed
(I'm using pipenv
but it's supposedly the same with pip
.)
Folowing advice here which led me to here, I had to use this to update to the latest version (note the #egg=...
):
$ pip install git+https://github.com/plotly/dash-cytoscape#egg=dash-cytoscape