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

Are there any OnLoad/OnAnimationDone events that can be bound to?

I'd like to react to some charts finishing their animations with either an event or a callback.

Is there anything like this already available in Syncfusion for Xamarin.iOS?

1 Reply

PS Parthiban Sundaram Syncfusion Team October 3, 2017 10:54 AM UTC

Hi Jeremy, 
 
Thanks for using Syncfusion products. 
 
You can achieve this requirement by inheriting chart segment class and overriding the AnimationStopped method. Please refer the following code snippet for more details. 
 
Code Snippet: 
 
 
    public class ColumnSegmentExt : SFColumnSegment 
    { 
 
         //This method will call for every segment creation 
                         
        public override void AnimationStopped(CoreAnimation.CAAnimation anim, bool finished) 
        { 
            if(Series.Segments.Last() == this) // condition for animation end 
            { 
              //do your stuff 
            } 
 
            base.AnimationStopped(anim, finished); // Must call base to avoid the memory leak 
        } 
    } 
 
 
To render the inherited segment to series. 
 
 
    public class ColumnSeriesExt : SFColumnSeries 
    { 
        protected override SFChartSegment CreateSegment() 
        { 
            return new ColumnSegmentExt(); 
        } 
    } 
 
Please download the sample from following location. 
 
 
Please let us know, if you need further assistance on this.  
 
Regards, 
Parthiban S  


Loader.
Live Chat Icon For mobile
Up arrow icon