You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the README we often have this sentence about the accessor to d3.extent and other reduction methods: "An optional accessor function may be specified, which is equivalent to calling Array.from before computing the extent."
However in most cases the accessor receives the original data as the third argument—whereas Array.from only sends (d, i) to its accessor.
Should we follow the README (and remove the third argument), or update this sentence in the README to be more accurate wrt the existing behavior? I'd vote for updating the README, maybe with the following sentence:
An optional accessor function may be specified, which receives the datum, the index, and the data, and returns the value.
The text was updated successfully, but these errors were encountered:
Another difference is that Array.from accepts values like {length: 42} whereas D3 only accepts values that are iterable. (This is why we do an explicit test for the Symbol.iterator method instead of calling Array.from directly in d3.map.)
In the README we often have this sentence about the accessor to d3.extent and other reduction methods: "An optional accessor function may be specified, which is equivalent to calling Array.from before computing the extent."
However in most cases the accessor receives the original data as the third argument—whereas Array.from only sends (d, i) to its accessor.
Should we follow the README (and remove the third argument), or update this sentence in the README to be more accurate wrt the existing behavior? I'd vote for updating the README, maybe with the following sentence:
The text was updated successfully, but these errors were encountered: