Reputation: 385
All
Is there any way to draw other shapes than rectangle? circle, polygon, my own symbol?
Also i am looking for a way to write a sentence next to the shape, besides the text inside it.
Thanks
Upvotes: 0
Views: 1531
Reputation: 114
You can use the following code for creating circle instead of rectangle.
<ngx-graph> <ng-template #nodeTemplate let-node> <svg:circle [attr.r]="node.width/2" [attr.cx]="node.width/2" [attr.cy]="node.width/2" [attr.fill]="node.options.color" /> <svg:text alignment-baseline="central" [attr.x]="10" [attr.y]="node.height / 2">node-label</svg:text> </ng-template> </ngx-graph>
Upvotes: 1