Change the height of the legend graphic (specifically for fill)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 28
Description
Currently the height of the "fill" section of the legend "key" (for want of a better word) is fixed:
Please could functionality to change this be implemented. A number of our users find the distinction between line and fill keys to be too indistinguishable (particularly when using plots with wider line thicknesses).
I am aware of https://github.com/plotly/plotly.js/issues/3735 but feel this is much more targeted (thus easier) than a general overhaul of the legend styling.
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 at src/components/legend/style.js around lines 152–153 and trace how the fill section height is applied to legend keys. Determine where a configurable height could be exposed without changing unrelated legend styling. Done means users can distinguish fill and line keys by changing the fill height, with the relevant legend behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100