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...
Tooltips in HTML Image Maps
Re: Tooltips in HTML Image Maps
Hi Richard,
Thanks for the post, and all the excellent work you are putting into JFreeChart!
Regards,
DG.
Thanks for the post, and all the excellent work you are putting into JFreeChart!
Regards,
DG.