How to shuffle the node data array

Hi,

I have requirement where draggable nodes and links are created in graph if user randomly creates the node and then he realizes and shuffle the nodes by dragging so but nodedataarray will no arranged right is there any option to shuffle the nodedataarray

In general the order of data objects in the Model.nodeDataArray does not matter, although it can affect the results of the layout.

What do you mean by “shuffle the nodes by dragging”? Do you just mean move the nodes around? If you want the model to retain the last location for each node, make sure there is a TwoWay Binding on the Node’s “location” property in your node template(s). Many of the samples include such a binding:

new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),