Skip to content

Fix task duration chart rendering issues in Airflow 3#63635

Draft
abhijeets25012-tech wants to merge 1 commit intoapache:mainfrom
abhijeets25012-tech:fix/task-duration-chart-63582
Draft

Fix task duration chart rendering issues in Airflow 3#63635
abhijeets25012-tech wants to merge 1 commit intoapache:mainfrom
abhijeets25012-tech:fix/task-duration-chart-63582

Conversation

@abhijeets25012-tech
Copy link
Copy Markdown
Contributor

Description

Fixes #63582

The task duration chart in Airflow 3 had several rendering issues
compared to Airflow 2. This PR addresses all of them.

Changes Made

1. Chart Size

  • Added w="100%" to make chart full width
  • Added h="400px" fixed height wrapper
  • Added maintainAspectRatio: false so chart respects height

2. Y-Axis Units

  • Changed from HH:MM:SS format to human readable s/m/h
  • Example: now shows 30s, 5.2m, 1.5h instead of 00:00:30

3. Median Duration Line

  • Added median() function to calculate median value
  • Added blue dashed reference line showing median total duration
  • Label displays the median value at end of line

4. Legend

  • Added Legend to Chart.js imports and registration
  • Added legend: { display: true, position: "top" } to options
  • Users can now see what each color represents

Screenshots

Testing

  • Built successfully with npm run build
  • All 4301 modules transformed without errors

Related Issue

Closes #63582

- Add Legend import and registration for chart visibility
- Add median duration reference line (blue dashed)
- Fix Y-axis to show s/m/h instead of HH:MM:SS
- Make chart full width with fixed height of 400px

Fixes apache#63582
@boring-cyborg boring-cyborg bot added the area:UI Related to UI/UX. For Frontend Developers. label Mar 15, 2026
@potiuk potiuk marked this pull request as draft March 15, 2026 23:00
@potiuk
Copy link
Copy Markdown
Member

potiuk commented Mar 15, 2026

@abhijeets25012-tech This PR has been converted to draft because it does not yet meet our Pull Request quality criteria.

Issues found:

  • Pre-commit / static checks: Failing: CI image checks / Static checks. Run prek run --from-ref main locally to find and fix issues. See Pre-commit / static checks docs.

Note: Your branch is 56 commits behind main. Some check failures may be caused by changes in the base branch rather than by your PR. Please rebase your branch and push again to get up-to-date CI results.

What to do next:

  • The comment informs you what you need to do.
  • Fix each issue, then mark the PR as "Ready for review" in the GitHub UI - but only after making sure that all the issues are fixed.
  • There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates.
  • Maintainers will then proceed with a normal review.

Converting a PR to draft is not a rejection — it is an invitation to bring the PR up to the project's standards so that maintainer review time is spent productively. There is no rush — take your time and work at your own pace. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack.

@bbovenzi
Copy link
Copy Markdown
Contributor

We're going to need some screenshots here.

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

Labels

area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problems with rendering the task duration graph in airflow 3

3 participants