




已阅读5页,还剩1页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
一个功能强大超级好用的图表组件Dundas Chart 先安装该软件,安装后它包括两个非常有用的功能,一个是做的非常类似msdn的帮助文档,相信对.net程序员非常友好,就当是msdn用吧。另外一个是它的sample,这是一个完整的.net解决方案,你可以在IIS里面配置个网站来访问它。接着你就可以开始通过sample来了解和学习Dundas Chart的强大功能了。下面给个我学习中生成的图片。下面是程序部分源码privatevoidPage_Load(objectsender,System.EventArgse)/在此处放置用户代码以初始化页面if(!this.IsPostBack)doubleindustry1=19.32;doubleindustry2=361.38;doubleindustry3=501.51;doubleindustryfull=1020.05;doublefixedasserts=216.13;doubleretailtrade=32.06;doubleforeigntrade=443.34;doubleforeigncapital=3.41;/-生产统计图表-Dundas.Charting.WebControl.ChartChart1=newDundas.Charting.WebControl.Chart();Chart1.BackImage=this.Server.MapPath(cn/images/target/back_img.gif);Chart1.BackGradientEndColor=Color.White;Chart1.BorderLineColor=Color.White;Chart1.BorderLineWidth=0;Chart1.BorderSkin.FrameBackColor=Color.MediumTurquoise;Chart1.BorderSkin.FrameBackGradientEndColor=Color.Teal;Chart1.Palette=ChartColorPalette.SemiTransparent;Chart1.Width=545;Chart1.Height=215;Chart1.ImageType=ChartImageType.Jpeg;Chart1.AntiAliasing=AntiAliasing.All;Chart1.Titles.Add(Default);Chart1.Titles0.Text=2008年12月火星经济指标;Chart1.Titles0.Alignment=ContentAlignment.TopCenter;Chart1.Titles0.Font=newFont(黑体,12,FontStyle.Bold);Chart1.Titles0.Color=Color.FromArgb(72,72,72);饼图(一产,二产,三产)#region饼图(一产,二产,三产)/设置图表区域样式1(一产,二产,三产)Chart1.ChartAreas.Add(Default);ChartAreaChartArea1=Chart1.ChartAreasDefault;ChartArea1.Area3DStyle.Enable3D=true;ChartArea1.Area3DStyle.Light=LightStyle.None;ChartArea1.Area3DStyle.XAngle=70;ChartArea1.Area3DStyle.YAngle=60;ChartArea1.BorderWidth=0;ChartArea1.BackColor=Color.Transparent;ChartArea1.Position.Auto=false;ChartArea1.Position.Width=50;ChartArea1.Position.Height=30;ChartArea1.Position.X=65;ChartArea1.Position.Y=10;/设置图例区域样式1(一产,二产,三产)LegendLegend1=Chart1.LegendsDefault;Legend1.Alignment=StringAlignment.Center;Legend1.BorderWidth=1;Legend1.Font=newFont(幼圆,8,FontStyle.Bold);Legend1.BackColor=Color.Transparent;Legend1.FontColor=Color.Black;Legend1.DockInsideChartArea=true;Legend1.DockToChartArea=Default;/绑定数据1(一产,二产,三产)doubleyValues=industry1,industry2,industry3;stringxValues=一产,二产,三产;Chart1.Series.Add(Series1);SeriesSeries1=Chart1.SeriesSeries1;Series1.Points.DataBindXY(xValues,yValues);Series1.ChartType=Pie;Series1.BorderColor=Color.White;Series1.Palette=ChartColorPalette.EarthTones;Series1LabelStyle=Disabled;Series1.ChartArea=Default;Series1.Legend=Default;#endregion饼图(投资,消费,出口)#region饼图(投资,消费,出口)/设置图表区域样式2(投资,消费,出口)Chart1.ChartAreas.Add(Second);ChartAreaChartArea2=Chart1.ChartAreasSecond;ChartArea2.Area3DStyle.Enable3D=true;ChartArea2.Area3DStyle.Light=LightStyle.None;ChartArea2.Area3DStyle.XAngle=70;ChartArea2.Area3DStyle.YAngle=60;ChartArea2.BorderWidth=0;ChartArea2.BackColor=Color.Transparent;ChartArea2.Position.Auto=false;ChartArea2.Position.Width=50;ChartArea2.Position.Height=30;ChartArea2.Position.X=65;ChartArea2.Position.Y=32;/设置图例区域样式2(投资,消费,出口)LegendLegend2=newLegend(Second);Chart1.Legends.Add(Legend2);Legend2.Alignment=StringAlignment.Center;Legend2.BorderWidth=1;Legend2.BackColor=Color.Transparent;Legend2.Font=newFont(幼圆,8,FontStyle.Bold);Legend2.FontColor=Color.Black;Legend2.DockInsideChartArea=true;Legend2.DockToChartArea=Second;/绑定数据2(投资,消费,出口)doubleyValues2=fixedasserts,retailtrade,foreigntrade;stringxValues2=投资,消费,出口;Chart1.Series.Add(Series2);SeriesSeries2=Chart1.SeriesSeries2;Series2.Points.DataBindXY(xValues2,yValues2);Series2.ChartType=Pie;Series2.BorderColor=Color.White;Series2.Palette=ChartColorPalette.Pastel;Series2LabelStyle=Disabled;Series2.ChartArea=Second;Series2.Legend=Second;#endregion柱状图#region柱状图doubleyTitle3=industry1,industry2,industryfull,0,industry3,fixedasserts,retailtrade,foreigntrade,foreigncapital;doublex=MaxValue(yTitle3)/10;/设置图表区域样式3Chart1.ChartAreas.Add(3nd);ChartAreaChartArea3=Chart1.ChartAreas3nd;ChartArea3.Area3DStyle.Enable3D=false;ChartArea3.Area3DStyle.Light=LightStyle.Realistic;ChartArea3.AxisX.LineColor=Color.FromArgb(64,64,64);ChartArea3.AxisX.LabelStyle.Font=newFont(幼圆,8,FontStyle.Bold);ChartArea3.AxisX.LabelStyle.FontColor=Color.Black;ChartArea3.AxisX.LabelStyle.OffsetLabels=false;ChartArea3.AxisX.LabelsAutoFit=false;ChartArea3.AxisX.MajorGrid.Enabled=false;ChartArea3.AxisX.MajorTickMark.Enabled=true;ChartArea3.AxisX.MajorTickMark.LineColor=Color.Transparent;ChartArea3.AxisX.MajorTickMark.Interval=4;ChartArea3.AxisY.CustomLabels.Add(0,MaxValue(yTitle3)*2.3,亿元);ChartArea3.AxisY.LabelStyle.Enabled=true;ChartArea3.AxisY.LabelStyle.FontAngle=0;ChartArea3.AxisY.LabelStyle.Font=newFont(幼圆,10,FontStyle.Bold);ChartArea3.AxisY.MajorGrid.Enabled=false;ChartArea3.AxisY.MajorTickMark.Enabled=false;ChartArea3.BorderWidth=0;ChartArea3.BackColor=Color.Transparent;ChartArea3.Position.Auto=false;ChartArea3.Position.Width=80;ChartArea3.Position.Height=67;ChartArea3.Position.X=5;ChartArea3.Position.Y=28;/设置图例区域样式3LegendLegend3=newLegend(3nd);Chart1.Legends.Add(Legend3);Legend3.Enabled=false;Legend3.DockToChartArea=3nd;/绑定数据3doubleyValues3=industry1+x,industry2+x,industryfull+x,0,industry3+x,fixedasserts+x,retailtrade+x,foreigntrade+x,foreigncapital+x;stringxValues3=第一产业,第二产业,工业总产值,第三产业,固定资产投资,消费零售总额,外贸出口,实际利用外资;Chart1.Series.Add(Series3);SeriesSeries3=Chart1.SeriesSeries3;Series3.Points.DataBindXY(xValues3,yValues3);Series3.ChartType=Column;Series3.BorderColor=Color.White;Series3.BackGradientType=GradientType.VerticalCenter;Series3.BackGradientEndColor=Color.Khaki;Series3.Color=Color.FromArgb(255,128,0);Series3PointWidth=0.7;Series3.ChartArea=3nd;Series3.Lege
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 宴会部维修管理制度
- 家电维修队管理制度
- 应急医疗包管理制度
- 当当网公司管理制度
- 影视剧公司管理制度
- 心电图规培管理制度
- 快递站各项管理制度
- 怎样对租户管理制度
- 患者安全与管理制度
- 成品库班长管理制度
- 《积极心理学(第3版)》 课件 第4章 乐观
- 户外广告牌施工方案
- 房屋买卖合同范本官方版模板电子版
- 传统文化与生态文明建设智慧树知到期末考试答案章节答案2024年云南大学
- YYT 0698.5-2009 最终灭菌医疗器械包装材料 第5部分:透气材料与塑料膜组成的可密封组合袋和卷材 要求和试验方法
- 广东省佛山市南海区2021-2022学年八年级下学期期末数学试题
- JT-T-1302.1-2019机动车驾驶员计时培训系统第1部分:计时终端技术要求
- 糖尿病家庭医生:签约讲座计划
- 呼吸衰竭诊疗规范
- MOOC 化工热力学-盐城师范学院 中国大学慕课答案
- (高清版)DZT 0064.88-2021 地下水质分析方法第88部分:14C的测定合成苯-液体闪烁计数法
评论
0/150
提交评论