ComponentOne Studio Enterprise ———C1控件barchat 的统计图格式 设置
2017-06-21 17:06
459 查看
柱状图
1 this.C1BarChart1.Axis.X.Text = "月份"; 2 //柱状图y轴名称 3 this.C1BarChart1.Axis.Y.Text = "总产量(单位/榀)"; 4 //柱状图名称 5 this.C1BarChart1.Header.Text = a.ToString()+"年生产计划统计"; 6 //柱状图图例名称 7 this.C1BarChart1.Legend.Text = "分区:"; 8 //设置柱状图是否显示节点属性值 9 this.C1BarChart1.ShowChartLabels = true; 10 //设置柱状图加载时长 11 this.C1BarChart1.Animation.Duration = 1500; 12 //设置柱状图的柱体是否水平显示 13 this.C1BarChart1.Horizontal = false; 14 15 //设置柱状图x轴属性值 16 var valuesX = new List<String>() { "一月", "二月", "三月", "四月", "五月" ,"六月","七月","八月","九月","十月","十一月","十二月"}; 17 //设置柱体对应值 18 // var valuesEast = new List<Double?>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 19 var valuesWest = new List<Double?>() { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; 20 var valuesEast1 = new List<Double?>(){0,0,0,0,0,0,0,0,0,0,0,0}; 21 22 //创建一个柱体 23 var series = new BarChartSeries(); 24 25 //在柱状图上添加柱体 26 this.C1BarChart1.SeriesList.Add(series); 27 //将柱体与柱状图x轴属性对应 28 series.Data.X.AddRange(valuesX.ToArray<String>()); 29 //将柱体与柱状图y轴属性对应 30 series.Data.Y.AddRange(valuesEast1.ToArray<double?>()); 31 //设置柱体属性名 32 series.Label = "计划总量"; 33 //不懂有什么作用 34 series.LegendEntry = true; 35 //定义一个系列的柱体颜色 36 ChartStyle cs = new ChartStyle(); 37 cs.Fill.Color = Color.FromName("#368ee0"); 38 //cs.Fill.ColorBegin = Color.FromName("#000000"); 39 //cs.Fill.ColorEnd = Color.FromName("#aa5588"); 40 this.C1BarChart1.SeriesStyles.Add(cs); 41 42 //定义柱体悬停的颜色 43 ChartStyle cs1 = new ChartStyle(); 44 cs1.Fill.Color = Color.FromName("#1A66D1"); 45 this.C1BarChart1.SeriesHoverStyles.Add(cs1);
相关文章推荐
- ComponentOne Studio Enterprise 2007 产品集合
- ComponentOne Studio Enterprise 2012 v3新特性-视频介绍
- ComponentOne Studio® Enterprise 产品介绍 FTP下载 技术交流
- ComponentOne Studio Enterprise 2007 破解版下载(转) 电炉下载
- 用户界面控件套包ComponentOne Studio Enterprise 2015 v3全新发布
- 企业级的开发组件03 - Component One Studio Enterprise 2011 v3
- ComponentOne FlexGrid for WinForms 中文版快速入门(4)--设置单元格格式
- ComponentOne Studio Enterprise 2008 v2
- ComponentOne Studio for Enterprise 2015 v1 全新发布
- ComponentOne Studio Enterprise 2012 v3新特性-视频介绍
- ComponentOne Studio Enterprise 2010 v1
- Android Studio设置编码格式
- 推荐一个很不错的EvCombo Activex界面增强套包:ComponentOne Studio +TeeChart
- ComponentOne Studio.NET试用
- Android Studio设置字体 编码格式
- ComponentOne Studio for Mobile 2008 v2
- ComponentOne Studio for Silverlight 2008 v2
- 两个精彩的.Net控件ComponentOne Studio和Dundas Chart For Windows Forms
- ComponentoneOne.Studio.for WinForm.2008.v1.0.for DotNet.v2.0注册机
- ComponentOne Studio for WPF 2008 v2