饼图自定义颜色的方法如下:
- FarPoint.Win.Spread.Chart.SpreadChart chart = fpSpread1.Sheets[0].Charts[0];
- PieSeries ps = (chart.Model.PlotAreas[0].Series[0] as FarPoint.Win.Chart.PieSeries);
- for (int i = 0; i < ps.PieFills.Count; i++)
- {
- ps.PieFills[i] = new FarPoint.Win.Chart.SolidFill(Color.FromArgb(0, (i + 1) * 10, i * 10));
- }
复制代码
关于添加 LineSeries 在Spread for WinForms帮助文档中的【Developer's Guide】【Working with the Chart Control 】【Creating Charts 】【Creating Plot Types 】【Creating a Pie Plot 】章节有详细的说明和代码,请参考。 |