Arrange nodes in pyramid or pascal triangle pattern

Dear Friends,

Greetings! I want to create a chart with arrange nodes in pyramid or pascal triangle(from center) pattern. Pls help me to find and place the nodes in right place.

I want to place my nodes in below pattern with correct gap:
http://questgarden.com/53/64/4/070719143356/index.htm

NOte: in my program, when I click add row button, It has to add new row below the diagram. I did adding all. but arranging is the issue pls help me friends.

Thanks and Regards,
Syed Abdul Rahim

Are you defining your own custom Layout? https://gojs.net/latest/intro/extensions.html#OverridingMethodsBySubclassingLayout

Actually, if you are using links to connect the nodes to determine their layers, you might be able to use TreeLayout. The links could have no Shapes in them, so they would not need to be seen.

Or did you want to specify the layer for each node data object and not use links at all?

I had a few free minutes, so: https://gojs.net/extras/triangle.html

As usual, everything is defined in the page.