PLEASE HELP ---- Task.addSubtask is not working

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
wiesi
Posts: 27
Joined: Thu Aug 21, 2003 4:49 pm

PLEASE HELP ---- Task.addSubtask is not working

Post by wiesi » Thu Aug 28, 2003 4:19 pm

Hi everyone,

i am using v0.9.11 and I can´t show a Gantt-Chart where the timeline is with breaks. I am trying to add a Subtask to a Task but it´s not shown.

Here´s some of my code:

TaskSeries t = new TaskSeries("Brutto");

Task task1 = new Task ("task1", new SimpleTimePeriod(new Date(100590207),new Date(200390107)));

Task tasksub1 = new Task("task1", new SimpleTimePeriod(new Date(300390107),new Date(990390107)));

task1.addSubtask(tasksub1);

t.add (task1);


It´s not working. Is someone having a hint for me? So please help ...


Best Regards,
Wiesi

Dams
Posts: 36
Joined: Tue Jul 15, 2003 11:03 am

Post by Dams » Fri Aug 29, 2003 9:47 am

have u try the 0.9.9 ?

wiesi
Posts: 27
Joined: Thu Aug 21, 2003 4:49 pm

Post by wiesi » Fri Aug 29, 2003 10:24 am

no, I haven´t, but it also hasn´t worked with 0.9.8.

Dams
Posts: 36
Joined: Tue Jul 15, 2003 11:03 am

Post by Dams » Fri Aug 29, 2003 2:20 pm

i remind me that i think in the 0.9.8, it hasn't work, but in the 0.9.9, yes

wiesi
Posts: 27
Joined: Thu Aug 21, 2003 4:49 pm

Post by wiesi » Mon Sep 01, 2003 12:37 pm

Hi again Dams,

it´s still not working. Just the subtask is now shown ....
Maybe you can see the errors in my code, I´ve ran it with 0.9.8, 0.9.9 and 0.9.11:
TaskSeries t = new TaskSeries("Brutto");
TaskSeries t2 = new TaskSeries("Netto");

Task task1 = new Task ("task1", new SimpleTimePeriod(new Date(5000),new Date(9000)));
Task task2 = new Task ("task1", new SimpleTimePeriod(new Date(12000),new Date(17000)));


task1.addSubtask (new Task("", new SimpleTimePeriod(new Date(11000),new Date(15000))));
task2.addSubtask (new Task("", new SimpleTimePeriod(new Date(19000),new Date(21000))));


t.add (task1);
t2.add (task2);

TaskSeriesCollection mydataset = new TaskSeriesCollection();
mydataset.add(t);
mydataset.add(t2);

Thanks in advance
Wiesi

Dams
Posts: 36
Joined: Tue Jul 15, 2003 11:03 am

Post by Dams » Mon Sep 01, 2003 2:29 pm

well, i'm working actualy, with the 0.9.10.

Try it!

Otherelse, what do u see exactly on the graph ?

wiesi
Posts: 27
Joined: Thu Aug 21, 2003 4:49 pm

Post by wiesi » Tue Sep 02, 2003 3:15 pm

I can see the "normal" Tasks, but not the subTasks. It´s doesn´t matter if I am adding a subTask or not, it´s the same picture.

Deniskr

Post by Deniskr » Thu Sep 04, 2003 6:10 pm

wiesi wrote:I can see the "normal" Tasks, but not the subTasks. It´s doesn´t matter if I am adding a subTask or not, it´s the same picture.
Same problem here....

Any guesses/fixes ?

rfuller
Posts: 8
Joined: Tue Aug 19, 2003 2:34 pm
Location: Galway, Ireland

Try giving each subtask a different description

Post by rfuller » Fri Sep 05, 2003 2:22 pm

I seem to remember encountering this before, and applying different names to the task and each of the subtasks got around the issue.

Locked