internal static bool Is3DChart(SLSurfaceChartType ChartType)
 {
     // all surface charts are 3D
     // However, the contour charts don't show the side and back walls, only the floor.
     // You know, because it's in orthogonal view.
     return(true);
 }
 internal static bool Is3DChart(SLSurfaceChartType ChartType)
 {
     // all surface charts are 3D
     // However, the contour charts don't show the side and back walls, only the floor.
     // You know, because it's in orthogonal view.
     return true;
 }
Exemple #3
0
        /// <summary>
        /// Set a surface chart using one of the built-in surface chart types.
        /// </summary>
        /// <param name="ChartType">A built-in surface chart type.</param>
        public void SetChartType(SLSurfaceChartType ChartType)
        {
            this.Is3D = SLChartTool.Is3DChart(ChartType);

            SLDataSeriesChartType vType;
            int iChartType;
            switch (ChartType)
            {
                case SLSurfaceChartType.Surface3D:
                    this.RotateX = 15;
                    this.RotateY = 20;
                    this.RightAngleAxes = false;
                    this.Perspective = 30;

                    vType = SLDataSeriesChartType.Surface3DChart;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.SetDataSeriesChartType(vType);

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

                    vType = SLDataSeriesChartType.Surface3DChart;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Wireframe = true;
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    this.PlotArea.PrimaryValueAxis.CrossBetween = C.CrossBetweenValues.MidpointCategory;
                    this.PlotArea.PrimaryValueAxis.TickLabelPosition = C.TickLabelPositionValues.None;
                    this.PlotArea.HasDepthAxis = true;
                    this.PlotArea.DepthAxis.IsCrosses = true;
                    this.PlotArea.DepthAxis.Crosses = C.CrossesValues.AutoZero;
                    break;
                case SLSurfaceChartType.Contour:
                    this.RotateX = 90;
                    this.RotateY = 0;
                    this.RightAngleAxes = false;
                    this.Perspective = 0;

                    vType = SLDataSeriesChartType.SurfaceChart;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    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 SLSurfaceChartType.WireframeContour:
                    this.RotateX = 90;
                    this.RotateY = 0;
                    this.RightAngleAxes = false;
                    this.Perspective = 0;

                    vType = SLDataSeriesChartType.Surface3DChart;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Wireframe = true;
                    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;
            }
        }