数据表student
字段:姓名 年份 科目 成绩
数据:赵一 2005 数学 99
赵一 2005 语文 99
赵一 2006 数学 99
赵一 2006 语文 99
赵一 2007 数学 99
赵一 2007 语文 99
赵一 2008 数学 99
赵一 2008 语文 99
钱二 2005 数学 99
钱二 2005 语文 99
钱二 2006 数学 99
钱二 2006 语文 99
钱二 2007 数学 99
钱二 2007 语文 99
钱二 2008 数学 99
钱二 2008 语文 99
数据大概就是上面这样吧下面这段代码是我写的“赵一和钱二2005年各科成绩对比”
页面: <asp:Chart ID="Chart" runat="server" Width="740px">
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>后台: string strSql = "select * from student where 年份='2005'";
DataSet ds = DBHelper.ExecuteDataSet(strSql);
Chart1.ChartAreas["ChartArea1"].AxisY.Title = "成绩";
Chart1.ChartAreas["ChartArea1"].AxisX.Title = "学科";
Chart1.DataSource = ds;
Chart1.DataBindCrossTable(ds.Tables[0].DefaultView, "姓名", "科目", "成绩", "");
Chart1.Legends.Add("legends");
下面想要用图表显示赵一和钱二2005年-2010年各科成绩对比,这种3维模式的该怎么去实现呢?
字段:姓名 年份 科目 成绩
数据:赵一 2005 数学 99
赵一 2005 语文 99
赵一 2006 数学 99
赵一 2006 语文 99
赵一 2007 数学 99
赵一 2007 语文 99
赵一 2008 数学 99
赵一 2008 语文 99
钱二 2005 数学 99
钱二 2005 语文 99
钱二 2006 数学 99
钱二 2006 语文 99
钱二 2007 数学 99
钱二 2007 语文 99
钱二 2008 数学 99
钱二 2008 语文 99
数据大概就是上面这样吧下面这段代码是我写的“赵一和钱二2005年各科成绩对比”
页面: <asp:Chart ID="Chart" runat="server" Width="740px">
<ChartAreas>
<asp:ChartArea Name="ChartArea1">
</asp:ChartArea>
</ChartAreas>
</asp:Chart>后台: string strSql = "select * from student where 年份='2005'";
DataSet ds = DBHelper.ExecuteDataSet(strSql);
Chart1.ChartAreas["ChartArea1"].AxisY.Title = "成绩";
Chart1.ChartAreas["ChartArea1"].AxisX.Title = "学科";
Chart1.DataSource = ds;
Chart1.DataBindCrossTable(ds.Tables[0].DefaultView, "姓名", "科目", "成绩", "");
Chart1.Legends.Add("legends");
下面想要用图表显示赵一和钱二2005年-2010年各科成绩对比,这种3维模式的该怎么去实现呢?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货