Display graph and perform action on click of the values in chart
Bharatwaj Vedantham
Greenhorn
Joined: Jan 27, 2010
Posts: 2
posted
0
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
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
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.