- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
饼状图(Pie chart)
饼状图(Pie chart)
Use ASP.net/C# to draw bar charts, pie charts, curves of the source code, 2008-08-14, 21:20Chart.aspx.cs code:
Using System;
Using System.Collections;
Using System.ComponentModel;
Using System.Data;
Using System.Web;
Using System.Web.SessionState;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using System.Web.UI.HtmlControls;
Using System.Drawing;
Using System.Drawing.Imaging;
Namespace aspCharts
{
X
The Chart / / / note.
X
Public class Chart: System.Web.UI.Page
{
Private, void, Page_Load (object, sender, System.EventArgs, e)
{
Graphics objGraphics; / / a drawing object
Bitmap objBitMap = new Bitmap (600300); / / set bitmap object
ObjGraphics = Graphics.FromImage (objBitMap); / / set up drawing objects according to the bitmap object
ObjGraphics.Clear (Color.White); / / set the background color palette object
Int[] arrValues={0,0,0,0,0,0}; / / array data
ArrValues[0]=50;
ArrValues[1]=70;
ArrValues[2]=90;
ArrValues[3]=100;
ArrValues[4]=140;
ArrValues[5]=220;
String[] arrValueNames={0, 0, 0, 0, 0, 0}; / / month
ArrValueNames[0] = month;
ArrValueNames[1]= February;
ArrValueNames[2] = March;
ArrValueNames[3]= April;
ArrValueNames[4]= May;
ArrValueNames[5]= June;
ObjGraphics.DrawString (sales statistics for the first half of the year), new, Font (Song typeface, 16), Brushes.Black, new, PointF (0,0);
/ / create legend text
PointF symbolLeg = new PointF (335,20);
PointF descLeg = new PointF (360,16);
/ / draw legend. Draw a legend using three methods of objGraphics graphical objects:
The //FillRectangle () method draws the filled rectangle, and the DrawRectangle () method draws the border of the rectangle,
The //DrawString () method draws the caption. These three graphical objects are overloaded in the.NET framework class library class library,
/ / can easily according to different parameters to draw graphics.
For (int i=0; I
{
ObjGraphics.FillRectangle (new, SolidBrush (GetColor (I)), symbolLeg.X, symbolLeg.Y, 20,10);
ObjGraphics.DrawRectangle (Pens.
您可能关注的文档
- 云南院校考研报考录取比率(Yunnan colleges, postgraduate entrance examination, enrollment rate).doc
- 云南铜业高速专用轨道新型铜材的自主研发(Independent research and development of new copper material for high speed special track of Yunnan copper industry).doc
- 云浮市快速代评助理(中级)高级工程师职称评定评审及申报(Yunfu fast acting assistant (intermediate) senior engineer title evaluation, evaluation and declaration).doc
- 云的类型(Cloud type).doc
- 云计算服务应用案例介绍和分析(Cloud computing service application case introduction and analysis).doc
- 云桂铁路培训--检测技术2(Guangxi Railway Training - Detection Technology 2).doc
- 互感器知识试题汇总(Knowledge summary of transformer).doc
- 五、项目成本管理(Five 、 project cost management).doc
- 五双教材(Five pairs of teaching materials).doc
- 五子棋快速入门(Backgammon quick start).doc
- 马克思完整(Marx complete).doc
- 马岛战争(The Falklands War).doc
- 马尼拉公约修正(Amendment to the Manila Convention).doc
- 马里亚纳群岛(Mariana Islands).doc
- 驴友安全(Alice safety).doc
- 马里奥(Mario).doc
- 驾照考试秘籍(Driver's license test cheats).doc
- 驾考流程及知识要点(Test process and knowledge points).doc
- 驾驶台(Bridge).doc
- 首脑外交视角下的中美关系(Sino US relations from the perspective of summit diplomacy).doc
文档评论(0)