internal static bool Is3DChart(SLAreaChartType ChartType)
        {
            bool result = false;
            switch (ChartType)
            {
                case SLAreaChartType.Area3D:
                case SLAreaChartType.StackedArea3D:
                case SLAreaChartType.StackedAreaMax3D:
                    result = true;
                    break;
            }

            return result;
        }
        internal static bool Is3DChart(SLAreaChartType ChartType)
        {
            var result = false;

            switch (ChartType)
            {
            case SLAreaChartType.Area3D:
            case SLAreaChartType.StackedArea3D:
            case SLAreaChartType.StackedAreaMax3D:
                result = true;
                break;
            }

            return(result);
        }
Exemple #3
0
        /// <summary>
        /// Set an area chart using one of the built-in area chart types.
        /// </summary>
        /// <param name="ChartType">A built-in area chart type.</param>
        /// <param name="Options">Chart customization options.</param>
        public void SetChartType(SLAreaChartType ChartType, SLAreaChartOptions Options)
        {
            this.Is3D = SLChartTool.Is3DChart(ChartType);

            SLDataSeriesChartType vType;
            int iChartType;
            switch (ChartType)
            {
                case SLAreaChartType.Area:
                    vType = SLDataSeriesChartType.AreaChartPrimary;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.Standard;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    this.PlotArea.PrimaryValueAxis.CrossBetween = C.CrossBetweenValues.MidpointCategory;
                    break;
                case SLAreaChartType.StackedArea:
                    vType = SLDataSeriesChartType.AreaChartPrimary;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.Stacked;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    this.PlotArea.PrimaryValueAxis.CrossBetween = C.CrossBetweenValues.MidpointCategory;
                    break;
                case SLAreaChartType.StackedAreaMax:
                    vType = SLDataSeriesChartType.AreaChartPrimary;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.PercentStacked;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    this.PlotArea.PrimaryValueAxis.CrossBetween = C.CrossBetweenValues.MidpointCategory;
                    this.PlotArea.PrimaryValueAxis.FormatCode = "0%";
                    break;
                case SLAreaChartType.Area3D:
                    this.RotateX = 15;
                    this.RotateY = 20;
                    this.RightAngleAxes = false;
                    this.Perspective = 30;

                    vType = SLDataSeriesChartType.Area3DChart;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.Standard;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    this.PlotArea.PrimaryValueAxis.CrossBetween = C.CrossBetweenValues.MidpointCategory;
                    this.PlotArea.HasDepthAxis = true;
                    this.PlotArea.DepthAxis.IsCrosses = true;
                    this.PlotArea.DepthAxis.Crosses = C.CrossesValues.AutoZero;
                    break;
                case SLAreaChartType.StackedArea3D:
                    this.RotateX = 15;
                    this.RotateY = 20;
                    this.RightAngleAxes = false;
                    this.Perspective = 30;

                    vType = SLDataSeriesChartType.Area3DChart;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.Stacked;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    this.PlotArea.PrimaryValueAxis.CrossBetween = C.CrossBetweenValues.MidpointCategory;
                    break;
                case SLAreaChartType.StackedAreaMax3D:
                    this.RotateX = 15;
                    this.RotateY = 20;
                    this.RightAngleAxes = false;
                    this.Perspective = 30;

                    vType = SLDataSeriesChartType.Area3DChart;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.PercentStacked;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    this.PlotArea.PrimaryValueAxis.CrossBetween = C.CrossBetweenValues.MidpointCategory;
                    this.PlotArea.PrimaryValueAxis.FormatCode = "0%";
                    break;
            }
        }
Exemple #4
0
 /// <summary>
 /// Set an area chart using one of the built-in area chart types.
 /// </summary>
 /// <param name="ChartType">A built-in area chart type.</param>
 public void SetChartType(SLAreaChartType ChartType)
 {
     this.SetChartType(ChartType, null);
 }