public override void ViewWillAppear(bool animated) { base.ViewWillAppear(animated); if (_timer == null) { _timer = NSTimer.CreateRepeatingScheduledTimer(0.01, (timer) => { _i++; _lineDataSeries.Append(_i, Math.Sin(_i * 0.1 + _phase)); _scatterDataSeries.Append(_i, Math.Cos(_i * 0.1 + _phase)); _phase += 0.01; var customAnnotation = new SCICustomAnnotation(); if (_i % 100 == 0) { customAnnotation.CustomView = new UILabel(new CoreGraphics.CGRect(0, 0, 10, 10)) { Text = "Y", BackgroundColor = UIColor.LightGray }; customAnnotation.X1Value = _i; customAnnotation.Y1Value = 0.5; customAnnotation.CoordinateMode = SCIAnnotationCoordinateMode.Absolute; customAnnotation.YAxisId = "firstYAxis"; // adding new custom annotation into the annotationGroup property _annotationCollection.Add(customAnnotation); // removing annotations that are out of visible range var customAn = _annotationCollection[0] as SCICustomAnnotation; if (customAn != null) { if (customAn.X1Value.CompareTo(_i - 500) == 0) { // since the contentView is UIView element - we have to call removeFromSuperView method to remove it from screen customAn.CustomView.RemoveFromSuperview(); _annotationCollection.Remove(customAn); } } } if (_i % 200 == 0) { customAnnotation.YAxisId = "secondaryYAxis"; } _surfaceTop.ZoomExtentsX(); // Extents bottom chart _surfaceBottom.ZoomExtentsX(); }); } }