Skip to content

fix: duplicate Y-axis labels when dynamic scale is enabled#9241

Merged
djbarnwal merged 1 commit intomainfrom
fix/duplicate-axis-labels
Apr 16, 2026
Merged

fix: duplicate Y-axis labels when dynamic scale is enabled#9241
djbarnwal merged 1 commit intomainfrom
fix/duplicate-axis-labels

Conversation

@djbarnwal
Copy link
Copy Markdown
Member

When the "Dynamic Y-axis scale" toggle is enabled and the data range is narrow, Y-axis tick labels can all show the same value (e.g., "$4k, $4k, $4k, $4k").

  • Add formatUniqueTickLabels in utils.ts that formats ticks with the axis
    formatter first, then falls back to the table formatter (higher precision)
    if any labels are duplicated
  • Pass pre-computed yTickLabels to MeasureChartGrid instead of the raw
    axisFormatter function

https://linear.app/rilldata/issue/APP-855/duplicate-axis-labels-in-measure-charts

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@djbarnwal djbarnwal requested a review from AdityaHegde April 15, 2026 12:49
@djbarnwal djbarnwal merged commit 2c11853 into main Apr 16, 2026
43 of 52 checks passed
@djbarnwal djbarnwal deleted the fix/duplicate-axis-labels branch April 16, 2026 12:57
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