Skip to content

feat: calculate sparkline container offset in axis label position calculations#88

Merged
hcopp merged 2 commits intomasterfrom
hunter/sparkline-container-offset
Oct 8, 2025
Merged

feat: calculate sparkline container offset in axis label position calculations#88
hcopp merged 2 commits intomasterfrom
hunter/sparkline-container-offset

Conversation

@hcopp
Copy link
Copy Markdown
Contributor

@hcopp hcopp commented Oct 8, 2025

What changed? Why?

This PR subtracts the container left offset for sparkline x axis label calculations. This change is being brought over from our 3.3.2 version of sparkline #87.

Root cause (required for bugfixes)

Sparkline axis was not factoring in the offset of the container as a whole when getting the position of each marker label. As such, a chart with a large left offset would show less labels.

UI changes

Full Width Chart

Working as expected, before and after

Chrome Old Chrome New

Skinny Chart

Fixed with this PR

Chrome Old Chrome New

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Change management

type=routine
risk=low
impact=sev5

automerge=false

@cb-heimdall
Copy link
Copy Markdown
Collaborator

cb-heimdall commented Oct 8, 2025

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
CODEOWNERS ✅ None for this change

@hcopp hcopp self-assigned this Oct 8, 2025
@hcopp hcopp requested a review from stacysun-cb October 8, 2025 19:48
@hcopp hcopp marked this pull request as ready for review October 8, 2025 19:48

## 3.4.0-beta.3 (10/6/2025 PST)

This is an artificial version bump with no new change.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wanted to keep beta versions the same, didn't for 3.3.2 on mobile since we had followed that pattern below.

@hcopp hcopp merged commit 516fd4c into master Oct 8, 2025
21 checks passed
@hcopp hcopp deleted the hunter/sparkline-container-offset branch October 8, 2025 20:10
cb-ekuersch pushed a commit that referenced this pull request Jan 30, 2026
…culations (#88)

* feat: adjust container offset

* Bump version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants