62,046
社区成员
发帖
与我相关
我的任务
分享
for (int i = 0; i < depts.Count; i++)
{
float settle = Settlement.GetAmount(depts[i].DeptID.Value, time);
if (settle == 0)
continue;
float val = WebAssistant.MathAssitant.Round(settle, 2);
ColumnChart colChart = new ColumnChart();
colChart.MaxColumnWidth = 25;
colChart.Fill.Color = Color.FromName(WebAssistant.ColorAssistant.GetColor(index));
colChart.DataLabels.Visible = true;
ChartPoint cPoint = new ChartPoint(string.Empty, val);
colChart.Data.Add(cPoint);
colChart.Legend = depts[i].DeptName;
colChart.Shadow.Visible = true;
chart.Charts.Add(colChart);
index++;
}