I'd like to be able to determine which x-axis and y-axis value corresponds to a given mouse coordinate of the chart control. That is, I want to be able to map mouse coordinates on the chart control to data coordinates. Is this possible?
Thanks!
fm
Also, can you point me to samples, docs, demos, feature lists, etc. that show chart interactivity? I'm having trouble getting a feel for "the Infragistics way" of doing chart interactivity; specifically, with line charts.
Hello,
I have the same need as floyd_may, I tried to use the code you provided but I keep getting "e.Grid.Count = 0" in the FillSceneGraph method, so the xAxis and yAxis objects are never assigned.
I may add that I have data plotted in my chart, a composite chart in fact, containing multiple scatter charts
Any idea ?
Thanks !
For composite charts you have to get the Grid from the chart layer itself and not from event args. Like so:Hashtable grid = ultraChart1.CompositeChart.ChartLayers[0].ChartLayer.Grid;
Thanks for your answer !
I did like you said but the two axes I get from grid["X"] and grid["Y"] seem to be "uninitialized", I mean all values like min or max are equal to 0 and are not those I set in the AxisItem objects I'm using as axes in the layers.
I searched in documentation but didn't find anything :( is there anywhere else I could look ?
Thanks
FillSceneGraph can fire multiple times based on how you created your chart. It's possible for the axes to be uninitialized on one of the initial passes through FillSceneGraph. However, in my attempts, I got properly initialized axes. So if this doesn't work for you, I would need more information about your chart. Sample code will help as well.
I noticed that FillSceneGraph is called multiple times, my problem was that I was simply not getting the grid object from the proper ChartLayer.
I fought that using ChartLayers[0] as you suggested would work because I needed the axes from my first layer, but what happened is that Visual Studio 2008 designer added multiple layers when I played with the chart wizard. So I ended up with nearly 60 chart layers :s I removed them and now everything's fine.
Thanks again.