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

            if (axisDef.Title != null)
            {
                m_title = new ChartTitleInstance(pc, chart, axisDef.Title, text);
            }
            m_styleAttributeValues = Chart.CreateStyle(pc, axisDef.StyleClass, chart.Name + "." + text, m_uniqueName);
            if (axisDef.MajorGridLines != null)
            {
                m_majorGridLinesStyleAttributeValues = Chart.CreateStyle(pc, axisDef.MajorGridLines.StyleClass, chart.Name + "." + text + ".MajorGridLines", m_uniqueName);
            }
            if (axisDef.MinorGridLines != null)
            {
                m_minorGridLinesStyleAttributeValues = Chart.CreateStyle(pc, axisDef.MinorGridLines.StyleClass, chart.Name + "." + text + ".MinorGridLines", m_uniqueName);
            }
            if (axisDef.Min != null && ExpressionInfo.Types.Constant != axisDef.Min.Type)
            {
                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)
            {
                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)
            {
                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)
            {
                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)
            {
                m_minorIntervalValue = pc.ReportRuntime.EvaluateChartAxisValueExpression(axisDef.ExprHost, axisDef.MinorInterval, chart.Name, text + ".MinorInterval", Axis.ExpressionType.MinorInterval);
            }
            if (axisDef.CustomProperties != null)
            {
                m_customPropertyInstances = axisDef.CustomProperties.EvaluateExpressions(chart.ObjectType, chart.Name, text + ".", pc);
            }
        }
Example #3
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);
        }
Example #4
0
 internal ChartTitleInstance(ReportProcessing.ProcessingContext pc, Chart chart, ChartTitle titleDef, string propertyName)
 {
     m_uniqueName           = pc.CreateUniqueName();
     m_caption              = pc.ReportRuntime.EvaluateChartTitleCaptionExpression(titleDef, chart.Name, propertyName);
     m_styleAttributeValues = Chart.CreateStyle(pc, titleDef.StyleClass, chart.Name + "." + propertyName, m_uniqueName);
 }