0

I have used Jfreechart 1.0.13 for generating the bar chart using spring mvc. I am using

ChartUtilities.writeChartAsJPEG(response.getOutputStream(), jfreechart1, 400, 400);

to display the image in the browser. Where can I set tool tip?

I tried the following but it does not work:

 CategoryPlot categoryplot = (CategoryPlot) jfreechart.getPlot();
 BarRenderer barrenderer = (BarRenderer) categoryplot.getRenderer();
 barrenderer.setBaseToolTipGenerator(new StandardCategoryToolTipGenerator());
 final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());

I'm rendering chart as images using jsp. Tooltips are shown when I display the graph using chart frame, but not is the web application. Can anyone suggest how I can solve this problem?

assylias
  • 310,138
  • 72
  • 642
  • 762
DDD
  • 83
  • 3
  • 14
  • I'm rendering chart as images using on jsp. I saw the tooltips while using chartframe.Can anyone suggest me how can i solve this problem. tooltips are shown when i display the graph using chart frame, but mine is a web application. – DDD May 24 '12 at 11:01
  • Possible duplicate of [Generate image and display it inside JSP along with other content](http://stackoverflow.com/questions/9927303/generate-image-and-display-it-inside-jsp-along-with-other-content). – trashgod May 24 '12 at 20:28
  • 1
    If you are storing graph as an image I don't think you would be able to show tool tips like that. – dirtyhandsphp Jul 14 '12 at 14:46

0 Answers0