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.
Unfortunately, activation email could not send to your email. Please try again.

Selecting an Item in the chart

Thread ID:

Created:

Updated:

Platform:

Replies:

120964 Oct 29,2015 03:04 PM Nov 2,2015 05:59 AM Xamarin.Forms 3
loading
Tags: SfChart
Kieran Pierce
Asked On October 29, 2015 03:04 PM

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

Magesh Kumar Krishnan [Syncfusion]
Replied On October 30, 2015 06:53 AM

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

Kieran Pierce
Replied On October 30, 2015 10:49 AM

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

Magesh Kumar Krishnan [Syncfusion]
Replied On November 2, 2015 05:59 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;