How can I use tooltip in BarChart??

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

How can I use tooltip in BarChart??

Post by monnom » Sat Oct 08, 2005 10:20 am

How can I use tooltip in Barchart?

I've found some document.. but, It's not useful.. -.-;

Help me! plz!

How's the renderer and generator 's relation? :shock:

pmlb
Posts: 31
Joined: Thu Aug 25, 2005 5:18 pm
Location: France

Post by pmlb » Mon Oct 10, 2005 5:11 pm

Create a tooltip generator then assign it to the renderer with the setToolTipGenerator method.
For instance for a CategoryDataset based barchart:

Code: Select all

StandardCategoryToolTipGenerator tt = new StandardCategoryToolTipGenerator();
renderer.setToolTipGenerator(tt);
Pierre-Marie

Locked