web页上绘制饼图曲线图等组件(c#)



web页上绘制饼图曲线图等组件(c#) 例子: 生成饼图表******************************************** private void InitializeComponent() { this.myBarGraph.RenderGraph += new ZedGraph.Web.ZedGraphWebControlEventHandler(this.OnRenderGraphBar); this.myLineGraph.RenderGraph += new ZedGraph.Web.ZedGraphWebControlEventHandler(this.OnRenderGraphLine); } private void OnRenderGraphBar(ZedGraphWeb zgw, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane) { myBarMethod(zgw, g, masterPane, strYear, strMonth, compareType); } private void OnRenderGraphLine(ZedGraphWeb zgw, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane) { myLineMethod(zgw, g, masterPane, douYear, douMonth); } private void myBarMethod(ZedGraphWeb zgw, System.Drawing.Graphics g, ZedGraph.MasterPane masterPane, string[] strYear, string[] strMonth, string compareType) { GraphPane myPane = masterPane[0]; myPane.Title.Text = title + "柱状图分析"; myPane.XAxis.Title.Text = "时间(月/年)"; if (compareType == "AddValue") { myPane.YAxis.Title.Text = "增加值"; } else { myPane.YAxis.Title.Text = "增加比例(%)"; } List<PointPairList> ListPointParitList = new List<PointPairList>(); for (int i = 0; i < strYear.Length; i++) { ListPointParitList.Add(new PointPairList()); } int n = 0; for (double x = 0; x < strMonth.Length; x += 1.0) { for (int i = 0; i < strYear.Length; i++) { //ListPointParitList[i].Add(x, randNum[n++] * multiplyValue); ListPointParitList[i].Add(x, GetFXData(strYear[i], strMonth[(int)x])); } } List<BarItem> ListBarItem = new List<BarItem>(); List<Color> ListColor = GetColor(); for (int i = 0; i < strYear.Length; i++) { ListBarItem.Add(new BarItem(strYear[i], ListPointParitList[i], ListColor[i])); ListBarItem[i] = myPane.AddBar(strYear[i], ListPointParitList[i], ListColor[i]); } myPane.XAxis.MajorTic.IsBetweenLabels = true; myPane.XAxis.Scale.TextLabels = strMonth; myPane.XAxis.Type = AxisType.Text; myPane.Fill = new Fill(Color.White, Color.FromArgb(200, 200, 255), 45.0f); myPane.Chart.Fill = new Fill(Color.White, Color.LightGoldenrodYellow, 45.0f); masterPane.AxisChange(g); }















- 1

- 粉丝: 1
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- PLC皮带运输监控系统设计方案.doc
- 网络传播视阈下的地区形象改善策略研究.docx
- 初学者必看!PLC与常见设备连接方式.doc
- plc原理设计的自动售货机.doc
- 汽车零部件行业MRP信息化平台技术.ppt
- 基于PLC实现的彩灯广告牌方案设计书.doc
- 区块链基础:非技术性25步指南
- 北京市通信公司综合业务楼工程大体积砼施工组织设计方案.doc
- 大数据时代互联网广告的营销模式分析.docx
- 浙江省传统村落调研资料数据库的建立与应用研究.docx
- 【精品ppt】互联网+电子商务创新创业融资竞赛-(1).pptx
- 基于PLC交通灯控制系统大学本科方案设计书[1]177.doc
- 通信部队信息化建设存在的问题及解决措施.docx
- 大数据背景下企业人力资源绩效管理创新探讨.docx
- 适用于预测性维护与健康管理的故障诊断及剩余使用寿命预测大型语言模型
- 软件工程期末考试题3.doc



- 1
- 2
- 3
前往页