A discussion forum for JFreeChart (a 2D chart library for the Java platform).
-
converge
- Posts: 30
- Joined: Wed Jun 16, 2004 3:00 pm
Post
by converge » Wed Nov 19, 2008 4:46 pm
I'm using an XYLineAndShapeRenderer with shapes set to "hidden". My problem is that the tooltips are not being displayed when the mouse is hovering over these "hidden" shapes. If I set the shapes to visible in the renderer constructor, then the tooltips are correctly displayed when the mouse hovers over the (now visible) shapes. Here is my code:
Code: Select all
final XYLineAndShapeRenderer renderer = new XYLineAndShapeRenderer(true, false);
renderer.setBaseToolTipGenerator(new StandardXYToolTipGenerator());
renderer.setSeriesShape(1, new Rectangle(0, 0, 1, 500));
Is there a way to force the tooltips to be displayed when hovering over hidden shapes?
-
david.gilbert
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
-
Contact:
Post
by david.gilbert » Fri Nov 21, 2008 9:42 am
Do you see a tooltip if you hover really close to the actual data point? The item shape no longer applies, because it is never drawn, but a default tooltip hotspot should still get created. You can increase the area of the default tooltip area by calling setDefaultEntityRadius(int) in the renderer.