Skip to content

feat: factor container offset for sparkline axes#87

Merged
hcopp merged 2 commits intocharts/v3.3from
hunter/sparkline-axis-label-offset
Oct 8, 2025
Merged

feat: factor container offset for sparkline axes#87
hcopp merged 2 commits intocharts/v3.3from
hunter/sparkline-axis-label-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.

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

Safari Old Safari New
Chrome Old Chrome New

Skinny Chart

Fixed with this PR

Safari Old Safari New
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)

Testing instructions

Change management

type=routine
risk=low
impact=sev5

automerge=false

@hcopp hcopp requested a review from stacysun-cb October 8, 2025 19:11
@hcopp hcopp self-assigned this Oct 8, 2025
@hcopp hcopp merged commit 220236b into charts/v3.3 Oct 8, 2025
6 checks passed
@hcopp hcopp deleted the hunter/sparkline-axis-label-offset branch October 8, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants