We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

click on datapoint

Hi,
I am using silverlight syncfusion chart controls.

I have a specific scenario where I need to handle click event on a datapoint(column bar).

In the click event I need the datacontext(the object that bar is bound to) of the bar.

I have been through the documentation and found that I could get the DataPoint's x and y value using currSegment.

But I need to access other properties of the object to which this bar is bound to.

For Example:

"Mychart" is name of Silverlight Syncfusion chart controls, here I bind state and population properties to a Mychart Control and ListData is object of list

C# Code:

MyChart.Areas[0].Series[0].BindingPathX = "State";

MyChart.Areas[0].Series[0].BindingPathsY = new List {"Population"};

MyChart.Areas[0].PrimaryAxis.LabelsSource = ListData;

MyChart.Areas[0].PrimaryAxis.ContentPath = "State";

MyChart.Areas[0].PrimaryAxis.PositionPath = "State";

Xaml code :








In Xaml Code I have taken MouseLeftButtonDownEvent ,Actually I want access another properties of my Object .when I am going to Click on bar column of state , I need to get its another information(Capital , City : this are another properties of the object ).






3 Replies

SA Saravanan A Syncfusion Team February 16, 2011 01:29 PM UTC

Hi Amar,

Thanks for choosing Syncfusion products.

Based on your requirement we have created a simple sample, in which all the properties of highlighted data points will be accessed and displayed in tooltip. Please download the sample from below location.

Sample:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=Datapoint_Property1317613809.zip


Please let us know if you have any queries.

Regards,
Saravanan.




AP amar patil February 17, 2011 01:27 PM UTC

thank's a lot !!



KK Krishna Kumar Syncfusion Team February 21, 2011 04:42 AM UTC

Hi Amar,

Thanks for choosing Syncfusion products.

Thanks for your reply. Please do not hesitate to post new forums if you ever need further assistance from us.

Regards,
Krishnakumar.



Loader.
Live Chat Icon For mobile
Up arrow icon