Properties for the "last parents" need to be the "last second parent"

I have some questions with the TreeLayout.
I need to implement kind of this effect:


But what i got in the document was <properties for the “last parents”> i could use.
So i have done like this:

what should i do?
thanks a lot!!!

I just want the last two nodes link like the first pic.

Which are the “last two nodes” that you are talking about?

The general answer to your question is that you can override TreeLayout | GoJS API to assign whatever specific TreeVertex properties that you want for any particular Node. But I still do not understand exactly what you want and what you have implemented so far.

Thank you @walter , sorry for my bad expression. I will check the link you mentioned.