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

OnClick Event for Labels

Hi guys,

Just want to know if there is any solution in SfChart.iOS where in I can tap and add an event in the chart labels and/or data point.
Say for example, in the attached image file that came from the SyncFusion Documentation, I tap the label USA or the data point, it will go to another page.
In short, i want to add event like label click.

Thanks in advance for your help.

Regards,
Ron

Attachment: column.png_48ebc29a.zip

7 Replies

ME Manivannan Elangovan Syncfusion Team November 3, 2016 06:28 PM UTC

Hi Ronelle,

Thanks for contacting Syncfusion support.

We are able to achieve your requirement with the help of delegate method willDataPointSelect, which is invoked when we click on the datapoint and enableDataPointSelection property, which is available in series for enabling datapoint selection.

We have prepared a sample for your requirement and it can be downloaded from the following location.

Sample: http://www.syncfusion.com/downloads/support/forum/127201/ze/DataPointClick1692812408 

Regards,
Manivannan E. 



RR Ronelle Reyes November 4, 2016 03:01 PM UTC

Hi Manivannan,

Thanks for your reply. Seems like that the sample code is for xcode project. I forgot to include that I am using this in iOS Xamarin.
Can you please provide the sample for Xamarin.

Thanks


SG Sivaram Ganesan Syncfusion Team November 7, 2016 07:19 AM UTC

Hi Ronelle, 
 
We have prepared a sample in Xamarin.iOS and it can be downloaded from the following location. 
  

Sample

 

Please let us know if you need any further help.  

 
Regards, 
Sivaram G 




RR Ronelle Reyes November 7, 2016 09:13 AM UTC

Hi Sivaram,

Instead of  "WillDataPointSelect", I used "DidDataPointSelect" and for both, I was able to tap on the data point. But what we want to do is to tap on the data point name. In your example, I want to tap USA, China, Japan, Australia and France.

Thanks in advance.

Best Regards,
Ron


SG Sivaram Ganesan Syncfusion Team November 8, 2016 01:23 PM UTC

Hi Ron,  
 
We could achieve your requirement of triggering event while clicking over Axis Label by using the CustomChartBehavior class. We have prepared a sample based on this, and it can be downloaded from the following location.  
 
Sample 
 
Please let us know if you need further help.  
 
Regards,  
Sivaram G. 



RR Ronelle Reyes November 8, 2016 01:37 PM UTC

Hi Sivaram,

Thank you for your reply and your detailed sample application, this is exactly what i need.

Best Regards,
Ron


SG Sivaram Ganesan Syncfusion Team November 9, 2016 04:57 AM UTC

Hi Ronelle,

Most welcome.

Please let us know if you need further assistance on this.

Regards,
Sivaram.G.

Loader.
Up arrow icon