chartControl ViewType.Bar 用法测试
使用方法 一、

Datatable :

chartControl1.Series.Clear();
DataTable dt = new DataTable();
dt.Columns.Add("X轴",Type.GetType("System.String"));
dt.Columns.Add("线①", Type.GetType("System.Int32"));
dt.Columns.Add("线②", Type.GetType("System.Int32"));
dt.Columns.Add("线③", Type.GetType("System.Int32"));
dt.Columns.Add("线④", Type.GetType("System.Int32")); for (int i = ; i < ;i++ )
{
Random rd = new Random ();
DataRow dr = dt.NewRow();
dr["X轴"] = ("类别"+i.ToString()) ;
dr["线①"] = rd.Next(i*,(i+)*); ;
dr["线②"] = rd.Next(i * , (i + ) * );
dr["线③"] = rd.Next(i * , (i + ) * );
dr["线④"] = rd.Next(i * , (i + ) * );
dt.Rows.Add(dr);
} for (int i = ; i < dt.Columns.Count;i++ )
{
// 柱状图里的第二柱
//第一个参数 设置四个竖条的标注
Series Series2 = new Series(dt.Columns[i].ColumnName, ViewType.Bar);
Series2.DataSource = dt;
Series2.ArgumentScaleType = ScaleType.Qualitative; Series2.ArgumentDataMember = "X轴"; //设置公共的X轴值(刻度)
Series2.ValueScaleType = ScaleType.Numerical;
//设置 单个Series2 Y轴的(值)
Series2.ValueDataMembers.AddRange(new string[] { dt.Columns[i].ColumnName });
chartControl1.Series.Add(Series2);
}
使用方法二、

代码如下:
Series series1 = new Series("测试", ViewType.Bar);
series1.Points.Add(new SeriesPoint("A", ));
series1.Points.Add(new SeriesPoint("B", ));
series1.Points.Add(new SeriesPoint("C", ));
series1.Points.Add(new SeriesPoint("D", ));
this.chartControl1.Series.Add(series1);
chartControl ViewType.Bar 用法测试的更多相关文章
- ChartControl ViewType.Pie3D 用法测试
效果图一. public partial class Form3 : Form { public Form3() { InitializeComponent(); } private void For ...
- DevExpress中ChartControl柱状图(Bar)用法
我的数据 代码如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 chartControl1.Series.Clear(); ...
- php set_time_limit()用法测试详解
在php中set_time_limit函数是用来限制页面执行时间的,如我想把一个php页面的执行时间定义为5秒就可以set_time_limit(5)了. 一个php脚本通过crontab每5分钟 ...
- DevExpress ChartControl ViewType.Line
源码地址:https://files.cnblogs.com/files/lanyubaicl/ChartControl.Line.7z public partial class Form1 : Fo ...
- telnet用法 测试端口号
Telnet是进行远程登录的标准协议和主要方式它为用户提供了在本地计算机上完成远程主机工作的能力.可以用telnet命令来测试端口号是否正常打开还是关闭状态. 工具/原料 电脑 cmd命令 方法/步骤 ...
- python 用法测试
Python 3.5.6 1.js风格的回调测试 def b(): ') def a(fn): if callable(fn): fn() a(b) class Sample: def q(self) ...
- flask模板的基本用法(定界符、模板语法、渲染模板),模板辅助工具(上下文、全局对象、过滤器、测试器、模板环境对象)
flask模板 在动态web程序中,视图函数返回的HTML数据往往需要根据相应的变量(比如查询参数)动态生成. 当HTML代码保存到单独的文件中时,我们没法再使用字符串格式化或拼接字符串的当时在HTM ...
- DevExpress使用之ChartControl控件绘制图表(多坐标折线图、柱状图、饼状图)
最近因为公司项目需要用到WinForm的DecExpress控件,在这里把一些使用方法总结一下. DevExpress中有一个专门用来绘制图表的插件ChartControl,可以绘制折线图.饼状图.柱 ...
- [DevExpress]ChartControl之柱状图示例
关键代码: using System; using System.Data; using System.Windows.Forms; using CSharpUtilHelpV2; using Dev ...
随机推荐
- Javascript高级编程学习笔记(55)—— DOM2和DOM3(7)操作范围
操作范围中的内容 在创建范围时,内部会为这个范围创建一个文档片段 范围所属的全部节点都会被添加到这个片段中 虽然选取范围可以不是完整的.良好的DOM结构 但是在这个为范围创建的文档片段中,会自己完缺少 ...
- Django项目配置日志
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': ...
- 第43节:Java学前要点
Java学前要点 01 学习Java,有人推荐去培训,有人说没用,其实有钱的,不知道如何学,或者逼不得已去的就可以,也有人自己为了不花这些钱,而选择自学,我觉得也行. 现在大部分人学东西要学的好,都是 ...
- CCS3怎么实现border边框渐变效果
下图注册按钮的边框有渐变效果,如果让你来实现,你会怎么做呢 个人觉得,省事的做法,直接让UI给背景图片就可以了,如下图 不过这种做法感觉不太灵活,如果要修改border的渐变颜色,就需要UI重新做图. ...
- 怎样在mybatis里向mysql中插入毫秒数的时间?
由于业务场景需求,需要记录精准的时间,但是呢,又不要想使用int类型来存储时间,因为这样的可读性比较差了. 怎样在mybatis中向数据库插入毫秒级别的时间呢? 首先,先来看看怎样向数据库中插入毫秒时 ...
- DCT(离散余弦变换)算法原理和源码(python)
原理: 离散余弦变换(DCT for Discrete Cosine Transform)是与傅里叶变换相关的一种变换,它类似于离散傅里叶变换(DFT for Discrete Fourier Tra ...
- 【sping揭秘】24、Spring框架对JMS的集成(无环境版,以后学MQ的时候再隆重介绍)& 任务调度和线程池
这个我也不是很了解,那么这个需要好好学习一下了 JMS有2种消息域类型 1. point to point 点对点模式 2.发布订阅模式 publish/subscribe Pub/Sub 模式 传 ...
- 1.numpy的用法
numpy创建ndarray对象的三种方法 1.1.list转化 In [8]: import numpy as np In [9]: a = [1,2,3,4] In [10]: x1 = np.a ...
- 移动端Web开发,ios下 input为圆角
在处理input的问题时,一般不想要input的原来的样式,一般就直接处理 border: none; outline: none; background: transparent; 这样之后,一般就 ...
- mysql 开发进阶篇系列 19 MySQL Server(innodb_flush_log_at_trx_commit与sync_binlog)
一. innodb_flush_log_at_trx_commit 这个参数名称有个log,一看就是与日志有关.是指:用来控制缓冲区(log buffer)中的数据写入到日志文件(log file), ...