local.set(node, value)
Sets the value of this local on the specified node to the value, and returns the specified value. This is often performed using selection.each:
selection.each(function(d) { foo.set(this, d.value); });
If you are just setting a single variable, consider using selection.property:
selection.property(foo, function(d) { return d.value; });
Please login to continue.