Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

[FEATURE] Gantt Charts

Open 5gTestSubject opened this issue 9 years ago • 8 comments

With the inclusion of Moment.js, it feels odd not to have even the bare bones such a time-oriented chart available. Horizontal bars don't quite do the job, even with a Moment.js-based time axis.

I realize this is a rather large feature request.

Expected Behavior

  • Gantt should be an available choice for chart type under the config.
  • Each dataset would represent a row in the Gantt chart.
  • Datasets would contain the Moment ranges that are being displayed.
  • Background/border color lists would determine each section of the row in the chart that is filled in.

5gTestSubject avatar Jun 30 '17 14:06 5gTestSubject

I think this request is best implemented as an external plugin. The specialized logic for this will make the core too big

etimberg avatar Jun 30 '17 21:06 etimberg

Hi guys, This is exactly the feature I am looking for and am currently trying to create it out of a stacked bar chart, but @JSchrepp is right its a bit cumbersome. Having the ability to have it stackable with milestones would be very useful. So I guess integrating it into mixed charts would probably do this. Just a thought. Cheers guys!

cjarv avatar Jul 06 '17 22:07 cjarv

Hey,

+1 for this extension. I'm also at the point to visualize a Gantt chart. The hack via horizontal bar does work with some limitations:

  • Multiple bars in one row are very insufficient.
  • Problems with tooltip visibility.

Regards Thomas

th0masj0 avatar Aug 01 '17 09:08 th0masj0

@thomasjoscht Not sure if this helps but here is what I did based on another post. The line chart made it a lot easier to grab tooltips. Im new to Javascript but it seems to be working out if I hide the Legend. https://jsfiddle.net/c_jarv/cb47aejn/

cjarv avatar Aug 01 '17 21:08 cjarv

My use case is an overview of job executions of last 24 hours. With some additional coding I could solve my main problems. But solution still smells. Here is a simple sample https://jsfiddle.net/Lq3aptph/.

  • Multiple bars are possible. But this requires two additional datasets per bar. In summary there must exist 2 times maximum of bars per row (job in my case).
  • Tooltip problem with filtering requires also a custom tooltip with adjustment of some styles.

gantt in chart js

Problems:

  • Scalability is bad for increasing horizont (from last 24 Hours to 30 days f.e.)
  • Colorizing bars with some information (f.e. success=green, failed=red) is very hard and requires much more datasets.
  • Label information of overlapped jobs (started out of horizont) could not be displayed correctly. Therefore only jobs started in horizont could be displayed now.

Further considerations could be to use a scatter chart instead. But my first tries were not sufficient.

th0masj0 avatar Aug 02 '17 06:08 th0masj0

+1 for a Gantt plugin, it's the only thing missing in my opinion, Google Charts gantt is terribly outdated

mojimi avatar May 29 '19 18:05 mojimi

I'd like that as well. I don't want to drag in another library.

FalcoGer avatar Jul 31 '19 07:07 FalcoGer

Closing since this isn't a feature that will be in the core library

etimberg avatar Jan 18 '20 21:01 etimberg