Gantt-style chart with many tasks per person

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tobermory
Posts: 10
Joined: Thu Jul 06, 2017 8:11 pm
antibot: No, of course not.

Gantt-style chart with many tasks per person

Post by tobermory » Thu Jul 06, 2017 8:33 pm

Best to explain my problem via what I think is the demo that closest resembles what I am trying to do. Regarding the XYTaskDatasetDemo2, bottom plot, which shows 5 team members, A - E, each doing some task for various time intervals.

I would like each of A - E to be doing one of 2 tasks, and I'd like to use color to distinguish the two tasks. Imagine that while each team member is 'at work' they'll be working on project X for a while (hours) or project Y for a while. Thus X and Y are the tasks. I want X intervals colored say red and Y say green. When not at work, I want a gap in the data, for that member. I have the data that says when each of A - E members are 'doing project X or Y or neither'.

Starting with the XYTaskDatasetDemo2 code (I had previously bought this code) I added more Tasks to my TaskSeriesCollection than I had symbols for my SymbolAxis, and of course things don't line up. I am struggling a bit with the whole API. My hunch is that I DON'T really want to be using XYDatasets at all, more CategoryDatasets ?? I didn't see any other demos that approximated to my problem.

Any help very gratefully appreciated.

Stuart

tobermory
Posts: 10
Joined: Thu Jul 06, 2017 8:11 pm
antibot: No, of course not.

Re: Gantt-style chart with many tasks per person

Post by tobermory » Thu Jul 06, 2017 9:05 pm

Just following up to my own post, I juts discovered Gantt Charts in the demo series, and saw from GanttDemo2 that Tasks can have subtasks. So I _think_ I could pose my problem as having 5 tasks, one for each team member A - E. Then each task will have many subtasks, one for each time that member is doing EITHER project X OR project Y. If I say each sub-task is 0% complete, it means X and will be colored say green (like the demo) and if sub-task is 100% complete, it means Y and can be red.

I think this might work, but I get the feeling there is a better way go about my plot. My data and my intended visualization of it isn't really a Gantt chart at all, since in my case there's really no 'final goal' that 'all tasks be completed'. In fact, what I am trying to convey is that my 5 'team members' were 'at work' for periods of time, and which work (project X or Y) they did while at work. Then the visual can show at a glance, by color, how much of project X got working on, by ALL members, or how much MORE work was done by say team member B than D, and that team member E worked on project X a lot bur hardly ever worked on Y.

Stuart

Locked