internal static string FromLineStyle(eLineStyle value) { string text = value.ToString(); switch (value) { case eLineStyle.Dash: case eLineStyle.Dot: case eLineStyle.DashDot: case eLineStyle.Solid: return(text.Substring(0, 1).ToLower(CultureInfo.InvariantCulture) + text.Substring(1, text.Length - 1)); //First to Lower case. case eLineStyle.LongDash: case eLineStyle.LongDashDot: case eLineStyle.LongDashDotDot: return("lg" + text.Substring(4, text.Length - 4)); case eLineStyle.SystemDash: case eLineStyle.SystemDashDot: case eLineStyle.SystemDashDotDot: case eLineStyle.SystemDot: return("sys" + text.Substring(6, text.Length - 6)); default: throw (new Exception("Invalid Linestyle")); } }
private string TranslateLineStyleText(eLineStyle value) { string text = value.ToString(); switch (value) { case eLineStyle.Dash: case eLineStyle.Dot: case eLineStyle.DashDot: case eLineStyle.Solid: return(text.Substring(0, 1).ToLower() + text.Substring(1, text.Length - 1)); //First to Lower case. case eLineStyle.LongDash: case eLineStyle.LongDashDot: case eLineStyle.LongDashDotDot: return("lg" + text.Substring(4, text.Length - 4)); case eLineStyle.SystemDash: case eLineStyle.SystemDashDot: case eLineStyle.SystemDashDotDot: case eLineStyle.SystemDot: return("sys" + text.Substring(6, text.Length - 6)); default: throw(new Exception("Invalid Linestyle")); } }
public static void SetSeriesLineColor(this ExcelChart chart, int serieIdx, string color, double lineWidth = 2.25, eLineStyle lineStyle = eLineStyle.Solid) { ExcelLineChartSerie serie = (ExcelLineChartSerie)chart.Series[serieIdx]; serie.LineColor = ColorTranslator.FromHtml(color); serie.LineWidth = lineWidth; serie.Border.LineStyle = lineStyle; }
private string TranslateLineStyleText(eLineStyle value) { string text=value.ToString(); switch (value) { case eLineStyle.Dash: case eLineStyle.Dot: case eLineStyle.DashDot: case eLineStyle.Solid: return text.Substring(0,1).ToLower() + text.Substring(1,text.Length-1); //First to Lower case. case eLineStyle.LongDash: case eLineStyle.LongDashDot: case eLineStyle.LongDashDotDot: return "lg" + text.Substring(4, text.Length - 4); case eLineStyle.SystemDash: case eLineStyle.SystemDashDot: case eLineStyle.SystemDashDotDot: case eLineStyle.SystemDot: return "sys" + text.Substring(6, text.Length - 6); default: throw(new Exception("Invalid Linestyle")); } }
public LineStyleDescriptor(eLineStyle style, string desc) { LineStyle = style; Descriptor = desc; }