Skip to content

fix: last date label hidden on time series x-axis (#39899) - #42299

Open
prathamesh04 wants to merge 1 commit into
apache:masterfrom
prathamesh04:fix/timeseries-xaxis-last-label
Open

fix: last date label hidden on time series x-axis (#39899)#42299
prathamesh04 wants to merge 1 commit into
apache:masterfrom
prathamesh04:fix/timeseries-xaxis-last-label

Conversation

@prathamesh04

@prathamesh04 prathamesh04 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

SUMMARY

When xAxisLabelRotation is 0 on a time axis, both hideOverlap and showMaxLabel are set, but ECharts' hideOverlap: true can still suppress the forced max label. This fix sets hideOverlap: false when showMaxLabel is active so the last date label is never hidden by ECharts' overlap detection.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screencast.from.2026-07-22.13-12-23.webm

TESTING INSTRUCTIONS

  1. Create a Time Series chart with a time column as X-Axis
  2. Set Time Grain to Day or Month
  3. Set X-Axis Label Rotation to 0
  4. Verify the last date label on the x-axis is visible
  5. Change rotation to -45 and 45 — last label still visible

ADDITIONAL INFORMATION

Fixes #39899

@bito-code-review

bito-code-review Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #673e8e

Actionable Suggestions - 0
Additional Suggestions - 1
  • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts - 1
    • Semantic duplication in diff · Line 377-385
      The new test at line 377 duplicates the existing test at line 312-321 (same setup, same assertions for `showMaxLabel` and `hideOverlap`). While the new test provides explicit Last date label hidden on Time Series X-axis #39899 reference coverage, having duplicate tests creates maintenance risk — if the implementation changes, both must be updated in sync. Consider whether one focused test with both issue references would suffice.
Review Details
  • Files reviewed - 3 · Commit Range: 3860da9..3860da9
    • superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot Bot added change:frontend Requires changing the frontend viz:charts:timeseries Related to Timeseries labels Jul 22, 2026
@netlify

netlify Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 3860da9
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a6062cddd9f0a000894d7b4
😎 Deploy Preview https://deploy-preview-42299--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

…ache#39899)

When xAxisLabelRotation is 0 on a time axis, both hideOverlap and
showMaxLabel are set, but hideOverlap can suppress the forced max
label. Set hideOverlap to false when showMaxLabel is active so the
last date label is never hidden by ECharts' overlap detection.
@prathamesh04
prathamesh04 force-pushed the fix/timeseries-xaxis-last-label branch from 3860da9 to e5a32e8 Compare July 22, 2026 07:54
@pull-request-size pull-request-size Bot added size/S and removed size/M labels Jul 22, 2026
@prathamesh04

Copy link
Copy Markdown
Contributor Author

cc @rusackas — ready for review. Added video testing in the PR description.

@bito-code-review

bito-code-review Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #a2c4ad

Actionable Suggestions - 0
Review Details
  • Files reviewed - 3 · Commit Range: e5a32e8..e5a32e8
    • superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
    • superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful
    • Eslint (Linter) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 65.13%. Comparing base (bef03fb) to head (e5a32e8).
⚠️ Report is 137 commits behind head on master.

Files with missing lines Patch % Lines
...hart-echarts/src/MixedTimeseries/transformProps.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #42299      +/-   ##
==========================================
- Coverage   65.13%   65.13%   -0.01%     
==========================================
  Files        2753     2753              
  Lines      154584   154586       +2     
  Branches    35463    35465       +2     
==========================================
+ Hits       100695   100696       +1     
- Misses      51975    51976       +1     
  Partials     1914     1914              
Flag Coverage Δ
javascript 70.73% <75.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@prathamesh04

Copy link
Copy Markdown
Contributor Author

cc @rusackas @sadpandajoe @michael-s-molina @EnxDev — ready for first review. Video testing included in PR description. Bito flagged minor test duplication (line 377 vs 312) but no blocking issues.

@rusackas rusackas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. MixedTimeseries/transformProps.ts gets the same hideOverlap/showMaxLabel change but only Timeseries picked up a test for it, mind adding one there too?

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

Labels

change:frontend Requires changing the frontend plugins size/S viz:charts:timeseries Related to Timeseries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Last date label hidden on Time Series X-axis

2 participants