I Have a barChart with only one series. I would like to hightlight the bar or change color on mouse click . I also want to record the x-y values.
Any help will be greatky appreciated.
Thanks
bar chart high light
-
- Posts: 5
- Joined: Sun Nov 14, 2004 3:23 am
If you had a ChartMouseListener to the ChartPanel you can use the event:I also want to record the x-y values.
public void chartMouseClicked(ChartMouseEvent e)
to get the x-y values for a clicked on item.
Code: Select all
XYItemEntity xyItem = (XYItemEntity)e.getEntity();
xyItem.getDataset().getX(xyItem.getSeriesIndex(), xyItem.getItem());
xyItem.getDataset().getY(xyItem.getSeriesIndex(), xyItem.getItem());
-
- Posts: 1
- Joined: Mon Mar 17, 2008 6:15 pm
Well, nearly 1 year after your reply, I have to tell you I don't see any problem.MNusinov wrote:Crap I didn't see the date, I was using the search tool and stumbled upon this thread while trying to find an answer to something else. Now don't I have egg on my face?

I also stumbled on your answer today using a search engine, and I found it very useful.
cheers!