Combined Gantt Chart?
Combined Gantt Chart?
I would like to create a combined gantt chart that would have all of the date ranges for the domain axis, like we have for gantt. I haven't found a way to do this. I've tried CombinedDomainCategory, but I can find a way to put in a DateAxis for the domain.
Any ideas?
Any ideas?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
It's not that clear to me what you are trying to achieve, but since the Gantt chart plots dates against the range axis, perhaps you could try CombinedRangeCategoryPlot?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
David,
This is what I'm trying to do. I started off with a gantt chart with 1 series. That's fine, the height of each task is sufficient. I then added two other series and the blocks become quite small. I have tried changing margins and everything else, but nothing seems to work.
I then decided to try and use a combined chart as it wouldn't hurt what I was trying to do and then would also (I hoped) make the height of each task bigger. But trying to do this has seemed even more difficult.
When I tried the CombinedRangeCategoryPlot, everything flips vertical and the tasks aren't lining up correctly.
I can send you some images if that would help, but I would have to email them to you.
Thanks![/img]
This is what I'm trying to do. I started off with a gantt chart with 1 series. That's fine, the height of each task is sufficient. I then added two other series and the blocks become quite small. I have tried changing margins and everything else, but nothing seems to work.
I then decided to try and use a combined chart as it wouldn't hurt what I was trying to do and then would also (I hoped) make the height of each task bigger. But trying to do this has seemed even more difficult.
When I tried the CombinedRangeCategoryPlot, everything flips vertical and the tasks aren't lining up correctly.
I can send you some images if that would help, but I would have to email them to you.
Thanks![/img]
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
OK, it just sounds like you are running out of space for all the bars. Switching to a CombinedRangeCategoryPlot won't fix that. About all you can do is make your chart taller (for example, if it is displayed in a ChartPanel, you can embed the ChartPanel in a JScrollPane and set the preferred size to some suitable value).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
The height of the bars are very small. There is about 5X the amount of space between the bars as the actual height of the bar itself. I was thinking that it might be saving room for the other series. None of my series have elements in them named the same. I don't have a task named MyName in multiple series. Each task has a distinct name.
I have 14 bars and the chart height is 600 pixels. If I increase the height it doesn't seem to make much of a difference. I had originally set it at 500 and when changed to 600, I can see no real difference in the output.
With 1 series (bars are plenty tall):
With 2 additional series (bars seem too short despite chart size):
I have 14 bars and the chart height is 600 pixels. If I increase the height it doesn't seem to make much of a difference. I had originally set it at 500 and when changed to 600, I can see no real difference in the output.
With 1 series (bars are plenty tall):
With 2 additional series (bars seem too short despite chart size):
eric could you please post your code?
Hello,
I'm trying to do a similar Gantt chart would you mind posting your code?
Also where your results exported to i mean to excel,PDF?
following is from my post:-
The report needs to be displayed in Excel and it should look like project management tool.
Following is an example of the data how it should look like:-
(dotted lines indicate horizontal bar)two bars for each record one to represent planned and another to represent actual.
header information of the dates is dynamic.
I would appreciate if there are any examples on how to achieve this would be great too!
any thoughts are appreciated.
Thanks,
Srilatha.
I'm trying to do a similar Gantt chart would you mind posting your code?
Also where your results exported to i mean to excel,PDF?
following is from my post:-
The report needs to be displayed in Excel and it should look like project management tool.
Following is an example of the data how it should look like:-
(dotted lines indicate horizontal bar)two bars for each record one to represent planned and another to represent actual.
header information of the dates is dynamic.
Code: Select all
planduration actualdurtion 1/1/2007 1/2/2007 1/3/2007 1/4/2007
3 1 --------------------------------------
-----------
2 3 -----------------------
--------------------------------------
any thoughts are appreciated.
Thanks,
Srilatha.
Code: Select all
My code results in a png file that is displayed in a website. I have no knowledge on exporting the chart to excel.
That being said, have you been able to view the JFreeChart demo which can found as a link here:
http://www.jfree.org/jfreechart/
If you look at the Gantt demos you will probably find one that pretty much matches what you are looking for. Also, if you pay the author of the code for his documentation, you'll also receive the source code for his demo which would pretty much give you line for line what you would need to produce the chart. And the cost is very reasonable.
That being said, have you been able to view the JFreeChart demo which can found as a link here:
http://www.jfree.org/jfreechart/
If you look at the Gantt demos you will probably find one that pretty much matches what you are looking for. Also, if you pay the author of the code for his documentation, you'll also receive the source code for his demo which would pretty much give you line for line what you would need to produce the chart. And the cost is very reasonable.
have one more question
Eric,
thank your for replying back and also for your suggestion.
In the first place, is it achievable what I'm planning to do using JFree chart?
My be I need data in excel format and "somehow" paint the bars horizontally
according to the headers.
i'm still debating to do everything in an image format as Gantt but even this can be achieved in the first place or not is the question.Since my report has data and also the Gantt.
would appreciate any thoughts..
thanks!
Srilatha.
thank your for replying back and also for your suggestion.
In the first place, is it achievable what I'm planning to do using JFree chart?
My be I need data in excel format and "somehow" paint the bars horizontally
according to the headers.
i'm still debating to do everything in an image format as Gantt but even this can be achieved in the first place or not is the question.Since my report has data and also the Gantt.
would appreciate any thoughts..
thanks!
Srilatha.
Srilatha,
I'm not exactly sure what you are trying to do. JFreeChart is a library of java classes designed to create charts-on-the fly from data. The primary uses of it would either be in a java application or a java web application. I don't use excel at all really, but I can imagine that with the correct set of data you could create a gantt chart within the excel application with 3rd-party extensions at worst case.
So if you're asking could this java library create a chart in excel, it probably isn't what you're looking for.
I'm not exactly sure what you are trying to do. JFreeChart is a library of java classes designed to create charts-on-the fly from data. The primary uses of it would either be in a java application or a java web application. I don't use excel at all really, but I can imagine that with the correct set of data you could create a gantt chart within the excel application with 3rd-party extensions at worst case.
So if you're asking could this java library create a chart in excel, it probably isn't what you're looking for.
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The "Today" line will be a range marker on each subplot (look for the addRangeMarker() method in the plot classes).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
Imagine if the 'Today' line in the previous posted example graph were a 'Due Date' vertical line added to each category via a LevelRenderer. What is the best/easiest way to draw the gantt series bars in a different (overdue) color if the given bar is past the LevelRenderer 'overdue' vertical line?
Note that I would want the part of the bar PRIOR to the 'Due Date' line to be the 'normal color', and the rest of the bar AFTER the 'Due Date' line in the 'overdue' (i.e. alarm) color...
Note that I would want the part of the bar PRIOR to the 'Due Date' line to be the 'normal color', and the rest of the bar AFTER the 'Due Date' line in the 'overdue' (i.e. alarm) color...
How to color the task in Jfree.
Hi,
I m very new to Jfree. I am trying to create a Gantt chart using Jfree. While displaying the Chart thru my JSF , I m using Cewolf , a 3rd party library. When I am displaying the chart it displays correctly but color is same is all task(i think it is default color, Red).
So any one can assist me how to put different color for difft Task.
Waiting for reply.
Thanks
I m very new to Jfree. I am trying to create a Gantt chart using Jfree. While displaying the Chart thru my JSF , I m using Cewolf , a 3rd party library. When I am displaying the chart it displays correctly but color is same is all task(i think it is default color, Red).
So any one can assist me how to put different color for difft Task.
Waiting for reply.
Thanks