Conversation
|
Documentation at https://observablehq.com/@d3/d3-group will need an update when this lands. (I've also added a section on d3.index, if you want to proofread it.) Note that the paragraphs about key equality are defensive, and we'll need to mention the version number which solves this. It's worth noting that while InternMap can index on an array, by passing a key function, there is no way to pass a key function to d3.group (and rollup and index).
|
|
I've added documentation in #186. |
|
I thought about exposing the configurable key function through d3.group et al. but that feels like overkill to start. (I mainly think configurable keys are useful for compound keys; compound keys aren’t typically needed with d3.group because it’s already nested, and furthermore JSON.stringify is slow.) If we do need to expose it in the future, it could be something like Thanks for writing docs! I’ll check ’em out now. |
Fixes #184.
Playground: https://observablehq.com/d/d4c5f6ad343866b9