score:1

In my experience, the index passed to any D3 accessor function is always it's index in the DOM, relative to it's parent: https://github.com/d3/d3-selection/issues/73

The workaround I've used for this scenario is to implement in the click-event either an object lookup or an array filter, matching on a unique ID.


Related Query

More Query from same tag