日期:2014-05-18 浏览次数:20464 次
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++; }