Exemple #1
0
        /// <summary>
        /// Layouts and calculates the space used by the pie chart.
        /// </summary>
        internal override void Format()
        {
            ChartRendererInfo cri = (ChartRendererInfo)_rendererParms.RendererInfo;

            LegendRenderer lr = new PieLegendRenderer(_rendererParms);

            lr.Format();

            // Calculate rects and positions.
            XRect chartRect = LayoutLegend();

            cri.plotAreaRendererInfo.Rect = chartRect;
            double edge = Math.Min(chartRect.Width, chartRect.Height);

            cri.plotAreaRendererInfo.X     += (chartRect.Width - edge) / 2;
            cri.plotAreaRendererInfo.Y     += (chartRect.Height - edge) / 2;
            cri.plotAreaRendererInfo.Width  = edge;
            cri.plotAreaRendererInfo.Height = edge;

            DataLabelRenderer dlr = new PieDataLabelRenderer(_rendererParms);

            dlr.Format();

            // Calculated remaining plot area, now it's safe to format.
            PlotAreaRenderer renderer = GetPlotAreaRenderer();

            renderer.Format();

            dlr.CalcPositions();
        }
Exemple #2
0
        /// <summary>
        /// Returns an initialized and renderer specific rendererInfo.
        /// </summary>
        internal override RendererInfo Init()
        {
            ChartRendererInfo cri = new ChartRendererInfo();
            cri._chart = (Chart)_rendererParms.DrawingItem;
            _rendererParms.RendererInfo = cri;

            InitSeries(cri);

            LegendRenderer lr = new PieLegendRenderer(_rendererParms);
            cri.legendRendererInfo = (LegendRendererInfo)lr.Init();

            PlotArea plotArea = cri._chart.PlotArea;
            PlotAreaRenderer renderer = GetPlotAreaRenderer();
            cri.plotAreaRendererInfo = (PlotAreaRendererInfo)renderer.Init();

            DataLabelRenderer dlr = new PieDataLabelRenderer(_rendererParms);
            dlr.Init();

            return cri;
        }
Exemple #3
0
        /// <summary>
        /// Draws the pie chart.
        /// </summary>
        internal override void Draw()
        {
            LegendRenderer lr = new PieLegendRenderer(_rendererParms);

            lr.Draw();

            WallRenderer wr = new WallRenderer(_rendererParms);

            wr.Draw();

            PlotAreaBorderRenderer pabr = new PlotAreaBorderRenderer(_rendererParms);

            pabr.Draw();

            PlotAreaRenderer renderer = GetPlotAreaRenderer();

            renderer.Draw();

            DataLabelRenderer dlr = new PieDataLabelRenderer(_rendererParms);

            dlr.Draw();
        }
Exemple #4
0
        /// <summary>
        /// Returns an initialized and renderer specific rendererInfo.
        /// </summary>
        internal override RendererInfo Init()
        {
            ChartRendererInfo cri = new ChartRendererInfo();

            cri._chart = (Chart)_rendererParms.DrawingItem;
            _rendererParms.RendererInfo = cri;

            InitSeries(cri);

            LegendRenderer lr = new PieLegendRenderer(_rendererParms);

            cri.legendRendererInfo = (LegendRendererInfo)lr.Init();

            PlotArea         plotArea = cri._chart.PlotArea;
            PlotAreaRenderer renderer = GetPlotAreaRenderer();

            cri.plotAreaRendererInfo = (PlotAreaRendererInfo)renderer.Init();

            DataLabelRenderer dlr = new PieDataLabelRenderer(_rendererParms);

            dlr.Init();

            return(cri);
        }
Exemple #5
0
        /// <summary>
        /// Layouts and calculates the space used by the pie chart.
        /// </summary>
        internal override void Format()
        {
            ChartRendererInfo cri = (ChartRendererInfo)_rendererParms.RendererInfo;

            LegendRenderer lr = new PieLegendRenderer(_rendererParms);
            lr.Format();

            // Calculate rects and positions.
            XRect chartRect = LayoutLegend();
            cri.plotAreaRendererInfo.Rect = chartRect;
            double edge = Math.Min(chartRect.Width, chartRect.Height);
            cri.plotAreaRendererInfo.X += (chartRect.Width - edge) / 2;
            cri.plotAreaRendererInfo.Y += (chartRect.Height - edge) / 2;
            cri.plotAreaRendererInfo.Width = edge;
            cri.plotAreaRendererInfo.Height = edge;

            DataLabelRenderer dlr = new PieDataLabelRenderer(_rendererParms);
            dlr.Format();

            // Calculated remaining plot area, now it's safe to format.
            PlotAreaRenderer renderer = GetPlotAreaRenderer();
            renderer.Format();

            dlr.CalcPositions();
        }
Exemple #6
0
        /// <summary>
        /// Draws the pie chart.
        /// </summary>
        internal override void Draw()
        {
            LegendRenderer lr = new PieLegendRenderer(_rendererParms);
            lr.Draw();

            WallRenderer wr = new WallRenderer(_rendererParms);
            wr.Draw();

            PlotAreaBorderRenderer pabr = new PlotAreaBorderRenderer(_rendererParms);
            pabr.Draw();

            PlotAreaRenderer renderer = GetPlotAreaRenderer();
            renderer.Draw();

            DataLabelRenderer dlr = new PieDataLabelRenderer(_rendererParms);
            dlr.Draw();
        }