observablehq / observablehq/plot
Generalize pointer selection
Open
@Fil is already working on this.
Since Aug 9, 2023.
enhancement
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
A “best candidate” function receives as input the channels and max radius, and returns a function that receives the pointer position and returns the best candidate, if any.
This allows a user to build:
- a pointer that knows about rects, or links
- we might want to build Plot.pointerRect as a standard method
- a pointer that is optimized with a quadtree or a spatial tree
- a pointer that returns several data points at the same time (maybe?)
- a pointer that knows about geojson (#1743)
- more custom behaviors?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.