Clicking on side/top of 3D bars

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Graham Perks

Clicking on side/top of 3D bars

Post by Graham Perks » Fri Jan 17, 2003 9:51 pm

I added my class as a ChartMouseListener and am getting clicks. However on 3D bars, clicks to the side or top do not come through. Or at least, the entity received is not castable to CategoryItemEntity.

With many bars, the bars are very thin. Being able to click on the wide sides is very useful. My data series is many low level bars with occasional high bars, and it's these the user will be clicking on. The side is a nice wide big clickable area; the front of the bar is very thin as there are so many bars in the graph.

How can I make the top/side clickable?

Thanks,
Graham Perks.

David Gilbert

Re: Clicking on side/top of 3D bars

Post by David Gilbert » Sat Jan 18, 2003 9:19 am

Hi Graham,

The code that creates the 'area' for the chart entity (which is ultimately used for the clickable area by the chart mouse event code) is in the drawItem method of the renderer. I think it uses the front of the bar, just out of laziness.

But in the CVS code, I'm pretty sure this has been fixed, so it should be OK for 0.9.5.

Regards,

Dave Gilbert

Rama Krishna

Mouse Even Handling on Line chart

Post by Rama Krishna » Sat Feb 15, 2003 7:39 pm

Hi David

I need to handle mouse event on Line Chart

Where ever I click I should get X and Y value of Line .

could you please give ne an example on this

regards

Ramakrishna

Locked