Margins in TextBlocks


Should it be possible to have a TextBlock with alignment: go.Spot.Right, alignmentFocus:go.Spot.Left and a margin set? The text block is correctly aligned but I’m not seeing a margin

You’re not supposed to see anything in a margin – even the GraphObject.background won’t be drawn in the margin. The margin is used by Panels when deciding how much space to allocate for the object.

If you are trying to adjust the position to be a bit further away from the main object in a Spot Panel, use an alignment Spot with a non-zero offsetX (and/or offsetY). For example:
alignment: new go.Spot(1, 0.5, 8, 0)

Sorry I wasn’t clear. I mean I’m not seeing a space between the text block and the shape it’s aligned to. But it looks like offsetX and offsetY should do the trick, thanks