Changing tooltip

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

Changing tooltip

Post by Lisa Drebendorf » Tue Sep 10, 2002 10:45 am

Hi anurag,

you asked me some time ago, for a hint how to change the tooltip text in a pie chart (in another posting but this was also concerning other topics so I start a new one...).

Sorry I didn't respond earlier, but had much to do in the last few days.

I actually changed the tooltiptext of a bar chart, but maybe changing it for a pie chart is the same way to do it.

First overwrite the StandardCategoryToolTipGenerator and change the tooltip in the generator's generateToolTip(...) - method.

Then get the renderer for your piechart and set its tooltip generator to an object of your customized StandardCategoryToolTipGenerator.

That's all there is to do.

Regards,
Lisa

Locked