Exemple #1
0
        internal override void DataRegionContentsSetExprHost(ObjectModelImpl reportObjectModel, bool traverseDataRegions)
        {
            if (m_chartExprHost == null)
            {
                return;
            }
            IList <ChartAreaExprHost> chartAreasHostsRemotable = m_chartExprHost.ChartAreasHostsRemotable;

            if (m_chartAreas != null && chartAreasHostsRemotable != null)
            {
                for (int i = 0; i < m_chartAreas.Count; i++)
                {
                    ChartArea chartArea = m_chartAreas[i];
                    if (chartArea != null && chartArea.ExpressionHostID > -1)
                    {
                        chartArea.SetExprHost(chartAreasHostsRemotable[chartArea.ExpressionHostID], reportObjectModel);
                    }
                }
            }
            IList <ChartTitleExprHost> titlesHostsRemotable = m_chartExprHost.TitlesHostsRemotable;

            if (m_titles != null && titlesHostsRemotable != null)
            {
                for (int j = 0; j < m_titles.Count; j++)
                {
                    ChartTitle chartTitle = m_titles[j];
                    if (chartTitle != null && chartTitle.ExpressionHostID > -1)
                    {
                        chartTitle.SetExprHost(titlesHostsRemotable[chartTitle.ExpressionHostID], reportObjectModel);
                    }
                }
            }
            IList <ChartLegendExprHost> legendsHostsRemotable = m_chartExprHost.LegendsHostsRemotable;

            if (m_legends != null && legendsHostsRemotable != null)
            {
                for (int k = 0; k < m_legends.Count; k++)
                {
                    ChartLegend chartLegend = m_legends[k];
                    if (chartLegend != null && chartLegend.ExpressionHostID > -1)
                    {
                        chartLegend.SetExprHost(legendsHostsRemotable[chartLegend.ExpressionHostID], reportObjectModel);
                    }
                }
            }
            IList <ChartCustomPaletteColorExprHost> customPaletteColorHostsRemotable = m_chartExprHost.CustomPaletteColorHostsRemotable;

            if (m_customPaletteColors != null && customPaletteColorHostsRemotable != null)
            {
                for (int l = 0; l < m_customPaletteColors.Count; l++)
                {
                    ChartCustomPaletteColor chartCustomPaletteColor = m_customPaletteColors[l];
                    if (chartCustomPaletteColor != null && chartCustomPaletteColor.ExpressionHostID > -1)
                    {
                        chartCustomPaletteColor.SetExprHost(customPaletteColorHostsRemotable[chartCustomPaletteColor.ExpressionHostID], reportObjectModel);
                    }
                }
            }
            if (m_codeParameters != null && m_chartExprHost.CodeParametersHostsRemotable != null)
            {
                m_codeParameters.SetExprHost(m_chartExprHost.CodeParametersHostsRemotable, reportObjectModel);
            }
            if (m_borderSkin != null && m_chartExprHost.BorderSkinHost != null)
            {
                m_borderSkin.SetExprHost(m_chartExprHost.BorderSkinHost, reportObjectModel);
            }
            if (m_noDataMessage != null && m_chartExprHost.NoDataMessageHost != null)
            {
                m_noDataMessage.SetExprHost(m_chartExprHost.NoDataMessageHost, reportObjectModel);
            }
            IList <ChartSeriesExprHost>    seriesCollectionHostsRemotable = m_chartExprHost.SeriesCollectionHostsRemotable;
            IList <ChartDataPointExprHost> cellHostsRemotable             = m_chartExprHost.CellHostsRemotable;

            Global.Tracer.Assert(m_chartSeriesCollection != null, "(m_chartSeriesCollection != null)");
            for (int m = 0; m < m_chartSeriesCollection.Count; m++)
            {
                ChartSeries chartSeries = m_chartSeriesCollection[m];
                Global.Tracer.Assert(chartSeries != null, "(null != series)");
                if (seriesCollectionHostsRemotable != null && chartSeries.ExpressionHostID > -1)
                {
                    chartSeries.SetExprHost(seriesCollectionHostsRemotable[chartSeries.ExpressionHostID], reportObjectModel);
                }
                if (cellHostsRemotable == null)
                {
                    continue;
                }
                Global.Tracer.Assert(chartSeries.DataPoints != null, "(null != series.DataPoints)");
                for (int n = 0; n < chartSeries.DataPoints.Count; n++)
                {
                    ChartDataPoint chartDataPoint = chartSeries.DataPoints[n];
                    Global.Tracer.Assert(chartDataPoint != null, "(null != dataPoint)");
                    if (chartDataPoint.ExpressionHostID > -1)
                    {
                        chartDataPoint.SetExprHost(cellHostsRemotable[chartDataPoint.ExpressionHostID], reportObjectModel);
                    }
                }
            }
        }
