Skip to content

fix(gantt): prevent y-axis labels from being cut off#39137

Open
tushardhawas wants to merge 5 commits intoapache:masterfrom
tushardhawas:fix-gantt-label-cutoff
Open

fix(gantt): prevent y-axis labels from being cut off#39137
tushardhawas wants to merge 5 commits intoapache:masterfrom
tushardhawas:fix-gantt-label-cutoff

Conversation

@tushardhawas
Copy link
Copy Markdown

SUMMARY

Fixes an issue where long y-axis labels in the Gantt chart were clipped and not fully visible.

The fix dynamically calculates the left grid padding based on the widest category label width, ensuring labels are not cut off regardless of length.

TESTING INSTRUCTIONS

  1. Open a Gantt chart with long category labels.
  2. Verify that y-axis labels are fully visible and not clipped.
  3. Confirm no layout regressions occur on other charts.

ADDITIONAL INFORMATION

  • No database migration required.
  • Fixes existing UI behavior.
  • Closes issue # (if applicable).

tushardhawas and others added 2 commits April 6, 2026 17:50
Dynamically calculate left grid padding based on the widest category label width so long y-axis labels are no longer clipped.
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review bot commented Apr 6, 2026

Code Review Agent Run #4d05cf

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 07885cb..5ad2490
    • superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.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 the viz:charts:echarts Related to Echarts label Apr 6, 2026
tushardhawas and others added 2 commits April 6, 2026 18:09
…formProps.ts


fix: remove label width clamp

Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
…formProps.ts


Previously, category labels were derived using a truthy check (`key ? String(key) : undefined`), which incorrectly treated valid falsy values like `0` and `false` as missing. This caused labels to not render and their widths to be excluded from grid padding calculation, leading to layout inconsistencies.

Updated the logic to explicitly check for `null` and `undefined`, ensuring all valid values are preserved as labels.

Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review bot commented Apr 6, 2026

Code Review Agent Run #f8a7d8

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 5ad2490..c55a3e4
    • superset-frontend/plugins/plugin-chart-echarts/src/Gantt/transformProps.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
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 89.28571% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.52%. Comparing base (d796543) to head (c55a3e4).
⚠️ Report is 23 commits behind head on master.

Files with missing lines Patch % Lines
...s/plugin-chart-echarts/src/Gantt/transformProps.ts 89.28% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #39137   +/-   ##
=======================================
  Coverage   64.52%   64.52%           
=======================================
  Files        2536     2536           
  Lines      131208   131222   +14     
  Branches    30457    30463    +6     
=======================================
+ Hits        84661    84673   +12     
- Misses      45084    45086    +2     
  Partials     1463     1463           
Flag Coverage Δ
javascript 66.07% <89.28%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant