Skip to main content

Circular Layout

Arranges all the nodes/groups in the toolkit instance into a circle, with a radius sufficiently large that no two nodes/groups overlap.

Circular layout

Parameters

  • {number} padding Optional, defaults to 30. The minimum amount of padding to leave between any nodes.

  • {boolean} centerRoot Optional. If true, the root vertex is placed in the center of the circle.


Simple Example

toolkit.render(someElement, {
layout:{
type:"Circular"
}
});

Centered root vertex example

toolkit.render(someElement, {
layout:{
type:"Circular",
options:{
centerRoot:true
}
}
});
Root vertex in center