Hi To All,
I am using JFreechart with netbeans to create a pie chart. I am creating chart in JSP and displaying it in image (html tag ). I have a requirement of displaying some details when click on a sector of Pie Chart. how can i achieve this.
Please help me.
Thanks in advance
mouse clicks in jfreechart !
Re: mouse clicks in jfreechart !
Hi!
There is so direct support for this in JFreeChart, as your chart is just an image in a browser which doesn't know anything about JFreeChart. So you have to find a solution on the client-side. You could use image maps to divide your chart into regions (I thinks JFreeChart has some basic support for this, but it's been a while since I used it the last time). And you could use JavaScript events to catch click-events on the browser-side. Cewolf is a JSP base approach based on JFreeChart which also has some support for image maps. Maybe you could have a look at it.
hth,
- martin
There is so direct support for this in JFreeChart, as your chart is just an image in a browser which doesn't know anything about JFreeChart. So you have to find a solution on the client-side. You could use image maps to divide your chart into regions (I thinks JFreeChart has some basic support for this, but it's been a while since I used it the last time). And you could use JavaScript events to catch click-events on the browser-side. Cewolf is a JSP base approach based on JFreeChart which also has some support for image maps. Maybe you could have a look at it.
hth,
- martin