Interactive setting for radial layout
I am aiming to achieve the desired layout while minimizing changes to nodes that have a defined position. I've applied all settings that appear to be related to fixed positions, using various combinations, but the layout still does not correspond to the position field. In this example, I used random positions just to observe any changes, but the layout remains unchanged.
const graph = {
id: 'root',
layoutOptions: {
'elk.algorithm': 'radial',
'elk.interactive': 'true',
'elk.interactiveLayout': 'true',
'cycleBreaking.strategy': 'INTERACTIVE',
'layering.strategy': 'INTERACTIVE',
'elk.layered.layering.strategy': 'INTERACTIVE',
'elk.alg.layered.options.LayeringStrategy': 'INTERACTIVE',
'elk.layered.crossingMinimization.strategy': 'INTERACTIVE',
'elk.layered.crossingMinimization.semiInteractive': 'true',
},
children: nodes.map(n => ({
id: n.id,
width: 60,
height: 60,
layoutOptions: {
'elk.position': `(${Math.ceil(Math.random() * 1000)},${Math.ceil(
Math.random() * 1000,
)})`,
},
})),
edges: edges.map(e => ({
id: e.id,
sources: [e.source],
targets: [e.target],
})),
};
Interactive layout does not work for the radial algorithm. Similarly the following options:
'elk.interactive': 'true',
'elk.interactiveLayout': 'true',
'cycleBreaking.strategy': 'INTERACTIVE',
'layering.strategy': 'INTERACTIVE',
'elk.layered.layering.strategy': 'INTERACTIVE',
'elk.alg.layered.options.LayeringStrategy': 'INTERACTIVE',
'elk.layered.crossingMinimization.strategy': 'INTERACTIVE',
'elk.layered.crossingMinimization.semiInteractive': 'true',
only work for the layered algorithm. You can find all radial options here.
@soerendomroes Thanks. As I understood there is no way to define desired place for specific node on the circle?
@Eddykasp do you know whether this works? To my understanding the order is determined by the order in the model.
I can change the order by using sorter and orderId fields, but I would like also to have some of the nodes always above / under / on the right or left sides of the root node
I don't think that's currently possible.