Skip to content

s2 line hover labels#828

Merged
madelineluke merged 10 commits into
mainfrom
feat/s2-line-hover-labels
Jul 8, 2026
Merged

s2 line hover labels#828
madelineluke merged 10 commits into
mainfrom
feat/s2-line-hover-labels

Conversation

@madelineluke

@madelineluke madelineluke commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Description

Add hover labels to s2 line chart points, including dimension hover. The hover labels also have a cascading formula in place that offset the labels to avoid collision.

Related Issue

Motivation and Context

Provide point data info on line charts.

How Has This Been Tested?

Unit tests and storybook

Screenshots (if appropriate):

Screenshot 2026-07-06 at 4 40 52 PM

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@sonarqubecloud

sonarqubecloud Bot commented Jul 6, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown


/** Minimum vertical gap (px) between co-located labels per chart size tier. Base M = 12px. */
const BASE_LABEL_GAP = 12;
export const CHART_SIZE_LABEL_GAPS = {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did we make a prior decision to make label gaps scale with chart size?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yeah I decided to scale it because with the large size they were overlapping a little too much, I think I showed you when we had that call a few weeks ago. If it looks off though let me know

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks good. I just forgot over the break. We set the constants up so it's easy to tweak later. Good stuff!

@madelineluke madelineluke merged commit b86146d into main Jul 8, 2026
6 checks passed
@madelineluke madelineluke deleted the feat/s2-line-hover-labels branch July 8, 2026 16:03
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