标签:style blog http color os ar 使用 sp 2014
关键代码:
/// <summary> /// 创建Strip /// </summary> /// <param name="chart">ChartControl</param> /// <param name="strip">Strip</param> /// <param name="stripLable">Strip文字</param> /// <param name="stripLengend">Strip对应的Lengend文字</param> /// <param name="stripColor">Strip颜色</param> /// <param name="stripStyle">Strip填充样式</param> public static void CreateStrip(this ChartControl chart, Strip strip, string stripLable, string stripLengend, Color stripColor, FillMode stripStyle) { XYDiagram _diagram = (XYDiagram)chart.Diagram; if (_diagram != null && strip != null) { _diagram.AxisY.Strips.Add(strip); _diagram.AxisY.Strips[0].Visible = true; _diagram.AxisY.Strips[0].ShowAxisLabel = true; _diagram.AxisY.Strips[0].AxisLabelText = stripLable; _diagram.AxisY.Strips[0].ShowInLegend = true; _diagram.AxisY.Strips[0].LegendText = stripLengend; _diagram.AxisY.Strips[0].Color = stripColor; _diagram.AxisY.Strips[0].FillStyle.FillMode = stripStyle; } }使用代码:
chartControl1.CreateStrip(new Strip("利润", 20, 30), "盈利范围", "盈利", Color.LightBlue, FillMode.Empty);
运行效果:
希望有所帮助!谢谢!
[DevExpress]ChartControl之创建Strip示例
标签:style blog http color os ar 使用 sp 2014
原文地址:http://www.cnblogs.com/Yan-Zhiwei/p/4042635.html