Beispiel #1
0
        internal ChartDataPointInstance AddCell(ReportProcessing.ProcessingContext pc, int currCellDPIndex)
        {
            ChartDataPointInstancesList dataPoints = CurrentMultiChart.DataPoints;
            Chart chart = (Chart)m_reportItemDef;
            int   num   = (currCellDPIndex < 0) ? GetCurrentCellDPIndex() : currCellDPIndex;
            ChartDataPointInstance chartDataPointInstance = new ChartDataPointInstance(pc, chart, GetCellDataPoint(num), num);

            if (chart.ProcessingInnerGrouping == Pivot.ProcessingInnerGroupings.Column)
            {
                dataPoints[m_currentCellOuterIndex].Add(chartDataPointInstance);
            }
            else
            {
                if (m_currentCellOuterIndex == 0)
                {
                    Global.Tracer.Assert(dataPoints.Count == m_currentCellInnerIndex);
                    ChartDataPointInstanceList value = new ChartDataPointInstanceList();
                    dataPoints.Add(value);
                }
                dataPoints[m_currentCellInnerIndex].Add(chartDataPointInstance);
            }
            m_currentCellInnerIndex++;
            return(chartDataPointInstance);
        }
Beispiel #2
0
        internal ChartDataPointInstanceInfo(ReportProcessing.ProcessingContext pc, Chart chart, ChartDataPoint dataPointDef, int dataPointIndex, ChartDataPointInstance owner)
        {
            m_dataPointIndex = dataPointIndex;
            int count = dataPointDef.DataValues.Count;

            m_dataValues = new object[count];
            bool flag = false;

            if (dataPointDef.Action != null)
            {
                flag = dataPointDef.Action.ResetObjectModelForDrillthroughContext(pc.ReportObjectModel, dataPointDef);
            }
            for (int i = 0; i < count; i++)
            {
                m_dataValues[i] = pc.ReportRuntime.EvaluateChartDataPointDataValueExpression(dataPointDef, dataPointDef.DataValues[i], chart.Name);
            }
            if (flag)
            {
                dataPointDef.Action.GetSelectedItemsForDrillthroughContext(pc.ReportObjectModel, dataPointDef);
            }
            if (dataPointDef.DataLabel != null)
            {
                m_dataLabelStyleAttributeValues = Chart.CreateStyle(pc, dataPointDef.DataLabel.StyleClass, chart.Name + ".DataLabel", owner.UniqueName);
                m_dataLabelValue = pc.ReportRuntime.EvaluateChartDataLabelValueExpression(dataPointDef, chart.Name, m_dataLabelStyleAttributeValues);
            }
            if (dataPointDef.Action != null)
            {
                m_action = ReportProcessing.RuntimeRICollection.CreateActionInstance(pc, dataPointDef, owner.UniqueName, chart.ObjectType, chart.Name + ".DataPoint");
            }
            m_styleAttributeValues = Chart.CreateStyle(pc, dataPointDef.StyleClass, chart.Name + ".DataPoint", owner.UniqueName);
            if (dataPointDef.MarkerStyleClass != null)
            {
                m_markerStyleAttributeValues = Chart.CreateStyle(pc, dataPointDef.MarkerStyleClass, chart.Name + ".DataPoint.Marker", owner.UniqueName);
            }
            if (dataPointDef.CustomProperties != null)
            {
                m_customPropertyInstances = dataPointDef.CustomProperties.EvaluateExpressions(chart.ObjectType, chart.Name, "DataPoint(" + (dataPointIndex + 1).ToString(CultureInfo.InvariantCulture) + ").", pc);
            }
            pc.ChunkManager.AddInstance(this, owner, pc.InPageSection);
        }