Hi,
I have following node Template,
And i want to add SVG image in Diamond shape,
I have tried using $(go.Picture) but it is not working.
Will it be possible to add picture in this shape, if Yes, can you please guide, how can we achieve it.
$(go.Node, "Spot",
// the main element of the node
$(go.Panel, "Auto",
{ width: 50, height: 50 },
$(go.Shape, "Diamond", { spot1: go.Spot.TopLeft, spot2: go.Spot.BottomRight, . . .}),
$(go.Picture, ...yourSVGimagefileURL, { width: ..., height: ... })
),
. . . // the ports or other elements of the node
)
Depending on the natural size of the SVG, you might need to put the Picture into a “Viewbox” Panel so that it is automatically scaled to fit in the 50x50 area of the “Auto” Panel.