Page 1 of 1
bar chart high light
Posted: Mon Nov 24, 2003 11:16 pm
by nimmi
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
Posted: Sun Nov 14, 2004 10:44 pm
by blueland9999
Have you already got the answer?
Can you tell me , how can i do it?
I have the same question.
Thanks!
Ming
Posted: Tue Jul 17, 2007 4:01 pm
by MNusinov
I also want to record the x-y values.
If you had a ChartMouseListener to the ChartPanel you can use the event:
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());
As far as changing the color, I'm not sure on that but would like to know if anyone else has figured it out.
Posted: Wed Jul 18, 2007 9:49 am
by jwenting
I somehow doubt they'er still waiting for an answer after nearly 4 years

Posted: Thu Jul 19, 2007 2:52 pm
by MNusinov
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?
Posted: Fri Jul 20, 2007 6:28 am
by jwenting
supposed to be good for the skin, egg on your face.
Posted: Mon Mar 17, 2008 6:18 pm
by AxiomShell
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?
Well, nearly 1 year after your reply, I have to tell you I don't see any problem.
I also stumbled on your answer today using a search engine, and I found it very useful.
cheers!