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

Selecting an Item in the chart

Hi support and all,

I haev see that there is a selestedItem property in the WPF version of the chart, can this also be used in Forms? What i want to do is if a user selects a whole column I want to navigate to a new page with detail about the selected column

3 Replies

MK Magesh Kumar Krishnan Syncfusion Team October 30, 2015 10:53 AM UTC

Hi Kieran,

We have prepared the sample for your requirement using SelectionChanged event. Please download the sample from below link.

http://www.syncfusion.com/downloads/support/directtrac/general/ze/ChartSample1594236541.zip

Thanks,
Magesh Kumar K


KP Kieran Pierce October 30, 2015 02:49 PM UTC

Cool thanks, any chance you could show me using XMAL for the config of the chart? I tried adding a SelectionChanged binding to the definition of the chart but it did not work. is there a way i can get a list if all avilavle commands when builing using SFCHart like I can with other tools in the xamain tool set? I use VS 2013 if that chnages the way intelsense works by the way.

Thanks for your help Kieran


MK Magesh Kumar Krishnan Syncfusion Team November 2, 2015 10:59 AM UTC

Hi Kieran,

The SelectionChanged API is an event and we cannot bind it to another property. In the XAML, you must provide event handler name as a value for the API and in code behind you can navigate to a new page with the details which you get in this event.

Another way, to write a custom class derived from the ChartSelectionBehavior and override OnSelectionChanged method to navigate to the new page. By this approach, you can keep it as separate class to avoid writing code in code behind file, which will be useful in the MVVM pattern. Refer to the following sample.
http://www.syncfusion.com/downloads/support/forum/120964/ze/ChartSample_NavigationPage_Xml1448274558

However, we have logged a feature report to implement the SelectedItem/Command property for binding it easily with the view model.

Regarding your query "is there a way I can get a list if all avilavle commands when builing using SFCHart.”

Could you please let us know whether you are asking the list of features available in the SfChart or the events available in the SfChart?

Regards,
Magesh Kumar K

Loader.
Live Chat Icon For mobile
Up arrow icon