尝试了如下选项:
avoidOverlap: true, // prevents node overlap, may overflow boundingBox if not enough space
avoidOverlapPadding: 10, // extra spacing around nodes when avoidOverlap: true
nodeDimensionsIncludeLabels: false, // Excludes the label when calculating node bounding boxes for the layout algorithm
spacingFactor: undefined,但在dagre layout....tried "nodeSep:1000“中没有用处,但该图太滞后,因为它影响所有节点。
发布于 2018-03-15 15:33:35
我在同心布局上遇到了同样的问题,所以我不得不自己做一个布局,方法是:
cy.nodes("[id = '" + node + "']").shift('x', x);
cy.nodes("[id = '" + node + "']").shift('y', y); 如果你找不到任何其他的解决方案,你可以这样做。我首先运行'null‘布局,然后获取我的cytoscape图中有多少个节点,有了这些信息,您就可以根据这些信息设置x和y坐标。事情有点复杂,如果你找到解决方案,请让我知道。
https://stackoverflow.com/questions/49279279
复制相似问题