Forums Register Login

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

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
The government thinks you are too stupid to make your own lightbulb choices. But this tiny ad thinks you are smart:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1448 times.
Similar Threads
Line graph using Swing
Setting Strings in Y Axis of the XY Plot [JFreeChart]
JFreeChart Demo
Chart
Chart problem .. I would really appreciate some help !!
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 21:54:05.