Beispiel #1
0
        /// <summary>
        /// Adds the pie adornments.
        /// </summary>
        /// <param name="x">The X Value</param>
        /// <param name="y">The Y Value</param>
        /// <param name="startAngle">The Start Angle</param>
        /// <param name="endAngle">The End Angle</param>
        /// <param name="index">The Index</param>
        /// <param name="radius">The Radius</param>
        /// <param name="startDepth">The Start Depth</param>
        private void AddPieAdornments(double x, double y, double startAngle, double endAngle, int index, double radius, double startDepth)
        {
            startAngle = CircularSeriesBase3D.DegreeToRadianConverter(startAngle);
            endAngle   = DegreeToRadianConverter(endAngle);
            var angle = (startAngle + endAngle) / 2;

            Adornments.Add(PieSeries3D.CreateAdornment(this, x, y, angle, radius, startDepth));
            Adornments[(int)x].Item = this.ActualData[index];
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PieSegment3D"/> class.
        /// </summary>
        /// <param name="series">The series.</param>
        /// <param name="center">The center.</param>
        /// <param name="start">The start.</param>
        /// <param name="end">The end.</param>
        /// <param name="height">The height.</param>
        /// <param name="r">The r.</param>
        /// <param name="i">The i.</param>
        /// <param name="y">The y.</param>
        /// <param name="insideRadius">The inside radius.</param>
        public PieSegment3D(ChartSeries3D series, Vector3D center, double start, double end, double height, double r, int i, double y, double insideRadius)
        {
            Points = new List <Point>();

            if (series.ToggledLegendIndex.Contains(i))
            {
                this.IsSegmentVisible = false;
            }
            else
            {
                this.IsSegmentVisible = true;
            }
            Series     = series3D = series as PieSeries3D;
            area       = series.Area;
            Item       = series.ActualData[i];
            StartValue = start;
            EndValue   = end;
            depth      = height;
            radius     = r;
            if (series3D != null)
            {
                pieIndex = series3D.GetPieSeriesIndex();
            }

            Index        = i;
            YData        = y;
            Center       = center;
            inSideRadius = insideRadius;
            if (series.CanAnimate)
            {
                return;
            }
            if (series3D.StartAngle < series3D.EndAngle)
            {
                ActualStartValue = start;
                ActualEndValue   = end - start;
            }
            else
            {
                ActualStartValue = end;
                ActualEndValue   = start - end;
            }
        }