JFreeChart and Ajax

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
debolina
Posts: 4
Joined: Fri Dec 15, 2006 6:32 pm

JFreeChart and Ajax

Post by debolina » Thu Aug 09, 2007 5:49 pm

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.

weechimpy
Posts: 1
Joined: Wed Apr 02, 2008 1:11 pm

Post by weechimpy » Wed Apr 02, 2008 7:59 pm

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

matinh
Posts: 483
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Post by matinh » Thu Apr 03, 2008 2:14 pm

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

Locked