If you have ever tried to draw gantt charts with JFreeChart you have already noticed that it’s a very simplistic implementation - it doesn’t have the facility to display dependency lines or milestones.

Gantt chart demo from JFreeChart samples:

Orginal Gantt Chart

In a recent project I needed some additional features like:

  1. Summary tasks
  2. Milestones/deliverables
  3. Dependencies between task and milestones/deliverables

So I modified BarRenderer.java, GanttRenderer.java, GanttCategoryDataset.java, Task.java, and TaskSeriesCollection.java appropriately and also created my own class called LineAndShapeGanttRenderer.java.

Gantt chart with JFreeChart after files modification:

Modified Gantt Chart

The base version of JFreeChart was 1.0.2, and the modified files were:

Comments

comments powered by Disqus