Esempio n. 1
0
 public ChartInstanceInfo(ReportProcessing.ProcessingContext pc, Chart reportItemDef, ChartInstance owner)
     : base(pc, reportItemDef, owner, true)
 {
     if (reportItemDef.Title != null)
     {
         this.m_title = new ChartTitleInstance(pc, reportItemDef, reportItemDef.Title, "Title");
     }
     if (reportItemDef.CategoryAxis != null)
     {
         this.m_categoryAxis = new AxisInstance(pc, reportItemDef, reportItemDef.CategoryAxis, Axis.Mode.CategoryAxis);
     }
     if (reportItemDef.ValueAxis != null)
     {
         this.m_valueAxis = new AxisInstance(pc, reportItemDef, reportItemDef.ValueAxis, Axis.Mode.ValueAxis);
     }
     if (reportItemDef.Legend != null)
     {
         this.m_legendStyleAttributeValues = Chart.CreateStyle(pc, reportItemDef.Legend.StyleClass, reportItemDef.Name + ".Legend", owner.UniqueName);
     }
     if (reportItemDef.PlotArea != null)
     {
         this.m_plotAreaStyleAttributeValues = Chart.CreateStyle(pc, reportItemDef.PlotArea.StyleClass, reportItemDef.Name + ".PlotArea", owner.UniqueName);
     }
     this.SaveChartCulture();
     this.m_noRows = pc.ReportRuntime.EvaluateDataRegionNoRowsExpression(reportItemDef, reportItemDef.ObjectType, reportItemDef.Name, "NoRows");
 }
        public AxisInstance(ReportProcessing.ProcessingContext pc, Chart chart, Axis axisDef, Axis.Mode mode)
        {
            this.m_uniqueName = pc.CreateUniqueName();
            string text = mode.ToString();

            if (axisDef.Title != null)
            {
                this.m_title = new ChartTitleInstance(pc, chart, axisDef.Title, text);
            }
            this.m_styleAttributeValues = Chart.CreateStyle(pc, axisDef.StyleClass, chart.Name + "." + text, this.m_uniqueName);
            if (axisDef.MajorGridLines != null)
            {
                this.m_majorGridLinesStyleAttributeValues = Chart.CreateStyle(pc, axisDef.MajorGridLines.StyleClass, chart.Name + "." + text + ".MajorGridLines", this.m_uniqueName);
            }
            if (axisDef.MinorGridLines != null)
            {
                this.m_minorGridLinesStyleAttributeValues = Chart.CreateStyle(pc, axisDef.MinorGridLines.StyleClass, chart.Name + "." + text + ".MinorGridLines", this.m_uniqueName);
            }
            if (axisDef.Min != null && ExpressionInfo.Types.Constant != axisDef.Min.Type)
            {
                this.m_minValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.Min, chart.Name, text + ".Min", Axis.ExpressionType.Min);
            }
            if (axisDef.Max != null && ExpressionInfo.Types.Constant != axisDef.Max.Type)
            {
                this.m_maxValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.Max, chart.Name, text + ".Max", Axis.ExpressionType.Max);
            }
            if (axisDef.CrossAt != null && ExpressionInfo.Types.Constant != axisDef.CrossAt.Type)
            {
                this.m_crossAtValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.CrossAt, chart.Name, text + ".CrossAt", Axis.ExpressionType.CrossAt);
            }
            if (axisDef.MajorInterval != null && ExpressionInfo.Types.Constant != axisDef.MajorInterval.Type)
            {
                this.m_majorIntervalValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.MajorInterval, chart.Name, text + ".MajorInterval", Axis.ExpressionType.MajorInterval);
            }
            if (axisDef.MinorInterval != null && ExpressionInfo.Types.Constant != axisDef.MinorInterval.Type)
            {
                this.m_minorIntervalValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.MinorInterval, chart.Name, text + ".MinorInterval", Axis.ExpressionType.MinorInterval);
            }
            if (axisDef.CustomProperties != null)
            {
                this.m_customPropertyInstances = axisDef.CustomProperties.EvaluateExpressions(chart.ObjectType, chart.Name, text + ".", pc);
            }
        }
Esempio n. 3
0
        public ChartDataPointInstanceInfo(ReportProcessing.ProcessingContext pc, Chart chart, ChartDataPoint dataPointDef, int dataPointIndex, ChartDataPointInstance owner)
        {
            this.m_dataPointIndex = dataPointIndex;
            int count = dataPointDef.DataValues.Count;

            this.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++)
            {
                this.m_dataValues[i] = pc.ReportRuntime.EvaluateChartDataPointDataValueExpression(dataPointDef, dataPointDef.DataValues[i], chart.Name);
            }
            if (flag)
            {
                dataPointDef.Action.GetSelectedItemsForDrillthroughContext(pc.ReportObjectModel, dataPointDef);
            }
            if (dataPointDef.DataLabel != null)
            {
                this.m_dataLabelStyleAttributeValues = Chart.CreateStyle(pc, dataPointDef.DataLabel.StyleClass, chart.Name + ".DataLabel", owner.UniqueName);
                this.m_dataLabelValue = pc.ReportRuntime.EvaluateChartDataLabelValueExpression(dataPointDef, chart.Name, this.m_dataLabelStyleAttributeValues);
            }
            if (dataPointDef.Action != null)
            {
                this.m_action = ReportProcessing.RuntimeRICollection.CreateActionInstance(pc, dataPointDef, owner.UniqueName, chart.ObjectType, chart.Name + ".DataPoint");
            }
            this.m_styleAttributeValues = Chart.CreateStyle(pc, dataPointDef.StyleClass, chart.Name + ".DataPoint", owner.UniqueName);
            if (dataPointDef.MarkerStyleClass != null)
            {
                this.m_markerStyleAttributeValues = Chart.CreateStyle(pc, dataPointDef.MarkerStyleClass, chart.Name + ".DataPoint.Marker", owner.UniqueName);
            }
            if (dataPointDef.CustomProperties != null)
            {
                this.m_customPropertyInstances = dataPointDef.CustomProperties.EvaluateExpressions(chart.ObjectType, chart.Name, "DataPoint(" + (dataPointIndex + 1).ToString(CultureInfo.InvariantCulture) + ").", pc);
            }
            pc.ChunkManager.AddInstance(this, owner, pc.InPageSection);
        }
 public ChartTitleInstance(ReportProcessing.ProcessingContext pc, Chart chart, ChartTitle titleDef, string propertyName)
 {
     this.m_uniqueName           = pc.CreateUniqueName();
     this.m_caption              = pc.ReportRuntime.EvaluateChartTitleCaptionExpression(titleDef, chart.Name, propertyName);
     this.m_styleAttributeValues = Chart.CreateStyle(pc, titleDef.StyleClass, chart.Name + "." + propertyName, this.m_uniqueName);
 }