I am using AJAX to display a chart (JFreeChart) on my webapp. I have created the chart and converted it into image and written it in a image tag and send that back as text response to the Ajax call.
That works fine but the problem is I need to get information out of the chart when a user clicks on the chart and use that information to show some other information.
I tried using imagemap but not sure how to proceed when using it with AJAX.
Any help will be highly appreciated.
JFreeChart and Ajax
HI I am have the same problem
I need my user to drill down into the chart. I used Cewolf in the past but it has become incompatible with latest version of Jcommon which I need to use for reporting. So I use ajax.
Like you I can get the graph but I cannot get the imagemap to work.
I think I might try to generate the map in a different call from the ajax servlet to overlay on to the graph
If you have found a solution please let me know and I should do the same
Cheers
I need my user to drill down into the chart. I used Cewolf in the past but it has become incompatible with latest version of Jcommon which I need to use for reporting. So I use ajax.
Like you I can get the graph but I cannot get the imagemap to work.
I think I might try to generate the map in a different call from the ajax servlet to overlay on to the graph
If you have found a solution please let me know and I should do the same
Cheers
I know that Ulf Dittmer started working on Cewolf some time ago. Maybe he provides a version that is compatible with recent versions of JFreeChart. Have a look at http://www.ulfdittmer.com/code/cewolf.html for more details.
Regarding your Ajax questions: I didn't use charts which are received via an Ajax request, but I used charts with image maps and some Ajax for this. See http://www.numbis.at/messwerte/ and it's source code to get an idea. It's available in german only (sorry!), but that shouldn't matter.
hth,
- martin
Regarding your Ajax questions: I didn't use charts which are received via an Ajax request, but I used charts with image maps and some Ajax for this. See http://www.numbis.at/messwerte/ and it's source code to get an idea. It's available in german only (sorry!), but that shouldn't matter.
hth,
- martin