Skip to content

fix(dashboards): Show first and last category labels on categorical bar charts#107448

Merged
gggritso merged 4 commits intomasterfrom
georgegritsouk/fix-categorical-chart-x-axis-labels
Feb 3, 2026
Merged

fix(dashboards): Show first and last category labels on categorical bar charts#107448
gggritso merged 4 commits intomasterfrom
georgegritsouk/fix-categorical-chart-x-axis-labels

Conversation

@gggritso
Copy link
Member

@gggritso gggritso commented Feb 2, 2026

Ensures the first and last category labels are visible on the X-axis of categorical bar charts, if appropriate. We turn those off completely for time series widgets to prevent congested X axis labels, but for category charts that doesn't make sense! Instead, let ECharts sort it out. Also, improved a type where I was at it. BaseChart's xAxis is a little different.

Before:
Screenshot 2026-02-02 at 4 55 44 PM

After:
Screenshot 2026-02-02 at 5 11 31 PM

…ar charts

Categorical bar charts should always show the first and last category
labels on the X-axis. Unlike time series charts where these are hidden
to avoid visual congestion with dates, categorical labels are important
for understanding the data at a glance.
@gggritso gggritso requested a review from nsdeschenes February 2, 2026 22:14
@gggritso gggritso marked this pull request as ready for review February 2, 2026 22:14
@gggritso gggritso requested a review from a team as a code owner February 2, 2026 22:14
Copy link
Contributor

@nsdeschenes nsdeschenes left a comment

Choose a reason for hiding this comment

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

🏷️ 🚀

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Feb 3, 2026
@gggritso gggritso merged commit f924d18 into master Feb 3, 2026
59 checks passed
@gggritso gggritso deleted the georgegritsouk/fix-categorical-chart-x-axis-labels branch February 3, 2026 13:58
jaydgoss pushed a commit that referenced this pull request Feb 12, 2026
…ar charts (#107448)

Ensures the first and last category labels are visible on the X-axis of
categorical bar charts, if appropriate. We turn those off completely for
time series widgets to prevent congested X axis labels, but for category
charts that doesn't make sense! Instead, let ECharts sort it out. Also,
improved a type where I was at it. `BaseChart`'s `xAxis` is a little
different.

**Before:**
<img width="775" height="196" alt="Screenshot 2026-02-02 at 4 55 44 PM"
src="https://github.com/user-attachments/assets/8228c175-d216-4965-b8ef-40815ba70128"
/>

**After:**
<img width="808" height="212" alt="Screenshot 2026-02-02 at 5 11 31 PM"
src="https://github.com/user-attachments/assets/b4f9e8a6-9014-4174-8321-485acbad496b"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants