日期:2014-05-17 浏览次数:20968 次
protected void Chart1_PreRender(object sender, EventArgs e)
{
if (Begin == ""
------解决方案--------------------
End == "")
{
End = DateTime.Now.ToString("yyyy-MM-dd");
Begin = DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd");
}
var dic = outcomeManager.GetDateSum(Begin, End);
List<string> date = new List<string>();
List<float> text = new List<float>();
foreach (var v in dic.Values)
{
text.Add(v);
}
foreach (var k in dic.Keys)
{
date.Add(k);
}
Chart1.Width = 600;
Chart1.Height = 350;
Chart1.BackColor = Color.Azure;//设置背景
Series series = new Series("test");
series.ChartType = SeriesChartType.Column;
series.Color = Color.Green;
series.Border