Display sum of child node data in parent node

Hi,

My nodes all contain a counter in their node data. I would like to display the sum of the child node counters in the parent nodes.

Is there some way to do this in the nodeTemplate? I was hoping to bind a field to a function that would do this.

e.g.

new go.Binding(“text”, “text”, function() { sumCounters=“sum of the child node counters”; return sumCounters })

thanks

Have you seen this sample: Tournament ?