How to enable tooltip if not use ChartFactory?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
rspan
Posts: 15
Joined: Wed May 02, 2007 4:36 pm

How to enable tooltip if not use ChartFactory?

Post by rspan » Mon Jun 04, 2007 10:08 pm

If not use ChartFactory to create JFreeChart object, just use JFreeChart constructor, is there any way to enable tooltip?

Thanks.

RichardWest
Posts: 844
Joined: Fri Oct 13, 2006 9:29 pm
Location: Sunnyvale, CA

Re: How to enable tooltip if not use ChartFactory?

Post by RichardWest » Tue Jun 05, 2007 3:29 am

rspan wrote:If not use ChartFactory to create JFreeChart object, just use JFreeChart constructor, is there any way to enable tooltip?

Thanks.
Yes. You will need to get the Plot object from the JFreeChart object, get the renderer(s) from the plot, and set the appropriate tool-tip generator. You can use the javadoc starting from JFreeChart and work your way though.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA

Locked