Can the Gantt chart give multiple intervals for a item

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
subash76
Posts: 1
Joined: Sun Nov 05, 2006 5:38 am

Can the Gantt chart give multiple intervals for a item

Post by subash76 » Sun Nov 05, 2006 5:54 am

My requirement is to create a leave schedule plan in the form of a Gantt chart.. So can we give 2 time intervals for a particular task..

For example, my code snippet is as follows:

public GanttCategoryDataset createDataset() {

final TaskSeries s1 = new TaskSeries("Leave Plan ");
s1.add(new Task("manoj(23354)",
new SimpleTimePeriod(date(1, Calendar.JULY, 2007),
date(31, Calendar.AUGUST, 2007))));
s1.add(new Task("subash (24994)",
new SimpleTimePeriod(date(1, Calendar.JULY, 2007),
date(31, Calendar.AUGUST, 2007))));
s1.add(new Task("subash (24994)",
new SimpleTimePeriod(date(1, Calendar.APRIL, 2007),
date(31, Calendar.MAY, 2007))));

final TaskSeriesCollection collection = new TaskSeriesCollection();
collection.add(s1);
return collection;
}


But i am not getting the two time intervals.. only the first time interval is shown in the gantt chart.. .Hope you understood the problem.. please do give a solution for this...??

wsnyder6
Posts: 9
Joined: Thu Sep 28, 2006 3:22 pm

me too

Post by wsnyder6 » Mon Nov 06, 2006 8:59 pm

Looking for the answer to this question as well....

wsnyder6
Posts: 9
Joined: Thu Sep 28, 2006 3:22 pm

Post by wsnyder6 » Mon Nov 06, 2006 9:24 pm

Just found the answer in GanttDemo2.java

Create a 'subash' task with the first interval.
Add 'subash ' subtasks with the other intervals.

Locked