problem with ToolTip when usingChartUtility.writeChartAsPNG

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
techlead_arun
Posts: 10
Joined: Fri Feb 25, 2005 5:55 pm
Contact:

problem with ToolTip when usingChartUtility.writeChartAsPNG

Post by techlead_arun » Thu Mar 17, 2005 7:48 am

Hi all, I have a problem here. When I am using the following code I am getting output generated as an image for my png, but I cannot see ToolTips (onmouseover), Can some one help me. Very urgent.

response.setContentType("image/png");
OutputStream out = response.getOutputStream();
ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());

ChartUtilities.writeChartAsPNG(out, chart, Integer.parseInt(graphWidth), Integer.parseInt(graphHeight),info);

Thanks a Lottttttttttt in advance. :arrow:

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 Mar 17, 2005 9:08 am

It's just a PNG image, it doesn't have any tooltip information. You need to create a corresponding HTML image map.
David Gilbert
JFreeChart Project Leader

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

techlead_arun
Posts: 10
Joined: Fri Feb 25, 2005 5:55 pm
Contact:

problem with ToolTip when usingChartUtility.writeChartAsPNG

Post by techlead_arun » Thu Mar 17, 2005 9:22 am

Thanks for the reply.

Would be greatful if you could direct me to some examples of creating image maps. When my chart width is less and if the number of bars i show in the graph are more, then neither i get the values on the bars nor i get tooltips generated.

Would be great if you could point me to some code for generating imagemaps for tooptips displaying "Bar values" for dataset. :!:

angel
Posts: 899
Joined: Thu Jan 15, 2004 12:07 am
Location: Germany - Palatinate

Post by angel » Fri Mar 18, 2005 9:54 am

Using image maps with JFreeChart (or any other charting tool) and HTML is not an easy task. First you have to understand how HTML works, hot the browser loads the image and basically how your web server works.

techlead_arun
Posts: 10
Joined: Fri Feb 25, 2005 5:55 pm
Contact:

Post by techlead_arun » Fri Mar 18, 2005 10:19 am

Are you sure about what you are saying ?

Understanding HTML aint that difficult i guess ?

Do you mean to say "There is no solution to this problem, for generating mouseover tooltips for bars with tooltip values = barvalues" in jfreecharts.

Y cant it be an update to the next version. good number of bars in a little lesser area will never let me know the exact value if i write it as an image. How do i know what is the exact value when the axis keeps ticking on equal intervels (Obviously i dont want to keep a ticking for one unit Looks wierd).

Locked