ToolTips

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

ToolTips

Post by Ursula » Wed Aug 25, 2004 3:21 pm

Hi
I'm trying to use the tooltips with XYLineAndShapeRenderer, and I cannot get it to work. I've made a copy of LineChartDemo6 to play with. It uses ChartFactory.createXYLineChart with tooltips = true. I've even included the statement
renderer.setToolTipGenerator(new StandardXYToolTipGenerator());
but it doesn't make any difference.
Am I doing anything wrong, or is this maybe a bug?
Any help will be appreciated
Regards
Ursula

nicky
Posts: 44
Joined: Mon Apr 05, 2004 1:45 am
Location: Brisbane, Australia

Post by nicky » Wed Aug 25, 2004 10:55 pm

How many lines to you have on your graph? From what I understand, with the tooltips on the XY line charts, they only work for the first line (well, that's all I could get working anyway). So you may just want to check with the first line that is generated if you have more than one line.

HTH

Ursula

ToolTips

Post by Ursula » Thu Aug 26, 2004 1:32 pm

Thanks for the suggestion. I have 2 lines, but I only want tooltips for the first line. I actually get tooltips if I use the StandardXYItemRenderer, but as mentioned in my original posting, none if I use XYLineAndShapeRenderer. I want to use the latter because I want to only have shapes for the first line.
Regards
Ursula

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 » Thu Aug 26, 2004 2:46 pm

The problem here is that the XYLineAndShapeRenderer class is incomplete. I've added support for chart entities just now, so tooltips will work in the next release (0.9.21).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked