Exemplo n.º 1
0
        /// <summary>
        /// Returns an initialized and renderer specific rendererInfo.
        /// </summary>
        internal override RendererInfo Init()
        {
            ChartRendererInfo cri = new ChartRendererInfo();

            cri.chart = (Chart)this.rendererParms.DrawingItem;
            this.rendererParms.RendererInfo = cri;

            InitSeriesRendererInfo();

            LegendRenderer lr = new ColumnLikeLegendRenderer(this.rendererParms);

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

            AxisRenderer xar = new HorizontalXAxisRenderer(this.rendererParms);

            cri.xAxisRendererInfo = (AxisRendererInfo)xar.Init();

            AxisRenderer yar = new VerticalYAxisRenderer(this.rendererParms);

            cri.yAxisRendererInfo = (AxisRendererInfo)yar.Init();

            PlotArea             plotArea = cri.chart.PlotArea;
            LinePlotAreaRenderer lpar     = new LinePlotAreaRenderer(this.rendererParms);

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

            return(cri);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returns an initialized and renderer specific rendererInfo.
        /// </summary>
        internal override RendererInfo Init()
        {
            CombinationRendererInfo cri = new CombinationRendererInfo();

            cri.chart = (Chart)this.rendererParms.DrawingItem;
            this.rendererParms.RendererInfo = cri;

            InitSeriesRendererInfo();
            DistributeSeries();

            if (cri.areaSeriesRendererInfos != null)
            {
                cri.seriesRendererInfos = cri.areaSeriesRendererInfos;
                AreaChartRenderer renderer = new AreaChartRenderer(this.rendererParms);
                renderer.InitSeries();
            }
            if (cri.columnSeriesRendererInfos != null)
            {
                cri.seriesRendererInfos = cri.columnSeriesRendererInfos;
                ColumnChartRenderer renderer = new ColumnChartRenderer(this.rendererParms);
                renderer.InitSeries();
            }
            if (cri.lineSeriesRendererInfos != null)
            {
                cri.seriesRendererInfos = cri.lineSeriesRendererInfos;
                LineChartRenderer renderer = new LineChartRenderer(this.rendererParms);
                renderer.InitSeries();
            }
            cri.seriesRendererInfos = cri.commonSeriesRendererInfos;

            LegendRenderer lr = new ColumnLikeLegendRenderer(this.rendererParms);

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

            AxisRenderer xar = new HorizontalXAxisRenderer(this.rendererParms);

            cri.xAxisRendererInfo = (AxisRendererInfo)xar.Init();

            AxisRenderer yar = new VerticalYAxisRenderer(this.rendererParms);

            cri.yAxisRendererInfo = (AxisRendererInfo)yar.Init();

            PlotArea         plotArea = cri.chart.PlotArea;
            PlotAreaRenderer apar     = new AreaPlotAreaRenderer(this.rendererParms);

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

            // Draw data labels.
            if (cri.columnSeriesRendererInfos != null)
            {
                cri.seriesRendererInfos = cri.columnSeriesRendererInfos;
                DataLabelRenderer dlr = new ColumnDataLabelRenderer(this.rendererParms);
                dlr.Init();
            }

            return(cri);
        }