Reputation: 1599
Per D3 v4 documentation, function syntax for data()
is given as selection.data([data[, key]])
.
This suggests to me data
AND key
are optional parameters for data()
. But wouldn't data
always be a required parameter? I know key
is optional and defaults to the array index if not specified - but why would the data
parameter ever be optional, what is the point of binding nothing to DOM elements?
Upvotes: 0
Views: 139