首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

求VS2010中Chart控件的用法?该怎么处理

2012-09-22 
求VS2010中Chart控件的用法?HTML code asp:Chart IDChart1 runatserverSeriesasp:Series Name

求VS2010中Chart控件的用法?

HTML code
 <asp:Chart ID="Chart1" runat="server">            <Series>                <asp:Series Name="Series1">                </asp:Series>            </Series>                        <ChartAreas>                <asp:ChartArea Name="ChartArea1">                </asp:ChartArea>            </ChartAreas>        </asp:Chart>    </div>


城市3月4月5月
上海500800300
武汉18005001200
北京600300100

在vs2010中,用Chart控件做报表,连接数据库中的数据,如上表中的数据,显示相应的报表,没用过呢,现在有急用,怎么用呢,有谁有例子,提供一下,谢谢了!

[解决办法]
http://jian23523.blog.163.com/blog/static/10896181201133954020/

http://msdn.microsoft.com/zh-cn/library/system.web.ui.datavisualization.charting.chart.aspx
[解决办法]

下载
[解决办法]
前台:
<asp:Chart ID="Chart1" runat="server" BackGradientStyle="TopBottom" 
BackSecondaryColor="LightSteelBlue" BorderlineWidth="0">
<Series>
<asp:Series ChartArea="ChartArea1" CustomProperties="DrawingStyle=Cylinder" 
Legend="Legend1" Name="实际值">
</asp:Series>
<asp:Series CustomProperties="DrawingStyle=Cylinder" Legend="Legend1" 
Name="预测值">
</asp:Series>
</Series>
<ChartAreas>
<asp:ChartArea AlignmentOrientation="Horizontal" BackColor="LightSteelBlue" 
BackGradientStyle="DiagonalRight" Name="ChartArea1">
<Area3DStyle Rotation="0" WallWidth="0" />
</asp:ChartArea>
</ChartAreas>
<Legends>
<asp:Legend Name="Legend1">
</asp:Legend>
</Legends>
</asp:Chart>


后台绑定:
 public void chartbind()
{
Chart1.DataSource = _ComputerSrv.SelectTable("select departments, sum(price)as price,sum(price)+300 as num from parts group by departments having departments='销售部' or departments='财务部'");
Chart1.Series[0].YValueMembers = "num";
Chart1.Series[1].YValueMembers = "price";
Chart1.Series[0].XValueMember = "departments";
Chart1.DataBind();
}

热点排行