internal static bool Is3DChart(SLLineChartType ChartType)
        {
            var result = false;

            switch (ChartType)
            {
            case SLLineChartType.Line3D:
                result = true;
                break;
            }

            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Set a line chart using one of the built-in line chart types.
        /// </summary>
        /// <param name="ChartType">A built-in line chart type.</param>
        /// <param name="Options">Chart customization options.</param>
        public void SetChartType(SLLineChartType ChartType, SLLineChartOptions Options)
        {
            this.Is3D = SLChartTool.Is3DChart(ChartType);

            SLDataSeriesChartType vType;
            int iChartType;
            switch (ChartType)
            {
                case SLLineChartType.Line:
                    vType = SLDataSeriesChartType.LineChartPrimary;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.Standard;
                    this.PlotArea.UsedChartOptions[iChartType].ShowMarker = true;
                    this.PlotArea.UsedChartOptions[iChartType].Smooth = false;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    foreach (SLDataSeries ds in this.PlotArea.DataSeries)
                    {
                        ds.Options.Marker.Symbol = C.MarkerStyleValues.None;
                    }

                    this.PlotArea.HasPrimaryAxes = true;
                    break;
                case SLLineChartType.StackedLine:
                    vType = SLDataSeriesChartType.LineChartPrimary;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.Stacked;
                    this.PlotArea.UsedChartOptions[iChartType].ShowMarker = true;
                    this.PlotArea.UsedChartOptions[iChartType].Smooth = false;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    foreach (SLDataSeries ds in this.PlotArea.DataSeries)
                    {
                        ds.Options.Marker.Symbol = C.MarkerStyleValues.None;
                    }

                    this.PlotArea.HasPrimaryAxes = true;
                    break;
                case SLLineChartType.StackedLineMax:
                    vType = SLDataSeriesChartType.LineChartPrimary;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.PercentStacked;
                    this.PlotArea.UsedChartOptions[iChartType].ShowMarker = true;
                    this.PlotArea.UsedChartOptions[iChartType].Smooth = false;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    foreach (SLDataSeries ds in this.PlotArea.DataSeries)
                    {
                        ds.Options.Marker.Symbol = C.MarkerStyleValues.None;
                    }

                    this.PlotArea.HasPrimaryAxes = true;
                    break;
                case SLLineChartType.LineWithMarkers:
                    vType = SLDataSeriesChartType.LineChartPrimary;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.Standard;
                    this.PlotArea.UsedChartOptions[iChartType].ShowMarker = true;
                    this.PlotArea.UsedChartOptions[iChartType].Smooth = false;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    break;
                case SLLineChartType.StackedLineWithMarkers:
                    vType = SLDataSeriesChartType.LineChartPrimary;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.Stacked;
                    this.PlotArea.UsedChartOptions[iChartType].ShowMarker = true;
                    this.PlotArea.UsedChartOptions[iChartType].Smooth = false;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    break;
                case SLLineChartType.StackedLineWithMarkersMax:
                    vType = SLDataSeriesChartType.LineChartPrimary;
                    this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType);
                    iChartType = (int)vType;
                    this.PlotArea.UsedChartTypes[iChartType] = true;
                    this.PlotArea.UsedChartOptions[iChartType].Grouping = C.GroupingValues.PercentStacked;
                    this.PlotArea.UsedChartOptions[iChartType].ShowMarker = true;
                    this.PlotArea.UsedChartOptions[iChartType].Smooth = false;
                    if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options);
                    this.PlotArea.SetDataSeriesChartType(vType);

                    this.PlotArea.HasPrimaryAxes = true;
                    break;
                case SLLineChartType.Line3D:
                    this.RotateX = 15;
                    this.RotateY = 20;
                    this.RightAngleAxes = false;
                    this.Perspective = 30;

                    vType = SLDataSeriesChartType.Line3DChart;
                    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.HasDepthAxis = true;
                    this.PlotArea.DepthAxis.IsCrosses = true;
                    this.PlotArea.DepthAxis.Crosses = C.CrossesValues.AutoZero;
                    break;
            }
        }
Exemplo n.º 3
0
        internal static bool Is3DChart(SLLineChartType ChartType)
        {
            bool result = false;
            switch (ChartType)
            {
                case SLLineChartType.Line3D:
                    result = true;
                    break;
            }

            return result;
        }
Exemplo n.º 4
0
 /// <summary>
 /// Set a line chart using one of the built-in line chart types.
 /// </summary>
 /// <param name="ChartType">A built-in line chart type.</param>
 public void SetChartType(SLLineChartType ChartType)
 {
     this.SetChartType(ChartType, null);
 }