How to put text on top of rest of node?


Is it possible to align the text outside of a shape ?
Eg :

I want the text block ‘Step-down transformer’ in this case, outside of a shape.

Currently, i am using this in the node template: $(go.TextBlock, { background: “red”, alignment: new go.Spot(0, 0, 20, 0) }… but this creates the text block inside the shape at the top-center. Tried changing the co-ordinates with -ve value but not able to crack that.

Is there any other way to do this ?

Is your Node template a “Spot” Panel where the second element is the TextBlock and the first element is the rest of the node?

Node "Spot"
    Panel "Auto"
        Shape { geometryString: ...two interlocking circles... }
    TextBlock { alignment: go.Spot.Top, alignmentFocus: go.Spot.Bottom }