internal static bool Is3DChart(SLPieChartType ChartType) { // while there are 3D pie versions, there are no floors, sidewalls, backwalls. return(false); }
/// <summary> /// Set a pie chart using one of the built-in pie chart types. /// </summary> /// <param name="ChartType">A built-in pie chart type.</param> /// <param name="Options">Chart customization options.</param> public void SetChartType(SLPieChartType ChartType, SLPieChartOptions Options) { this.Is3D = SLChartTool.Is3DChart(ChartType); SLDataSeriesChartType vType; int iChartType; switch (ChartType) { case SLPieChartType.Pie: vType = SLDataSeriesChartType.PieChart; this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType); iChartType = (int)vType; this.PlotArea.UsedChartTypes[iChartType] = true; this.PlotArea.UsedChartOptions[iChartType].VaryColors = true; this.PlotArea.UsedChartOptions[iChartType].FirstSliceAngle = 0; if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options); this.PlotArea.SetDataSeriesChartType(vType); break; case SLPieChartType.Pie3D: this.RotateX = 30; if (Options != null) { this.RotateY = Options.FirstSliceAngle; } else { this.RotateY = 0; } this.RightAngleAxes = false; this.Perspective = 30; vType = SLDataSeriesChartType.Pie3DChart; this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType); iChartType = (int)vType; this.PlotArea.UsedChartTypes[iChartType] = true; this.PlotArea.UsedChartOptions[iChartType].VaryColors = true; if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options); this.PlotArea.SetDataSeriesChartType(vType); break; case SLPieChartType.PieOfPie: vType = SLDataSeriesChartType.OfPieChartPie; this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType); iChartType = (int)vType; this.PlotArea.UsedChartTypes[iChartType] = true; this.PlotArea.UsedChartOptions[iChartType].VaryColors = true; this.PlotArea.UsedChartOptions[iChartType].GapWidth = 100; this.PlotArea.UsedChartOptions[iChartType].SecondPieSize = 75; if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options); this.PlotArea.SetDataSeriesChartType(vType); break; case SLPieChartType.ExplodedPie: vType = SLDataSeriesChartType.PieChart; this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType); iChartType = (int)vType; this.PlotArea.UsedChartTypes[iChartType] = true; this.PlotArea.UsedChartOptions[iChartType].VaryColors = true; this.PlotArea.UsedChartOptions[iChartType].FirstSliceAngle = 0; if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options); this.PlotArea.SetDataSeriesChartType(vType); foreach (SLDataSeries ds in this.PlotArea.DataSeries) { ds.Options.Explosion = 25; } break; case SLPieChartType.ExplodedPie3D: this.RotateX = 30; if (Options != null) { this.RotateY = Options.FirstSliceAngle; } else { this.RotateY = 0; } this.RightAngleAxes = false; this.Perspective = 30; vType = SLDataSeriesChartType.Pie3DChart; this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType); iChartType = (int)vType; this.PlotArea.UsedChartTypes[iChartType] = true; this.PlotArea.UsedChartOptions[iChartType].VaryColors = true; if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options); this.PlotArea.SetDataSeriesChartType(vType); foreach (SLDataSeries ds in this.PlotArea.DataSeries) { ds.Options.Explosion = 25; } break; case SLPieChartType.BarOfPie: vType = SLDataSeriesChartType.OfPieChartBar; this.IsCombinable = SLChartTool.IsCombinationChartFriendly(vType); iChartType = (int)vType; this.PlotArea.UsedChartTypes[iChartType] = true; this.PlotArea.UsedChartOptions[iChartType].VaryColors = true; this.PlotArea.UsedChartOptions[iChartType].GapWidth = 100; this.PlotArea.UsedChartOptions[iChartType].SecondPieSize = 75; if (Options != null) this.PlotArea.UsedChartOptions[iChartType].MergeOptions(Options); this.PlotArea.SetDataSeriesChartType(vType); break; } }
internal static bool Is3DChart(SLPieChartType ChartType) { // while there are 3D pie versions, there are no floors, sidewalls, backwalls. return false; }
/// <summary> /// Set a pie chart using one of the built-in pie chart types. /// </summary> /// <param name="ChartType">A built-in pie chart type.</param> public void SetChartType(SLPieChartType ChartType) { this.SetChartType(ChartType, null); }