Shape is not stretching according to the text

Shape is not stretching according to the text please find the below image

I have used wrap: go.TextBlock.WrapFit property in myDiagram.nodeTemplateMap.add("", // the default category )); function
nothing is happening.

Are you using an “Auto” Panel with the Shape as the main element and the TextBlock as the second element? As demonstrated in many samples such as in Minimal GoJS Sample

Thank you so much
Walter , I was using spot instead of auto and also assigned specific width and height for the panel that was creating the problem.

A post was split to a new topic: Stretching a Horizontal Panel horizontally