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
560
how to get the datapoint value in Line, Splinearea, doughnut charts
posted

Hi All,

I am using DataItemMouseLeftButtonDown event for capturing the click on the data point. My code as follows,

private void Chart_DataItemMouseLeftButtonDown(object sender, Infragistics.Silverlight.Chart.DataItemMouseEventArgs e)
{
DataPointTemplate shape = e.Element as DataPointTemplate;
//Check to see if cast was successful
if (shape != null)
{
//Try to cast the DataPointTemplate object to DataPoint
DataPoint point = shape.DataPoint;
}
}

This code works fine for Bar charts and Column charts. But in Line chart, the Shape returned is Ellipse, and in Doughnut chart it is Path. So the conversion to Datapointtemplate fails. I am unable to get the data point value, where I clicked. Kindly help me on this. Thanks.

Parents Reply Children
No Data