Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display graph and perform action on click of the values in chart

 
Bharatwaj Vedantham
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I would like to display graphs (say, x-axis as dates and y-axis contains volumes) in JSP. It has been suggested across lots of sites to use JFreeChart for displaying graphs and charts. But what I need to do is to display the graph and perform onclick() action on the selected values in Y-axis. Say for instance, I display a graph with fruits (apple, orange, etc) on x-axis and their quantities (20,30 etc) on y-axis and i fetch these values from database. Now my requirement is when I select 20 on the y-axis I would like perform some action on the database.

It looks like JFreeChart displays the charts/graphs as images. Please let me know if there are any taglibs to fulfill my requirement or i missed the feature on JFreeChart.

Thanks in advance
Bharat
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cewolf is a tag library that can be used to embed JFreeChart-generated images in web pages; see the link in my signature.

Its ItemLinkGenerator functionality (explained in the Tutorial at http://cewolf.sourceforge.net/new/) can be used to act on clicks on data values.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic