Esempio n. 1
0
        public XYDonutChart()
        {
            _pieView           = new UIView();
            PieBackgroundColor = UIColor.Clear;
            Add(_pieView);

            _selectedSliceIndex = -1;
            _animations         = new List <CABasicAnimation> ();
            _animationDelegate  = new AnimationDelegate(this);

            AnimationSpeed      = 0.5f;
            StartPieAngle       = (nfloat)Math.PI * 3;
            SelectedSliceStroke = 2.0f;
            LabelColor          = UIColor.White;
            IsDonut             = true;
            ShowLabel           = true;
            ShowPercentage      = true;

            PieRadius       = (nfloat)Math.Min(Bounds.Width / 2, Bounds.Height / 2) - 10;
            LabelFont       = UIFont.BoldSystemFontOfSize((nfloat)Math.Max(PieRadius / 10, 5));
            PieCenter       = new CGPoint(Bounds.Width / 2, Bounds.Height / 2);
            LabelRadius     = PieRadius / 2;
            DonutLineStroke = PieRadius / 4;
        }
Esempio n. 2
0
        public XYDonutChart ()
        {
            _pieView = new UIView ();
            PieBackgroundColor = UIColor.Clear;
            Add (_pieView);

            _selectedSliceIndex = -1;
            _animations = new List<CABasicAnimation> ();
            _animationDelegate = new AnimationDelegate (this);

            AnimationSpeed = 0.5f;
            StartPieAngle = (nfloat)Math.PI * 3;
            SelectedSliceStroke = 2.0f;
            LabelColor = UIColor.White;
            IsDonut = true;
            ShowLabel = true;
            ShowPercentage = true;

            PieRadius = (nfloat)Math.Min (Bounds.Width / 2, Bounds.Height / 2) - 10;
            LabelFont = UIFont.BoldSystemFontOfSize ( (nfloat)Math.Max (PieRadius / 10, 5));
            PieCenter = new CGPoint (Bounds.Width / 2, Bounds.Height / 2);
            LabelRadius = PieRadius / 2;
            DonutLineStroke = PieRadius / 4;
        }