Skip to content

fix: vertically center chart legend and tooltip markers#238

Merged
ClaudioGSDB merged 1 commit into
mainfrom
fix/legend-alignment
Jul 17, 2026
Merged

fix: vertically center chart legend and tooltip markers#238
ClaudioGSDB merged 1 commit into
mainfrom
fix/legend-alignment

Conversation

@ClaudioGSDB

Copy link
Copy Markdown
Member

Description

Legend markers weren't vertically centered against their labels, the marker sat a bit high/low
depending on the font.

The marker used a fixed 2px top margin to fake the alignment, which only worked for one font's
metrics. Swapped that for real centering: align-items: center on the legend item, and flex-center the
marker's SVG (also kills the inline-SVG baseline gap). Now it's pure geometry, so it lines up
regardless of font/theme.

How has this been tested?

Tested locally on Safari, Chrome, and Firefox

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ClaudioGSDB
ClaudioGSDB requested a review from a team as a code owner July 17, 2026 09:27
@ClaudioGSDB
ClaudioGSDB requested review from amanabiy and srungta08 and removed request for a team and srungta08 July 17, 2026 09:27
@ClaudioGSDB
ClaudioGSDB enabled auto-merge July 17, 2026 12:01
@ClaudioGSDB
ClaudioGSDB added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit e2a4303 Jul 17, 2026
44 of 45 checks passed
@ClaudioGSDB
ClaudioGSDB deleted the fix/legend-alignment branch July 17, 2026 12:20
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.

2 participants