Exemple #2
0
        internal override object PublishClone(AutomaticSubtotalContext context)
        {
            ChartLegend chartLegend = (ChartLegend)base.PublishClone(context);

            if (m_position != null)
            {
                chartLegend.m_position = (ExpressionInfo)m_position.PublishClone(context);
            }
            if (m_layout != null)
            {
                chartLegend.m_layout = (ExpressionInfo)m_layout.PublishClone(context);
            }
            if (m_hidden != null)
            {
                chartLegend.m_hidden = (ExpressionInfo)m_hidden.PublishClone(context);
            }
            if (m_dockOutsideChartArea != null)
            {
                chartLegend.m_dockOutsideChartArea = (ExpressionInfo)m_dockOutsideChartArea.PublishClone(context);
            }
            if (m_chartLegendTitle != null)
            {
                chartLegend.m_chartLegendTitle = (ChartLegendTitle)m_chartLegendTitle.PublishClone(context);
            }
            if (m_autoFitTextDisabled != null)
            {
                chartLegend.m_autoFitTextDisabled = (ExpressionInfo)m_autoFitTextDisabled.PublishClone(context);
            }
            if (m_minFontSize != null)
            {
                chartLegend.m_minFontSize = (ExpressionInfo)m_minFontSize.PublishClone(context);
            }
            if (m_headerSeparator != null)
            {
                chartLegend.m_headerSeparator = (ExpressionInfo)m_headerSeparator.PublishClone(context);
            }
            if (m_headerSeparatorColor != null)
            {
                chartLegend.m_headerSeparatorColor = (ExpressionInfo)m_headerSeparatorColor.PublishClone(context);
            }
            if (m_columnSeparator != null)
            {
                chartLegend.m_columnSeparator = (ExpressionInfo)m_columnSeparator.PublishClone(context);
            }
            if (m_columnSeparatorColor != null)
            {
                chartLegend.m_columnSeparatorColor = (ExpressionInfo)m_columnSeparatorColor.PublishClone(context);
            }
            if (m_columnSpacing != null)
            {
                chartLegend.m_columnSpacing = (ExpressionInfo)m_columnSpacing.PublishClone(context);
            }
            if (m_interlacedRows != null)
            {
                chartLegend.m_interlacedRows = (ExpressionInfo)m_interlacedRows.PublishClone(context);
            }
            if (m_interlacedRowsColor != null)
            {
                chartLegend.m_interlacedRowsColor = (ExpressionInfo)m_interlacedRowsColor.PublishClone(context);
            }
            if (m_equallySpacedItems != null)
            {
                chartLegend.m_equallySpacedItems = (ExpressionInfo)m_equallySpacedItems.PublishClone(context);
            }
            if (m_reversed != null)
            {
                chartLegend.m_reversed = (ExpressionInfo)m_reversed.PublishClone(context);
            }
            if (m_maxAutoSize != null)
            {
                chartLegend.m_maxAutoSize = (ExpressionInfo)m_maxAutoSize.PublishClone(context);
            }
            if (m_textWrapThreshold != null)
            {
                chartLegend.m_textWrapThreshold = (ExpressionInfo)m_textWrapThreshold.PublishClone(context);
            }
            if (m_chartLegendCustomItems != null)
            {
                chartLegend.m_chartLegendCustomItems = new List <ChartLegendCustomItem>(m_chartLegendCustomItems.Count);
                foreach (ChartLegendCustomItem chartLegendCustomItem in m_chartLegendCustomItems)
                {
                    chartLegend.m_chartLegendCustomItems.Add((ChartLegendCustomItem)chartLegendCustomItem.PublishClone(context));
                }
            }
            if (m_chartLegendColumns != null)
            {
                chartLegend.m_chartLegendColumns = new List <ChartLegendColumn>(m_chartLegendColumns.Count);
                foreach (ChartLegendColumn chartLegendColumn in m_chartLegendColumns)
                {
                    chartLegend.m_chartLegendColumns.Add((ChartLegendColumn)chartLegendColumn.PublishClone(context));
                }
            }
            if (m_chartElementPosition != null)
            {
                chartLegend.m_chartElementPosition = (ChartElementPosition)m_chartElementPosition.PublishClone(context);
            }
            return(chartLegend);
        }
 internal ChartLegend(Microsoft.ReportingServices.ReportIntermediateFormat.ChartLegend legendDef, Chart chart)
 {
     m_chart     = chart;
     m_legendDef = legendDef;
 }