Counting of Seats

In gojs Seating chart
Is it possible to count no of seats around the table ?

Yes, but it depends on how the template was defined. As you can see in the code, the 3 templates all put seats in a Spot Panel (that happens to be the whole Node). The first element of that Panel is the table Shape; the rest are seat objects.

So:
node.elements.count-1
where node is a reference to the whole table object.

The complete source code for the sample is right there. If you are basing your app on it, you will need to spend the time understanding why every single expression in it is there. That way you will know what code to delete or modify for your purposes, and you won’t be surprised by anything it can do or doesn’t do. The samples are meant to demonstrate one way of accomplishing some techniques. They can get you started, but you still need to be responsible for everything in it, as if you had written it all yourself.


Hi Walter,
Thanks for your reply…I tried and its working