tool tip is not displaying in piechart
tool tip is not displaying in piechart
Hello friends,
I am creating a pie chart in jsp page. pie chart is displaying correctly except the tool tip. The tool tip is getting generated when i view the pie chart in a separate frame. but it is not working in jsp page and when i keep the mouse over the chart the status bar of the browser shows error page. please give me any suggestions to find a solution.
Thanks,
Muthu
I am creating a pie chart in jsp page. pie chart is displaying correctly except the tool tip. The tool tip is getting generated when i view the pie chart in a separate frame. but it is not working in jsp page and when i keep the mouse over the chart the status bar of the browser shows error page. please give me any suggestions to find a solution.
Thanks,
Muthu
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
In a web page, you won't see tooltips unless you generate an HTML image map for your chart. Does your JSP do that?
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


here is the code
<%String filename = StockChart.createPieChart(session,new PrintWriter(out));%>
<%String graphURL ="DisplayChart?filename=" +filename; %>
<img src="<%=graphURL %>" border=0 usemap="#<%= filename %>" style="margin-left: 50px">
this is the code i m using to display the image in my jsp. Am i doing right?
<%String graphURL ="DisplayChart?filename=" +filename; %>
<img src="<%=graphURL %>" border=0 usemap="#<%= filename %>" style="margin-left: 50px">
this is the code i m using to display the image in my jsp. Am i doing right?
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
I don't know, because I don't know what the StockChart class is or does, and I know very little about JSP.
That said, it seems unlikely that 'filename' can refer to both your chart image, and the HTML image map fragment that you need in the output.
That said, it seems unlikely that 'filename' can refer to both your chart image, and the HTML image map fragment that you need in the output.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Overlib is a JavaScript library for display tooltips. It is used by Cewolf for displaying tooltips in HTML using image maps.
Are you using Cewolf?
Your JSP code looks wired. The "src" attribute of the <img> tag must point to a servlet which returns an image (a PNG or JPG file). The usemap must point to an image map file.
- martin
Are you using Cewolf?
Your JSP code looks wired. The "src" attribute of the <img> tag must point to a servlet which returns an image (a PNG or JPG file). The usemap must point to an image map file.
- martin
Hi Muthu!
I didn't know JFreeChart comes with a builtin servlet to display charts. When I last looked into this it didn't have this feature...
I just had a quick look at the sources and found that JFreeChart uses (can use) OverLib to display tooltips, but I never used it (wrote my own servlet).
OverLib can be found here. You will need to install it in your webapplication to make it avaiable to your browser. Unfortunately I can't help you any further as I never used JFreeCharts servlet classes.
hth,
- martin
I didn't know JFreeChart comes with a builtin servlet to display charts. When I last looked into this it didn't have this feature...
I just had a quick look at the sources and found that JFreeChart uses (can use) OverLib to display tooltips, but I never used it (wrote my own servlet).
OverLib can be found here. You will need to install it in your webapplication to make it avaiable to your browser. Unfortunately I can't help you any further as I never used JFreeCharts servlet classes.
hth,
- martin