Skip to content

The JavaScript Gantt odyssey

June 14, 2012

An “extended” overview of available JavaScript Gantt components…. and more

 

I cant believe it; I did it again!

I promised, but can’t resist……. I should have known it!

 

But let’ start from the beginning.

O course all of you know very well (at least you should!) Teamwork, the wonderful project management software that Open Lab is developing since 2003, which is about to celebrate its fifth major release; finally I can confirm that we will be out at the end of June.

One of the major new features for version 5  is a full Gantt editor, browser based.

I was in charge to select a JavaScript component that we could embed in our product – in order to save time.

So this post is firstly a selection of available components, but …….. read until the end.
(no thanks! I’m in a hurry)

 

My ideal component should be based on  jQuery, be LGPL (or an equivalent free-free license), be easy to configure, skinnable, multi-browser.

Unlike in my previous articles, when I was looking for grid components, tag inputscalendar, JavaScript templatesconfirm etc., for Gantt editors the market offers few opportunities.

 

Here is what I found:

 

DHX Editable JavaScript Gantt Chart

image

This component is very easy to use, simple and well documented.

It supports drag&drop and edit.

In my case the problem was that this component is tightly linked with the DHTMLX library and this is not my choice.

But if you are not already “linked” to a “framework” (like jQuery) maybe this could be your choice.

Regarding licensing, its both under GPL or commercial license. A fee of $699 for an enterprise license may be worth it.

 

 

Brynthum EXT Gantt

image

I think this is the best component I found ever.

The user interface is smooth, responsive and well designed. It supports editing in place, zooming, buffering for large Gantt (what could be the meaning of a project with 1000 tasks? Winking smile ) drag&drop etc.

The documentation is well done and complete…… sigh! it is based on EXTJs!

The second negative point is the licensing that doesn’t fit our needs. Only a commercial license is provided.

But if this component fits you, give it a try as it is a great component.

 

A little sad about leaving EXT gannt, I found

jsGantt

image

this component developed by Shlomy Gantz and Brian Twidt seems a little bit “rude” when compared with the two above, but undoubtedly it has the value of  being built from scratch. No libraries! 100% sweat of the brow!

This component is written for data display, so if you want to drag&drop, edit, interact in some way, you must to write your code.

Documentation is…. concise, but complete.  The license model is BSD.

The lack of the editing ability convinced me to pass over.

 

jquery.ganttView

image

Finally a jQuery one!

As the name suggests it is only a viewer. Even the data model is a little weak, missing support for dependencies, but is one of the few components I found built upon jQuery. The project seems to be dying and the author Frank Grubbs did not release updates since 2 years ago.

There is an interesting work started from this project http://mbielanczuk.com/2011/06/jquery-gantt-chart/

but it still lacks some features.

 

I was scraping the bottom of the barrel, when I found this Japanese component

jquery.gantt

image

Done by Maro, this is a very light Gantt viewer; it doesn’t support dependencies, editing or other advanced features, but it can be used as a starting point.

 

I was really desperate at this point! What I was looking for was something like the component used on

Gantter

image

Gantter is an online service, so not a part of this family of components, but I used it to set my requirements.

They don’t sell their component.

 

But searching for something similar I found interesting stuff in the far east:

Sunflower 向日葵任务甘特图

image

If you are fluent with Chinese, maybe you’ll find working with this component easier than I did.

But Chinese apart this is a really full featured component, and I work with it for a while. It supports editing, drag&drop, dependencies, zooming, etc.

I didn’t understand the license type very well, but a free version seems available.

Documentation is available in Chinese only, and Google Translate can help you only partially.

It doesn’t use jQuery.

 

What I found really incredible is how Sunflower component is similar to the one used by the above online service…

 

And last but not least I found

 

TreeGrid Gantt Char

image

This component is awesome! really! it can do everything.

Supports every kind of  actions, notation, dependencies, colors, really everything.

There are lots of examples and the online documentation is complete and effective.

imageMaybe someone can argue that the readability of this kind of Gantt is not ideal, but the component can be used in a simpler way.

Scalability is not an issue at all for this component, there is an example with 1000000 rows and 1000 columns!

Also compatibility is wider than any marketer requirement could ever be (runs even on IE6).

 

Ok it is not based on jQuery, and the commercial license cannot fit every wallet, but a component like this requires years for developing it.

 

 

dojox.gantt

image

I have to cite the dojo library for completeness, but I didn’t play with this component.

Seems quite complete and the documentation is well done. Based on Dojo, not on jQuery.

 

Our solution

If you reached this point maybe you are asking what component did I choose?

I told you at the beginning:

 

I did it again!

