observablehq / observablehq/plot
Pointer, but that filters everything with a matching z value
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 5.4k
- Forks
- 244
- PR merge metrics
- No merged PRs in 30d
Description
For hovering a multi-series line chart, we don’t want to just highlight the current point; we want the highlight the entire line. I expect it’d be pretty easy to extend the current pointer interaction so that instead of just selecting a single index i, it filters the index to everything that has the same z value. Then you could apply this “pointerZ” interaction (name TBD) to a line mark, such that the line closest to the pointer is drawn in a different color.
(We probably also want an “exclude” mode for the pointer interaction to draw things differently when not pointed.)
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.
Research direction
Start by reading the existing pointer interaction and line-mark implementation. Define how matching z values select an entire line, how the proposed pointerZ interaction should be named and applied, and whether exclude mode belongs in the same change; done means the hovered line is visually distinguished and the intended non-hover behavior is specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- d3
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100