Question How to select a column from a chart

kenharding

Member
Joined
Apr 15, 2007
Messages
5
Location
Staffordshire, UK
Programming Experience
Beginner
Hi,

I have a chart that displays 23 columns (one for each hour of the day, 0->23hrs). I have tooltips set so that if the user hovers the cursor over a column it shows the correct tooltip information which in this case is the X and Y axis values. What I would like to be able to do is allow the use to click on one of the columns and show more information pertaining to that column.

For example, if the user clicks on the second column (which represents information for 1:00am to 1:59am) then another graph will appear that shows more information relevant to that hour.

So my question is, can I detect which column in my chart has been clicked on?

There is a getToolTipText event but that fires up as soon as the cursor enters the chart area so doesn't give me what I want.

Thanks for looking
Ken
 
Use the Chart.HitTest method from MouseDown event for example.
 
Back
Top