observablehq / observablehq/plot

Interactive legends

Open
#1,184 5 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
HTML
Stars
5.4k
Forks
244
PR merge metrics
No merged PRs in 30d

Description

It would be great to have interactive legends

There are many interaction patterns where the user interacting with the legend is most intuitive, e.g.:

  1. legend represents the mapping of categories to colors
    --> user may want to unselect/ select categories by clicking on the corresponding color/category in the legend
    --> user may want to change color mappings by clicking on the colors

  2. legend represents the mapping of intervals to colors
    --> user may want to change the interval ranges which would update the Plot

Is it planned the legends will become interactive at one point? Or will the legends remain static and the recommendation is e.g. to build custom Inputs on observable for that?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue identifies interactive legends as a broad feature request but names no files, tests, or entry points. Start by locating the legend implementation and existing interaction patterns; done would require an agreed scope and tests covering category selection, color changes, or interval editing.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.