amcharts / amcharts4

The most advanced amCharts charting library for JavaScript and TypeScript apps.
https://www.amcharts.com/
1.16k stars 322 forks source link

Gantt Chart with Clustered Bars #4033

Closed Logikgate closed 2 years ago

Logikgate commented 2 years ago

Question

I have followed the gantt chart demo to create a gantt chart. Is it possible to get the bars to be clustered like in a normal bar chart rather than the current overlapping behaviour it has?

Gantt Chart demo: https://www.amcharts.com/demos/gantt-chart/ Clustered bar chart for example: https://www.amcharts.com/demos/clustered-bar-chart/

Environment (if applicable)

amCharts4, typescript

Additional context

martynasma commented 2 years ago

If you need bars to be clustered, you need to use multiple ColumnSeries.

Logikgate commented 2 years ago

Thank you @martynasma! I was able to get it to work by breaking up the series based on the overlapping time ranges. Here's a codepen demonstrating it: https://codepen.io/logikgate/pen/VwybPwO?editors=0011

Now that I have clustered data, it looks like regardless if a series has data for a category the category row is expanded to the same height as if it did have data for every series. Is it possible to collapse the category rows that don't have as much overlapping data? The below image illustrates what I'm trying to achieve.

Screen Shot 2022-03-28 at 11 16 16 AM
Logikgate commented 2 years ago

Never mind, after asking I saw this issue that goes into depth about this https://github.com/amcharts/amcharts4/issues/2478

Closing because clustered gantt chart has been solved.