Toolitps with Escape-Characters

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Tom
Posts: 32
Joined: Mon Dec 11, 2006 2:50 pm

Toolitps with Escape-Characters

Post by Tom » Mon Jun 11, 2007 1:01 pm

Hello,
I have a tricky Problem. I'm displaying charts on a jsp-Site using the imagemap feature from chartutilities. It works fine as long as there is no text like (Fish "Tuna") used for a category. If so, the OverLIBToolTipTagFragmentGenerator as well as the StandardToolTipTagFragmentGenerator do not escape the (")-Characters for the imagemap-String, and what happens is clear: The Imagemap doesn't work no more because it looks like this:

Code: Select all

<area shape="poly" coords="466,161,465,163,463,164,461,163,460,161,461,159,463,158,465,159,466,161,466,161" onMouseOver="return overlib('Fish "tuna" ');" onMouseOut="return nd();"
See the problem? The Overlib- call ends with (Fish ").

I think the only approach can be to subclass the FragmentGenerator and override the "generateTooltip()"-Method, but isn't this a general Problem?

Thanks in advance

Tom

dings
Posts: 7
Joined: Fri May 04, 2007 10:22 am

Overlib escapes

Post by dings » Fri May 09, 2008 3:10 pm

I have the exact same problem, so I'm curious as to whether you
found a simple solution.

--
dings

Taqua
JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm
Contact:

Post by Taqua » Fri May 09, 2008 7:14 pm

This has been fixed at least for the StandardToolTipGenerator in the latest version. Upgrade and your error goes away.

The OverLIBToolTipTagFragmentGenerator seems to be a non standard class, it is not part of the main jfreechart distribution.

Locked