日期:2014-05-17 浏览次数:20449 次
DataTable dt = new DataTable(); dt.Columns.Add("days"); dt.Columns.Add("daysTrafficSum"); dt = owam.getDaysTrafficByUsername(userName, type, startDate, endDate); //调用业务层的方法 //设置图表的数据源 dayChart.DataSource = dt; //设置图表Y轴对应项 dayChart.Series[0].XValueMember = "days"; dayChart.Series[0].YValueMembers = "daysTrafficSum"; dayChart.Series[0].Name = userName+" 前30天 O"+type+"A 下载附件趋势图"; dayChart.ChartAreas["ChartArea1"].AxisX.MajorGrid.Interval = 1; dayChart.ChartAreas["ChartArea1"].AxisX.LabelStyle.Interval = 1; monthChart.DataBind();
------解决方案--------------------