コード例 #1
0
        internal void Initialize(InitializationContext context, Mode mode)
        {
            if (m_styleClass != null)
            {
                m_styleClass.Initialize(context);
            }
            if (m_title != null)
            {
                m_title.Initialize(context);
            }
            if (m_minorGridLines != null)
            {
                context.ExprHostBuilder.MinorGridLinesStyleStart();
                m_minorGridLines.Initialize(context);
                context.ExprHostBuilder.MinorGridLinesStyleEnd();
            }
            if (m_majorGridLines != null)
            {
                context.ExprHostBuilder.MajorGridLinesStyleStart();
                m_majorGridLines.Initialize(context);
                context.ExprHostBuilder.MajorGridLinesStyleEnd();
            }
            string str = mode.ToString();

            if (m_min != null)
            {
                m_min.Initialize(str + ".Min", context);
                context.ExprHostBuilder.AxisMin(m_min);
            }
            if (m_max != null)
            {
                m_max.Initialize(str + ".Max", context);
                context.ExprHostBuilder.AxisMax(m_max);
            }
            if (m_crossAt != null)
            {
                m_crossAt.Initialize(str + ".CrossAt", context);
                context.ExprHostBuilder.AxisCrossAt(m_crossAt);
            }
            if (m_majorInterval != null)
            {
                m_majorInterval.Initialize(str + ".MajorInterval", context);
                context.ExprHostBuilder.AxisMajorInterval(m_majorInterval);
            }
            if (m_minorInterval != null)
            {
                m_minorInterval.Initialize(str + ".MinorInterval", context);
                context.ExprHostBuilder.AxisMinorInterval(m_minorInterval);
            }
            if (m_customProperties != null)
            {
                m_customProperties.Initialize(str + ".", isCustomProperty: true, context);
            }
        }
コード例 #2
0
 private void CornerInitialize(InitializationContext context)
 {
     if (m_categoryAxis != null)
     {
         context.ExprHostBuilder.ChartCategoryAxisStart();
         m_categoryAxis.Initialize(context, Axis.Mode.CategoryAxis);
         context.ExprHostBuilder.ChartCategoryAxisEnd();
     }
     if (m_valueAxis != null)
     {
         context.ExprHostBuilder.ChartValueAxisStart();
         m_valueAxis.Initialize(context, Axis.Mode.ValueAxis);
         context.ExprHostBuilder.ChartValueAxisEnd();
     }
     if (m_multiChart != null)
     {
         m_multiChart.Initialize(context);
     }
     if (m_legend != null)
     {
         m_legend.Initialize(context);
     }
     if (m_title != null)
     {
         m_title.Initialize(context);
     }
     if (m_3dProperties != null)
     {
         m_3dProperties.Initialize(context);
     }
     if (m_plotArea != null)
     {
         m_plotArea.Initialize(context);
     }
     if (m_categoryAxis == null || !m_categoryAxis.Scalar)
     {
         return;
     }
     Global.Tracer.Assert(m_columns != null);
     if (m_columns.SubHeading != null)
     {
         context.ErrorContext.Register(ProcessingErrorCode.rsMultipleGroupingsOnChartScalarAxis, Severity.Error, context.ObjectType, context.ObjectName, "CategoryAxis");
         return;
     }
     if (StaticColumns != null && StaticColumns.Labels != null)
     {
         context.ErrorContext.Register(ProcessingErrorCode.rsStaticGroupingOnChartScalarAxis, Severity.Error, context.ObjectType, context.ObjectName, "CategoryAxis");
         return;
     }
     if (m_columns.Grouping != null && m_columns.Grouping.GroupExpressions != null && 1 < m_columns.Grouping.GroupExpressions.Count)
     {
         context.ErrorContext.Register(ProcessingErrorCode.rsMultipleGroupExpressionsOnChartScalarAxis, Severity.Error, context.ObjectType, context.ObjectName, "CategoryAxis");
         return;
     }
     Global.Tracer.Assert(m_columns.SubHeading == null);
     Global.Tracer.Assert(StaticColumns == null || StaticColumns.Labels == null);
     m_columns.ChartGroupExpression = true;
     if (m_columns.Labels != null && m_columns.Grouping != null && m_columns.Grouping.GroupExpressions != null && ReportProcessing.CompareWithInvariantCulture(m_columns.Labels[0].Value, m_columns.Grouping.GroupExpressions[0].Value, ignoreCase: true) != 0)
     {
         context.ErrorContext.Register(ProcessingErrorCode.rsLabelExpressionOnChartScalarAxisIsIgnored, Severity.Warning, context.ObjectType, context.ObjectName, "CategoryAxis");
         m_columns.Labels = null;
     }
     if (m_columns.Grouping != null && ChartTypes.Area == m_type)
     {
         Global.Tracer.Assert(m_columns.Grouping.GroupExpressions != null);
         if (m_columns.Sorting == null || m_columns.Sorting.SortExpressions == null || m_columns.Sorting.SortExpressions[0] == null)
         {
             m_columns.Grouping.GroupAndSort   = true;
             m_columns.Grouping.SortDirections = new BoolList(1);
             m_columns.Grouping.SortDirections.Add(true);
         }
         else if (ReportProcessing.CompareWithInvariantCulture(m_columns.Grouping.GroupExpressions[0].Value, m_columns.Sorting.SortExpressions[0].Value, ignoreCase: true) != 0)
         {
             context.ErrorContext.Register(ProcessingErrorCode.rsUnsortedCategoryInAreaChart, Severity.Error, context.ObjectType, context.ObjectName, "CategoryGrouping", m_columns.Grouping.Name);
         }
     }
     else
     {
         if (m_columns.Grouping == null || (ChartTypes.Line != m_type && (m_type != 0 || !m_hasSeriesPlotTypeLine)))
         {
             return;
         }
         Global.Tracer.Assert(m_columns.Grouping.GroupExpressions != null);
         if (!m_columns.Grouping.GroupAndSort)
         {
             bool flag = false;
             if (m_columns.Sorting == null || m_columns.Sorting.SortExpressions == null || m_columns.Sorting.SortExpressions[0] == null)
             {
                 flag = true;
             }
             else if (ReportProcessing.CompareWithInvariantCulture(m_columns.Grouping.GroupExpressions[0].Value, m_columns.Sorting.SortExpressions[0].Value, ignoreCase: true) != 0)
             {
                 flag = true;
             }
             if (flag)
             {
                 context.ErrorContext.Register(ProcessingErrorCode.rsLineChartMightScatter, Severity.Warning, context.ObjectType, context.ObjectName, "CategoryGrouping");
             }
         }
     }
 }