帮你找到了对应 的方法,在DrawDataSeries事件中进行设置
- Color[] colors = new Color[] { Color.Red, Color.Yellow, Color.Green, Color.Purple };
- int i = 0;
- private void c1Chart1_DrawDataSeries(object sender, DrawDataSeriesEventArgs e)
- {
- //var df = e.Pen.Color;
-
- Pen pen = new Pen(colors[i]);
- e.Brush=new LinearGradientBrush(e.Bounds,colors[i], colors[i], LinearGradientMode.Horizontal);
- if (i < 3)
- i++;
- else
- i = 0;
- }
复制代码
|