Tooltips in HTML Image Maps

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

Tooltips in HTML Image Maps

Post by Richard Atkinson » Fri Sep 06, 2002 9:16 am

Following on from feedback from Guido Laures earlier in the week about the rendering of tooltips in web browsers, I have made a modification to JFreeChart to support tooltips generated by OverLIB (http://www.bosrup.com/web/overlib/). OverLIB uses DHTML to render tooltips rather than relying on the browser rendering the alt attributes as tooltips (which only seems to work with Internet Explorer).

The changes provide two new methods:
com.jrefinery.chart.ChartUtilities
public static void writeImageMap(PrintWriter writer, String name, ChartRenderingInfo info, boolean useOverLibForToolTips)

com.jrefinery.chart.entity.ChartEntity
public String getImageMapAreaTag(boolean useOverLibForToolTips)

The changes are checked into CVS and available from http://cvs.sourceforge.net/cgi-bin/view ... ery/chart/

There is also a sample WAR demonstrating the changes available at http://homepage.ntlworld.com/richard_c_ ... sample.war (656 KB).

If your clients do not just use Internet Explorer but use other DHTML compliant browsers then OverLIB will enable everyone view tooltips on the charts. However, if a percentage of your client base uses Opera as their primary browser then neither of these solutions will help as Opera does not support the necessary DHTML and cannot be coaxed into display alt attributes as tooltips. Check out the OverLIB web site for more information on the browser compatibility of OverLIB and further implementation details.

Regards,
Richard...

David Gilbert

Re: Tooltips in HTML Image Maps

Post by David Gilbert » Fri Sep 06, 2002 10:11 am

Hi Richard,

Thanks for the post, and all the excellent work you are putting into JFreeChart!

Regards,

DG.

Seung

Re: Tooltips in HTML Image Maps

Post by Seung » Fri Sep 06, 2002 2:05 pm

Richard,

WOW! It's great again!

Thanks,
Seung

Locked