Hey, I’m currently building a Dash app with a cytoscape and having a question:
Im changing the layout of my cytoscape via radiobuttons.
- I wanted to avoid overlapping on my preset layout. It almost looks like a grid so I thought I also can take grid and somehow avoid the overlapping with it.
However I also have to take the positions into account, setting position of each node individually.
I found the
position: function( node ){}, // returns { row, col } for element
-property of the layout on the cytoscape website however I cannot pass a function because its not Json serializable.
I think here it wouldn’t be much of an issue if theres no way to do it, I could also try to avoid overlapping in preset with some math.
2: On my concentric layout I also need to give some nodes a higher degree/(higher circle level) than others. Is there a way to do it except over functions I cannot pass:
concentric: function( node ){ // returns numeric value for each node, placing higher nodes in levels towards the centre
return node.degree();
},
levelWidth: function( nodes ){ // the variation of concentric values in each level
return nodes.maxDegree() / 4;
},
Thank you for your time