Example #1
0
        private static GraphicsPath RenderSlice(CommonElements common, ChartGraphics graph, CategoryNode node, DataPoint dataPoint, DataPointAttributes dataPointAttributes, RectangleF rectRelative, float startAngle, float sweepAngle, PointF centerAbsolute, float radiusAbsolute, int level, int dataPointIndex)
        {
            float        doughnutRadius = (float)(1.0 / (float)(level + 1) * 100.0);
            GraphicsPath result         = null;

            graph.DrawPieRel(rectRelative, startAngle, sweepAngle, dataPointAttributes.Color, dataPointAttributes.BackHatchStyle, dataPointAttributes.BackImage, dataPointAttributes.BackImageMode, dataPointAttributes.BackImageTransparentColor, dataPointAttributes.BackImageAlign, dataPointAttributes.BackGradientType, dataPointAttributes.BackGradientEndColor, dataPointAttributes.BorderColor, dataPointAttributes.BorderWidth, dataPointAttributes.BorderStyle, PenAlignment.Inset, false, 0.0, true, doughnutRadius, false, PieDrawingStyle.Default, out result);
            if (dataPoint != null)
            {
                PieChart.Map(common, dataPoint, startAngle, sweepAngle, rectRelative, true, doughnutRadius, graph, dataPointIndex);
                dataPoint.positionRel = SunburstChart.GetSliceCenterRelative(graph, SunburstChart.GetSliceCenterAngle(startAngle, sweepAngle), centerAbsolute, radiusAbsolute);
            }
            else
            {
                SunburstChart.MapCategoryNode(common, node, startAngle, sweepAngle, rectRelative, doughnutRadius, graph);
            }
            return(result);
        }