Reputation: 41
Created a graph using cytoscape.js in hierarchical structure. I am placing some charts and labels near each node at right position of the node but it is overlapping the nearer node in hierarchical structure. Is there any way to make space between nodes?
Upvotes: 2
Views: 4689
Reputation: 81
Use nodeSep
property in your layout
options
For example:
var cy = window.cy = cytoscape({
container: document.getElementById('cy'),
layout: {
stop: function () {
cy.automove({
nodesMatching: cy.$(':parent *'),
reposition: 'drag',
dragWith: cy.$(':parent *')
});
},
name: 'cose-bilkent',
animate: 'end',
nodeSep: 20, // >>>>>>YOUR TARGET PROPERTY<<<<<<<
animationEasing: 'ease-out',
animationDuration: 2000
}});
Upvotes: 1
Reputation: 12242
You can play with the layout options. If that is insufficient, then please file a feature request if you want to request new features or options.
Upvotes: 1