Gantt Tooltip is same for all subtasks. Any help?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
nsurendiran
Posts: 17
Joined: Mon Oct 26, 2009 12:07 pm
antibot: No, of course not.

Gantt Tooltip is same for all subtasks. Any help?

Post by nsurendiran » Fri Dec 18, 2009 10:06 am

Hi All,

I am displaying tooltip for all the subtasks in my Gantt chart. My problem is I am getting the tooltip of the last subtask to all of my subtasks gantts.

Or

Someone could please explain me or show me how tooltip can be added to the subtask level, instead of the task level

Regards
Surendran

paradoxoff
Posts: 1634
Joined: Sat Feb 17, 2007 1:51 pm

Re: Gantt Tooltip is same for all subtasks. Any help?

Post by paradoxoff » Sat Dec 19, 2009 9:00 pm

The subinterval parameter which indicates the current subtask is neither supported as parameter in the addItemEntity method nor is it supported as parameter in CategoryToolTipGenerator.generateTooltip.
Thus, there is no "plug in" solution, and you will not get what you want by just providing omplementations of existing interfaces.
The quickest solution would be to have a look at how a CategoryItemEntity is created and create that directly in a (changed or overridden) drawTaks method of GanttRenderer, using the description of the sub task which is given by the subinterval index. Since the GanttCategoryDataset does not declare a method to access that description (there is no "getSubintervalKey(int row, int column, int subinterval)" method) you will have to do some type checking a casting, all in all not such a nice thing. But certainly doable.
Nevertheless, it seems that some additional interfaces are needed to access the subinterval info in a more generalized way.

Locked