@nitin291989 wrote:
How to add a text/label inside a shape?
@walter, I have modified the "myRowHeaders" from the sample : https://gojs.net/temp/timelineInfinite.html to the following:
Now, i wanted to have some texts inside the 2 shapes: "Square" and "Rectangle".
myRowHeaders = $(go.Diagram, "myRowHeadersDiv", { nodeTemplate: $(go.Node, "Auto", ... $(go.Panel, "Horizontal", { alignment: go.Spot.Left}, $(go.Shape, "Square", { ... click: function (e, shape) { ... } } ), $(go.Panel, "Vertical", ... $(go.TextBlock, ... ), $(go.Shape, "Rectangle", { click: function (e, shape) { ... } }, ) ) ) ) });
How this can be achieved?
Thanks.
Posts: 12
Participants: 2