problem with switching on/off tooltips

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Muriel
Posts: 4
Joined: Mon Jul 12, 2004 8:30 am

problem with switching on/off tooltips

Post by Muriel » Tue Dec 07, 2004 4:00 pm

I've got the following problem when using tooltips:

I've created an XYPlot in a ChartPanel. On this plot I use a XYItemrenderer. On this renderer I initially set the tooltips of by calling the :

Code: Select all

renderer.setTooltipGenerator(null);
When running my program and hovering over my datamarkers I do get to see my tooltips. When A click with my mouse some where on the chart and hover again with my mouse, the tooltips do not show !!

In my program I have a button which (should) cause the tooltips to be shown again. To do this I use the following code:

Code: Select all

tooltip=new StandardXYTooltipGenerator();
renderer.setTooltipGenerater(tooltip);
Whn I push the button (to switch the tooltip on) and hover over my datamarkers, they do not appear. But when clicking somewhere on the chart area again, the tooltips appear again.

So it seems that changing the on/off functionality run-time, only has effact when I click on the chart area before hovering over the datamarkers to see the effect, HOWEVER.....when I Initialy put the tooltips ON, everything works like it should be !!

Can anyone tell me what's the problem here and if I'm doing something wrong ????

Locked