Skip to content

feat(plugin-chart-echarts): add Gantt Chart plugin #33716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Quatters
Copy link
Contributor

@Quatters Quatters commented Jun 7, 2025

SUMMARY

This PR introduces a new "Gantt Chart" plugin built using Apache ECharts. This chart addresses the current lack of timeline-based visualizations, enabling users to effectively analyze event sequences and durations across a horizontal time axis.

Key features include:

  • Representation of event durations as horizontal bars on a continuous time axis.
  • Support for category-based vertical grouping with nested subcategories, facilitating detailed analysis within larger contexts.
  • Functionality for fixed left/right time boundaries to compare intervals.
  • Native ECharts zoom and scroll support for interactive data exploration.

The expected input data format includes start_time and end_time, a main category for the Y-axis, and an optional dimension for subcategories. Additional fields are supported for tooltips, enhancing data context upon interaction.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

gantt-demo.mp4

Снимок экрана 14 06 2025@2x

TESTING INSTRUCTIONS

Import demo: Chart Export Jun 07 2025.zip
It uses dataset of examples database. data.csv

ADDITIONAL INFORMATION

  • Has associated issue: Closes [SIP-167] Timeline Chart Visualization #33349
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
      - [ ] Migration is atomic, supports rollback & is backwards-compatible
      - [ ] Confirm DB migration upgrade and downgrade tested
      - [ ] Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Sorry, something went wrong.

Quatters added 2 commits June 7, 2025 18:38
…harts-timeline
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Readability Inconsistent Enum Naming Convention ▹ view ✅ Fix detected
Performance Unnecessary Memoization ▹ view ✅ Fix detected
Performance Unhandled Dynamic Import ▹ view ✅ Fix detected
Readability Use template literals for multi-line strings ▹ view 🧠 Not in standard
Functionality Potentially Missing Zoom Control Definition ▹ view 🧠 Incorrect
Readability TimePicker width not configurable ▹ view 🧠 Not in scope
Readability Inline CSS Should Be In Styled Components Or Theme ▹ view ✅ Fix detected
Readability Unexplained Magic Number ▹ view ✅ Fix detected
Documentation Missing interface prop descriptions ▹ view 🧠 Not in scope
Error Handling Missing error handling for date parsing ▹ view 🧠 Incorrect
Files scanned
File Path Reviewed
superset-frontend/plugins/plugin-chart-echarts/src/Timeline/constants.ts
superset-frontend/plugins/plugin-chart-echarts/src/Timeline/buildQuery.ts
superset-frontend/packages/superset-ui-core/src/chart/types/VizType.ts
superset-frontend/src/components/TimePicker/index.tsx
superset-frontend/plugins/plugin-chart-echarts/src/Timeline/index.ts
superset-frontend/src/explore/components/controls/TimeRangeControl/index.tsx
superset-frontend/plugins/plugin-chart-echarts/src/Timeline/types.ts
superset-frontend/plugins/plugin-chart-echarts/src/Timeline/EchartsTimeline.tsx
superset-frontend/src/explore/components/controls/index.js
superset-frontend/plugins/plugin-chart-echarts/src/utils/tooltip.ts
superset-frontend/plugins/plugin-chart-echarts/src/index.ts
superset-frontend/packages/superset-ui-chart-controls/src/sections/chartTitle.tsx
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/controlPanel.tsx
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/controlPanel.tsx
superset-frontend/plugins/plugin-chart-echarts/src/Timeline/controlPanel.tsx
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Step/controlPanel.tsx
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/controlPanel.tsx
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/controlPanel.tsx
superset-frontend/src/visualizations/presets/MainPreset.js
superset-frontend/plugins/plugin-chart-echarts/src/controls.tsx
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/dndControls.tsx
superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/controlPanel.tsx
superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx
superset-frontend/src/components/Chart/ChartRenderer.jsx
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts
superset-frontend/plugins/plugin-chart-echarts/src/Timeline/transformProps.ts

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Quatters added 2 commits June 7, 2025 21:03
@michael-s-molina
Copy link
Member

Thanks for the PR @Quatters. Could you add a video, demonstrating the new plugin?

@michael-s-molina michael-s-molina requested a review from rusackas June 9, 2025 17:26
@Quatters
Copy link
Contributor Author

Thanks for the PR @Quatters. Could you add a video, demonstrating the new plugin?

Sure! I've replaced gif with demo video.

@michael-s-molina michael-s-molina requested a review from a team June 12, 2025 11:39
Copy link
Member

@sfirke sfirke left a comment

Choose a reason for hiding this comment

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

Thank your for the video (and the contribution!), I think this looks great. My only immediate suggestion is that I feel like "Gantt chart" is a more common name for this than "Timeline chart."

There are more comments in our repo for "Gantt chart" including this feature request with many upvotes - your feature will make them happy 😁 #23503 so I think that's what our users will search for. And Wikipedia calls it a Gantt chart, it has no entry for timeline chart.

What do you think about renaming this chart to be "Gantt chart"? (sorry for the the double email, I moved my thoughts from a comment to a review) We could give it the keyword Timeline so it will show up in chart search if someone looks for it as that name.

Copy link
Contributor

@rusackas Processing your ephemeral environment request here. Action: up. More information on how to use or configure ephemeral environments

@rusackas
Copy link
Member

So cool, thank you! Spinning up an ephemeral env so we can all play with it.

Copy link
Contributor

@rusackas Ephemeral environment spinning up at http://35.88.138.93:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.

@mistercrunch
Copy link
Member

My only immediate suggestion is that I feel like "Gantt chart" is a more common name for this than "Timeline chart."

I was going to comment that typically Gantt charts include a graph of dependencies and arrows to visualize them, but GPT seems to think it's not a strict requirement -> https://chatgpt.com/share/684b5885-26c0-8010-b92e-74248625313c

@Quatters
Copy link
Contributor Author

Ok, I don't see any issues with renaming chart to Gantt. A quick search shows that Gantt chart much more often used with this type then Timeline (which is more generic to me). I also thought dependencies visualisation is mandatory for Gantt, but it's not.

Good suggestion!

@Quatters Quatters changed the title feat(plugin-chart-echarts): add Timeline Chart visualization feat(plugin-chart-echarts): add Gantt Chart plugin Jun 14, 2025
},
},
],
[xAxisTitleMarginControl],
Copy link
Member

Choose a reason for hiding this comment

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

for consistency with other charts, should you just bring the entire titleControls section here?

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.

[SIP-167] Timeline Chart Visualization
5 participants