Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
hitTest returns null selected object for dynamic data
posted

Hi,

 On a bare bones page with just a simple XamChart, I'm running into the following problem:

If I create the chart in markup, the mousedown-hittest sequence returns HitTestArgs with the clicked DataPoint.

However, when I create a series of DataPoints in code,  the SelectedObject in the HitTestArgs is always null.

This XAML produces correct result for MouseDown/HitTest:

            <igCA:Series ChartType="Bar" Label="Series 1">
          <igCA:Series.DataPoints>
                        <igCA:DataPoint Label="Point 1" Value="2" />
                        <igCA:DataPoint Label="Point 2" Value="1" />
                        <igCA:DataPoint Label="Point 3" Value="3" />
                    </igCA:Series.DataPoints>
                </igCA:Series>
            </igCA:XamChart.Series>

But when I comment out the DataPoints section and replace it with this code:

            Series sr = chart.Series[0];

            for (int i = 0; i < 4; i++)
            {
                DataPoint dp = new DataPoint();
                dp.Value = i * 3;
                sr.DataPoints.Add(dp);
            }

 

The Graph looks identical, but HitTestArgs SelectedObject is always null.

 Ideas?

 

 

 

Parents Reply Children
No Data