0

I am trying to retrieve the index location for separate bars from a bar chart created in VB 6.0 Pro. using MSChart. I need to click on an individual bar to get it's index value. All I can
get is value for the first bar on the chart. The method I am trying to use is MSChart1.Index.
Does anyone have any suggestions? Thanks

Jim

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by jim fleming
0

I need to click on an individual bar to get it's index value. All I can
get is value for the first bar on the chart.

The Microsoft Chart Control doesn't really fit your goals. It's more for a visual representation of data: not for a response to user intervention.

The Index property which you mentioned is for an array of charts with the same name on the form.

You might, however, devise a way to do what you want by calculating the coordinates on the form and coordinating that with the Current Mouse Position relative to your form.

If you can calculate the exact position of the bars, then you can determine which bar is clicked by using the CurrentX and CurrentY positions of a mouse click.

Hank

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.