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

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

Thanks for your help Hank..
Jim

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.