public void AddChartStyleToChart() { int maxChartStyle = 48; if (this.ChartStyle == null || this.ChartStyle <= 0 || this.ChartStyle > maxChartStyle) { this.ChartStyle = 1; } SLChartStyle style = (SLChartStyle)Enum.Parse(typeof(SLChartStyle), "Style" + this.ChartStyle.ToString()); }
/// <summary> /// Set the chart style using one of the built-in styles. WARNING: This is supposedly phased out in Excel 2013. Maybe it'll be replaced by something else, maybe not at all. /// </summary> /// <param name="ChartStyle">A built-in chart style.</param> public void SetChartStyle(SLChartStyle ChartStyle) { this.ChartStyle = ChartStyle; }