how to set legend tooltips

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
jusepi
Posts: 16
Joined: Tue May 09, 2006 1:18 pm
Location: USA

how to set legend tooltips

Post by jusepi » Wed May 17, 2006 5:15 am

I need to have tooltips on each entry in the legend of a standard line chart using CategoryDatasets. I noticed a method called getLegendItems() within the CategoryPlot class. So I figure I could just get each LegendItem and set the tooltip. For some reason there's no setToolTipText method in that class. So I tried compiling my own version of LegendItem with a setter, but it made no difference. Another weird thing is that there seems to only be one LegendItem even though I have 3 CategoryDatasets in there. How can you set tooltips for the legend entries? What am I missing?? Thanks in advance.

angel
Posts: 899
Joined: Thu Jan 15, 2004 12:07 am
Location: Germany - Palatinate

Post by angel » Wed May 17, 2006 7:45 am

To my knowledge, there is no direct support for tooltips on legendItems. But I think I've read once a solution in the forums, so you may find something...

Locked