Gantt and multiple tasks

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Dams
Posts: 36
Joined: Tue Jul 15, 2003 11:03 am

Gantt and multiple tasks

Post by Dams » Mon Jul 28, 2003 10:45 am

Hi,

First question :
Is it normal that when I use multiple task per line, the first task is not visible, ex :

Code: Select all

TaskSeries taskseries = new TaskSeries("Project 1");
		Task t = new Task("First Person", new SimpleTimePeriod(date(1, 3, 2003), date(3, 3, 2003)));
		t.addSubtask(new Task("", new SimpleTimePeriod(date(7, 3, 2003), date(15, 3, 2003))));
		t.addSubtask(new Task("", new SimpleTimePeriod(date(18, 3, 2003), date(25, 3, 2003))));
		t.addSubtask(new Task("", new SimpleTimePeriod(date(7, 6, 2003), date(18, 6, 2003))));
        taskseries.add(t);
In this example (and others) the primary task is never visible.

Second question

How can we add null or empty SimpleTimePeriod, or an null or empty Task, because I use the JFreeChart to generate graph in order to see all task by project/date (the tasks represents in this case the teams), and by project, we can add differents persons who have work on.
I hope to be clear with these ideas.


Best regards,
Damien

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

Post by Dams » Mon Jul 28, 2003 5:05 pm

Moreover, why when I put a subtask that begin before the principal task, it is not visible, whereas when I put a subtask that end after the principal task , it is visible ... ??

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

Post by Dams » Tue Jul 29, 2003 1:19 pm

:!:

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

Post by wiesi » Tue Aug 26, 2003 1:52 pm

Hi Dams,

have you found your problem? I got the same :?


Regards
Wiesi

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

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

well, i do it with.

In order to not add the same number of task per series (because , in the society, some persons not working on the same project), instead of adding nul task (it is not possible), I add a task in the year 1970 :D

Big trick, don't you ?

Otherelse, I make a new Class that help user to create Gantt Chart in order to represent easily project/workers or workers/project and also generate data for VerticalBar Chart to represent workers/day working by project. If you want this Class...

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Aug 29, 2003 10:03 am

Hi Dams,

I have the code you sent me on 30 July and plan to incorporate this into JFreeChart shortly...have you done any updates since then?
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

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

Post by Dams » Fri Aug 29, 2003 1:54 pm

yeah! you're right!

I've done a JAR archive (JfreeProjects.jar), so it is easily configurable.
Just link to this package, and use it.

Now, with some data (Project,Work and Ressource), it can generate a DefaultCategoryDataset for VerticalBarChart (total day working per Ressource) and a TaskSeriesCollection for Gantt Chart (Projects/Ressources and Ressources/Projects)

I can mail u (source and binairies)?
Last edited by Dams on Fri Aug 29, 2003 1:57 pm, edited 1 time in total.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Aug 29, 2003 1:56 pm

Just the source is fine, thanks!
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

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

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

It's mailed!
Don't hesitate to answer me some questions about it.

Have a nice day.

rickyb
Posts: 2
Joined: Tue Jul 01, 2003 4:03 am

Re: Gantt and multiple tasks // colors per SubTask?

Post by rickyb » Wed Nov 26, 2003 8:06 am

Dams wrote:Hi,

First question :
Is it normal that when I use multiple task per line, the first task is not visible, ex :

Code: Select all

TaskSeries taskseries = new TaskSeries("Project 1");
		Task t = new Task("First Person", new SimpleTimePeriod(date(1, 3, 2003), date(3, 3, 2003)));
		t.addSubtask(new Task("", new SimpleTimePeriod(date(7, 3, 2003), date(15, 3, 2003))));
		t.addSubtask(new Task("", new SimpleTimePeriod(date(18, 3, 2003), date(25, 3, 2003))));
		t.addSubtask(new Task("", new SimpleTimePeriod(date(7, 6, 2003), date(18, 6, 2003))));
        taskseries.add(t);
In this example (and others) the primary task is never visible.

Second question

How can we add null or empty SimpleTimePeriod, or an null or empty Task, because I use the JFreeChart to generate graph in order to see all task by project/date (the tasks represents in this case the teams), and by project, we can add differents persons who have work on.
I hope to be clear with these ideas.


Best regards,
Damien

Hi Dams/David/Anybody,
Is there an easy way to make the colors unique for every Subtask - in the example code above?

Thanks & G'day,
Ricky

moonblade
Posts: 21
Joined: Mon Sep 18, 2006 9:41 am

Post by moonblade » Wed Nov 08, 2006 9:11 am

Hi ...

Anyone knows how to add empty tasks to the taskseriescollection ?
I cant use the 1970-s trick, because my chart uses scroll bar, which will result in a very looooong scroll bar.

Please help
:D

moonblade
Posts: 21
Joined: Mon Sep 18, 2006 9:41 am

Post by moonblade » Fri Nov 10, 2006 7:19 am

Please ? :D

Locked