Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Cytoscape - edgelengths as a function in Python

Hello,

I am trying to create a physics direct network graph using Dash Cytoscape. I have tried using Cose, Cose-Bilkent and now Cola, but my issue is that I cannot get the edge lengths to be cleary directly proportional to the weight.

In JS in Cola you can in the layout parameters for ‘edgeLength’ set to a function e.g. function(e){ return params.edgeLengthVal / e.data(‘weight’); }, but in Python I can’t work out the alternative. Passing a defined function doesn’t work, nor does passing a dict to layout, or specifying the EdgeLength for each element within the data dict.

If I could achieve something like this but in Python that would be ideal. I want to do it in Python as this is one of a series of Dash graphs which are part of a larger project entirely built in Python, and I am not familiar with JS.

Any help much appreciated

Is this post still blocked?