Skip to content

fix: chart legend shows series names when not hovering - #412

Merged
andeplane merged 2 commits into
mainfrom
fix/figure-legend-always-visible
Aug 15, 2026
Merged

fix: chart legend shows series names when not hovering#412
andeplane merged 2 commits into
mainfrom
fix/figure-legend-always-visible

Conversation

@andeplane

Copy link
Copy Markdown
Owner

The dygraphs legendFormatter returned an empty string whenever data.x == null (no hovered point), so the legend: "always" box rendered as an empty rectangle. The legend now always lists the series names with their color dots; hovering additionally shows the values, exactly as before.

Fixes #407

🤖 Generated with Claude Code

andeplane and others added 2 commits August 15, 2026 21:50
The dygraphs legendFormatter returned an empty string whenever no point
was hovered, so the always-on legend rendered as an empty box. Series
names and color dots now stay visible; hover adds the values.

Fixes #407

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Review fix: the library default is a fixed 250px-wide legend with no
height cap, which an always-on legend would let cover small charts
(RunAnalysis figures go down to 320px). Shrink to content, cap at 45%
of the chart, drop the double padding/background, and pass pointer
events through to the plot.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@andeplane
andeplane merged commit f75c05e into main Aug 15, 2026
2 checks passed
@andeplane
andeplane deleted the fix/figure-legend-always-visible branch August 15, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chart legend is empty unless hovering

1 participant