I developed my own component!

 

Why?

  1. because none of the component mentioned above is LGPL/MIT
  2. none is built in jQuery
  3. I need to actively manage the data model because a Teamwork task/project’ one is more flexible than one representable with a Gantt

but mainly because I love to write code!

In this case the work seemed really hard so I  worked in pair with Silvia, and this is actually a nice experience by itself!

 

Here’s the result of our efforts:

image

Even if the layout is clean and may seem barebones it actually supports a lot of features:

  • in-place editing image
  • drag&drop
  • zooming
  • do/undo
  • multiple dependencies
  • full editing
  • dates shortcuts image
  • css skin
  • multiple browser
  • resources editing
  • multiple assignment
  • milestones
  • export data in JSON format
  • resize & scroll

and

  • tasks status!

the last point is the mayor difference introduced in Teamwork task management  model.

Teamwork focus is capturing work done in real time. To do this we built a tool that can model real time situations and easily change in time. This is in contrast with traditional project management methodology where projects are defined in advance in all details – not realistic for most work situations.
So Teamwork’s model of project, task trees, dates and task states is different from that of classical Gantts: tasks can be open beyond their due dates, task can be suspended inside their time scope, and so on. Also the automation due to dependencies has been somewhat simplified with respect to classical Gantt tools.

 

The introduction of task’s states lets our Gantt act as a sort of workflow.  Let’s see what happens when you close a phase with dependencies:

here the first phase is open (second row: green-> open)

image

 

here I closed the first phase (all subtasks become blue->closed : rows 3 and 4 ) so the second phase can start and become green->open and its dependants become orange->suspendedimage

 

 

image This is the task full editor

 

 

 

 

 

 

 

 

image

and the resource quick editor

 

 

 

 

 

 

 

 

You can try our component online here on http://gantt.twproject.com/

Source code is available on GitHub here. This component is release under MIT license.

 

In the next post I’ll describe in detail how to use the component code, stay tuned.

 

The complete link collection for this article is in a Licorize booklet: http://licorize.com/projects/rbicchierai/JS-Gantt-editor

21 Comments leave one →
  1. June 16, 2012 10:24

    Congrats on coming up with your own solution. Our Gantt tools are more for quickly drawing simple time lines which was one of the requested features. We are more of a general diagramming tools that supports most diagram types.

    Cheers,
    Nishadha

  2. June 17, 2012 11:30

    Your chart looks very good! Curious, how much time did you spend on it?

    Thanks for the kind words on our chart :)

  3. Rafael permalink
    August 7, 2012 12:44

    Very nice work!!
    Are you still developing on it?
    Will there be some technical documentation soon?

    • August 7, 2012 16:55

      Hi Rafael,
      thank you! Yes the component is actively maintained.
      I’m currently on vacation, but the technical documentation is mt first assignment once back!

      Stay tuned.

  4. September 19, 2012 07:11

    Very useful. Thanks!

  5. September 27, 2012 23:17

    Just forked it :) . Gonna take a look. Thanks!

  6. October 22, 2012 15:33

    Very nice.. will post a review later on.

  7. Luís Martins permalink
    February 4, 2013 16:31

    Hello Roberto,

    thank you for the great article about gantt chart. I have a question, do you know any jquery solution that has recurring tasks integration?

    thanks in advance

    Luís Martins

    • February 4, 2013 18:26

      No, I’m sorry.
      Gantt and recurring task do not match very well.
      Did you searched for timelines? (e.g. http://timeline.verite.co/)

      • Luís Martins permalink
        February 5, 2013 12:39

        Unfortunately timelines doesn’t suit my needs, I’ll need to get my hands dirty to add this feature :)
        thank you for your time
        Luís

  8. b le permalink
    March 4, 2013 09:02

    very nice!!! will there technical documentation coming soon?
    Thanks.

    -B

  9. Alan permalink
    March 20, 2013 15:44

    Excellent work!, is there anyway that we can drill down or display day views? so say Monday, then show the time the tasks are going to take for that day? (10am – 2pm for example).

    Thanks

    • March 21, 2013 12:24

      I’m sorry, but it is not supported as task’s duration is in working days not in hours.
      Moreover the support for calendar is with one day resolution.

      Actually it is not impossible at all, but there are lot of things to change.

Trackbacks

  1. A complete Gantt editor in the browser « teamwork’s blog
  2. jQuery Gantt editor « Eltit Golb
  3. A review of JavaScript drawing libraries for flowcharts, Gantt charts and timelines | Dr James Bayley
  4. Tools & Applications to monitor » ./klaus hofeditz :: weblog
  5. Teamwork jQuery Gantt editor

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: