Links in Gantt Chart

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sergio

Links in Gantt Chart

Post by sergio » Fri Nov 29, 2002 8:38 pm

How I can get links in the time lines so a user could see with detail what a line in the chart has?

David Gilbert

Re: Links in Gantt Chart

Post by David Gilbert » Tue Dec 03, 2002 12:35 am

Not sure what you mean by links? You can get tooltips displayed for each task that will show you the start and end times, if that helps.

Regards,

DG

sergio

Re: Links in Gantt Chart

Post by sergio » Tue Dec 03, 2002 5:24 pm

Yeah, Tool Tips, how can I set those?, could you please point me to some direction to do that?, thanks in advance

David Gilbert

Re: Links in Gantt Chart

Post by David Gilbert » Wed Dec 04, 2002 11:35 am

If you run the GanttDemo application, you should see tooltips, they are enabled by default when you display a chart in the ChartPanel.

If you want to customise the tooltips, you need to write a class that implements the CategoryToolTipGenerator interface (IntervalCategoryToolTipGenerator is one example) and then call the setToolTipGenerator(...) method in the plot's renderer:

CategoryPlot plot = myChart.getCategoryPlot();
CategoryItemRenderer renderer = plot.getRenderer();
renderer.setToolTipGenerator(myToolTipGenerator);

Note the above code works with the CVS version of JFreeChart, but I have a feeling it might not against 0.9.4.

Regards,

DG

Locked