Layereddigraph Layout having nodes with locations and without locations

Hi Walter,

I am using LayereddiGraph Layout.
In that , I have to position the nodes with locations and also the nodes without locations in that layout.

For Eg : nodeDataArray = [
{name : ‘Six’, loc : ‘0 0’},
{name : ‘Seven’, loc : ‘0 30’},
{name : ‘Eight’}
];
In the above data, node Six and Seven has location and node Eight doesn’t has location. So I have to arrange this node in layereddigraph layout.

Is there any option??

Thanks in advance

What are the links? What result do you want?

Sorry…
Link data array should be as follows.

Case 1:
Linkdataarray = [
{from : ‘Six’, to : ‘Seven’},
{from : ‘Seven’, to : ‘Eight’}
]

Case 2:
Linkdataarray = [
{from : ‘Six’, to : ‘Eight’},
{from : ‘Eight’, to : ‘Seven’}
]

For case 2 , nodes should not overlap…
I am struggling on it…

for case 2, what should be the location for node “Eight”?

That is the new node comes from server without location. Six and Seven comes initially and the user saved the location in server.
So I have to arrange that node inbetween or without overlapping anywhere connecting Six and Seven, so that the nodes don’t overlap.

OK, but the question remains:

We didn’t know the location…

This is frustrating. I’m asking what you want the location to be. And how large are the nodes?

Sorry for the inconvenience…
Node size will be (10,10)
Eights location should be between Six and Seven i.e 0 15 or below those nodes assuming random location

Would there have been a LayeredDigraphLayout that had happened originally with just the two nodes and one link? Are you trying to preserve the the locations of all previously laid-out nodes, or only those that had been manually moved by the user?

Hi Walter,
I have told you just the sample of my diagram.
Initially my diagram looks like below,

And after user drags and changes the position and save the position in the server, it looks like below.

Yes, I have to preserve the user dragged location.

But also the next time, when the Server returns data, it gives us the above existed nodes with locations and a node named Exp as the new node without location as below.

So here I have to preserve and locate the previous nodes and locate the new incoming nodes without overlapping.

What if there is no room at the area where the node should go? For example if there are nodes already there and all around there.

Hi Walter,
Thanks for your immediate response.
I asked my TL your doubts, he said that if any new node comes,then we have to redraw the layout diagram and I have completed that behavior by Layout Invalidations.

Thanks…