How to increase text with linking?

Thank you.

The first thing I notice in your code is that you are executing startTransaction/commitTransaction within a loop. That’s definitely not what you want to do.

The second thing I notice is that your nodesTarget and nodesSource functions do not return anything. (Well, technically, they return undefined.)

Regarding your node template, it should be easy enough to change the Node panel type to be “Vertical” and add a TextBlock below the rest of the original template. Remember to move the properties and Bindings that apply to Nodes or Parts up from the panel that had been the original Node panel.

  $(go.Node, "Auto",
    // Node or Part properties and Bindings
    // Panel or GraphObject properties and Bindings
    ...BODY...
  )

becomes:

  $(go.Node, "Vertical",
    // Node or Part properties and Bindings
    $(go.Panel, "Auto",
      // Panel or GraphObject properties and Bindings
      ...BODY...
    )
    $(go.TextBlock, ...)
  )