Skip to content

fix: vertically center chart tooltip and legend markers#4723

Open
ClaudioGSDB wants to merge 1 commit into
mainfrom
fix/chart-marker-alignment
Open

fix: vertically center chart tooltip and legend markers#4723
ClaudioGSDB wants to merge 1 commit into
mainfrom
fix/chart-marker-alignment

Conversation

@ClaudioGSDB

@ClaudioGSDB ClaudioGSDB commented Jul 14, 2026

Copy link
Copy Markdown
Member

Description

Chart series markers weren't vertically centered against their label in tooltips (and legends) - the marker sat low/high depending on type, because each marker carried a hardcoded margin-block-start to fake alignment under a top-aligned (flex-start) row.

Fix - center the row and drop the magic margins so alignment is geometric:

  • chart-series-details: the key row uses align-items: center instead of flex-start.
  • chart-legend: legend item row align-items: center.
  • chart-series-marker: removed margin-block-start from .marker, .marker--line, and .marker--dashed.

Affects chart tooltips and legends (shared marker), so expect visual-snapshot diffs across those. Note: multi-line tooltip keys now center the marker against the whole block rather than the first line.

Related links, issue #, if available: n/a

How has this been tested?

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.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.59%. Comparing base (cfd3761) to head (21d1e3c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4723   +/-   ##
=======================================
  Coverage   97.59%   97.59%           
=======================================
  Files         950      950           
  Lines       30690    30690           
  Branches    11254    11254           
=======================================
  Hits        29953    29953           
  Misses        730      730           
  Partials        7        7           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ClaudioGSDB ClaudioGSDB added this pull request to the merge queue Jul 14, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Jul 14, 2026

@pan-kot pan-kot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks alignment when drill-down feature is used.

Image

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.

3 participants