Overlapping of nodes

Hi, I am having the xml to create a go.js GraphLinksModel diagram display. The xml i have used to create the nodes are attached herewith. I am getting the nodes overlapped each other for this xml alone like this. Could you please let me know how to avoid overlapping of nodes with each other.

Expected result:


xml used:

"


0
0
WebServices.gif













1033




CUST_NAME





DefaultDBA


07/26/2016
IDS Master



0
0
WebServices.gif




















04






UD_customerFirstName
UD_customerLastName




UD_customerFirstName


UD_customerMiddleName


UD_customerLastName






04






UD_customerFirstName
UD_customerMiddleName
UD_customerLastName




UD_customerFirstName


UD_customerMiddleName


UD_customerLastName







*



CUST_NAME














DefaultCustomerName






"

GoJS does not natively use XML, and I cannot read what you posted here, so it’s hard for me to help.

From your screenshot it appears that you do not have a Binding of your Node.location.

And your template(s) could be better with the positioning of what I assume are multiple ports. Again, I’m just guessing here.

I am binding it with
new go.Binding(“location”, “loc”, go.Point.parse).makeTwoWay(go.Point.stringify),

Yes. I understood that GoJS does not use XML, but I am reading the data from XML and insert into the nodeArray and LinkArray.

myDiagram.model = new go.GraphLinksModel(nodeArray, linkArray);
myDiagram.layout = $$(go.TreeLayout);

Node Array data:

linkArrray Data:

Regards,
R.Venkades

Well, what are the values of data.loc? I can’t tell if those values can be parsed by Point.parse.

Are you using the go-debug.js library and checking the console window carefully?

I have debugged it with go-debug.js, getting an error message. Not sure what needs to be done. could you please help me out. This issue is happening only for specific data and not for others

The binding errors tell you that you are trying to bind Panel.location, but that property is undefined – it does not exist in the GoJS API. location is only defined on Parts, i.e. it should be on your Node. That explains why your nodes are all at 0,0.

I don’t know why you are getting the NaN error. I recommend that you debug that, to look on the stack to get a clue why it’s happening.