终于完成MyNChart 0.4.0.1版本
2005-05-24 15:00
337 查看
终于完成MyNChart 0.4.0.1版本
MyNChart[/b]说明[/b]
[/b]版本:0.4.0.1
作者:kilxy
联系方式:
Mail:kilxy@dl.cn
MSN:kilxy@hotmail.com
QQ:20954664
使用授权:
MyNChart[/b]功能介绍[/b]
[/b]1、 基于.Net的图形控件,实现了饼图、柱图和折线图三种图形。
2、 该控件采用DataSet作为数据源实现数据的图象显示。
MyNChart[/b]简单使用说明[/b]
[/b]1 [/b]数据源[/b]
[/b]MyNChart采用.Net DataTable作为数据源,MyNChart并不关心数据怎样获得,以及数据具体内容知否正确。而只是把数据源里面的数据用图像的方式显示出来。
下面是一个典型的MyNChart的数据源形式,在这里我们关心具体数值含义只是作为数据源说明的一个例子。
该数据是MS SQL 2000例子数据库Pubs中的jobs表中的内容。
2 [/b]刻度[/b]
[/b]刻度在饼图和柱图、折线图有着不同含义,具体如下:
饼图:
是指在饼图中被分割的每部分的名称
柱图、折线图:
坐标X轴的具体刻度
刻度的数据类型要求是可以转换成字符串的数据类型,在上面的数据源中列job_id和job_desc都可以作为刻度。
3 [/b]系列[/b]
[/b]系列在饼图和柱图、折线图也有着不同含义,具体如下:
饼图:
是指在饼图中被分割的每部分的名称
柱图、折线图:
坐标X轴的具体刻度
系列的数据类型要求是int、float、double等的数值类型,在上面的数据源中列min_lvl和max_lvl都可以作为系列。一个数据源中可以指定多个系列,但是在饼图中只使用第一个指定的系列作为数据图形的标准。
4 [/b]MyNChart[/b]控件、以及控件属性方法说明[/b]
[/b]4.1 [/b]MyNChart.Series
[/b]说明:
系列类
属性:
4.2 [/b]MyNChart.Scale
[/b]说明:
刻度类,继承于MyNChart.Series
属性:
4.3 [/b]MyNChart.Forms.ChartControl
[/b]说明:
所有Form图形控件的父类
属性:
方法:
4.4 [/b]MyNChart.Forms.[/b] PiControl
[/b]说明:
饼图控件,继承于MyNChart.Forms.ChartControl
属性、方法:
与MyNChart.Forms.ChartControl在0.4.0.1中完全相同
4.5 [/b]MyNChart.Forms.[/b] PoleControl
[/b]说明:
柱图控件,继承于MyNChart.Forms.ChartControl
属性、方法:
与MyNChart.Forms.ChartControl在0.4.0.1中完全相同
4.6 [/b]MyNChart.Forms.[/b] LineControl
[/b]说明:
折线图控件,继承于MyNChart.Forms.ChartControl
属性、方法:
与MyNChart.Forms.ChartControl在0.4.0.1中完全相同
5 [/b]Demo[/b]简单说明[/b]
[/b]//声明控件
public ChartControl chartControl1;
//根据选择不同实例化控件
private void button1_Click_1(object sender, System.EventArgs e)
{
this.panel1.Controls.Clear();
if(this.radioButton1.Checked)
this.chartControl1 = new PiControl();
if(this.radioButton2.Checked)
this.chartControl1 = new PoleControl();
if(this.radioButton3.Checked)
this.chartControl1 = new LineControl();
this.chartControl1.CharTitle="工作种类统计表";
this.chartControl1.Parent = this.panel1;
this.chartControl1.Dock = DockStyle.Fill;
Draw();
}
private void Draw()
{
if(this.chartControl1==null)
return;
//填充数据
this.dataSetJobs1.Clear();
this.sqlSelectCommand1.Parameters[0].Value =Convert.ToInt32(this.textBox1.Text);
this.sqlDataAdapter1.Fill(this.dataSetJobs1);
this.chartControl1.DataSource = this.dataSetJobs1.Tables[0];
//指定刻度
Scale scale=new Scale();
scale.Name = "job_id";
scale.Label = "工作编号";
this.chartControl1.ScaleCloum = scale;
this.chartControl1.ClearSeries();
//增加系列
Series series=new Series("min_lvl","最小值");
this.chartControl1.AddSeries(series);
//增加系列
Series seriesMax=new Series("max_lvl","最大值");
this.chartControl1.AddSeries(seriesMax);
//绘制图形
this.chartControl1.Draw();
}
MyNChart[/b]说明[/b]
[/b]版本:0.4.0.1
作者:kilxy
联系方式:
Mail:kilxy@dl.cn
MSN:kilxy@hotmail.com
QQ:20954664
使用授权:
MyNChart[/b]功能介绍[/b]
[/b]1、 基于.Net的图形控件,实现了饼图、柱图和折线图三种图形。
2、 该控件采用DataSet作为数据源实现数据的图象显示。
MyNChart[/b]简单使用说明[/b]
[/b]1 [/b]数据源[/b]
[/b]MyNChart采用.Net DataTable作为数据源,MyNChart并不关心数据怎样获得,以及数据具体内容知否正确。而只是把数据源里面的数据用图像的方式显示出来。
下面是一个典型的MyNChart的数据源形式,在这里我们关心具体数值含义只是作为数据源说明的一个例子。
job_id | job_desc | min_lvl | max_lvl |
1 | Designer for job1 | 10 | 30 |
2 | Chief Executive Officer | 200 | 250 |
3 | Business Operations Manager | 175 | 225 |
4 | Chief Financial Officier | 175 | 250 |
5 | Publisher | 150 | 250 |
6 | Managing Editor | 140 | 225 |
7 | Marketing Manager | 120 | 200 |
8 | Public Relations Manager | 100 | 175 |
9 | Acquisitions Manager | 75 | 60 |
10 | Productions Manager | 75 | 60 |
11 | Operations Manager | 75 | 60 |
12 | Editor | 25 | 100 |
13 | Sales Representative | 25 | 100 |
14 | Designer | 25 | 100 |
15 | lxm | 10 | 100 |
16 | ssdsadsadsad | 10 | 100 |
2 [/b]刻度[/b]
[/b]刻度在饼图和柱图、折线图有着不同含义,具体如下:
饼图:
是指在饼图中被分割的每部分的名称
柱图、折线图:
坐标X轴的具体刻度
刻度的数据类型要求是可以转换成字符串的数据类型,在上面的数据源中列job_id和job_desc都可以作为刻度。
3 [/b]系列[/b]
[/b]系列在饼图和柱图、折线图也有着不同含义,具体如下:
饼图:
是指在饼图中被分割的每部分的名称
柱图、折线图:
坐标X轴的具体刻度
系列的数据类型要求是int、float、double等的数值类型,在上面的数据源中列min_lvl和max_lvl都可以作为系列。一个数据源中可以指定多个系列,但是在饼图中只使用第一个指定的系列作为数据图形的标准。
4 [/b]MyNChart[/b]控件、以及控件属性方法说明[/b]
[/b]4.1 [/b]MyNChart.Series
[/b]说明:
系列类
属性:
Name | 该系列对应数据源DataTable中的列名 |
Label | 柱图、折线图中图例中对该系列的说明 |
Color | 该系列的颜色(0.4.0.1版本未使用) |
AutoColor | 是否自动选择颜色 |
[/b]说明:
刻度类,继承于MyNChart.Series
属性:
Name | 该刻度对应数据源DataTable中的列名 |
Label | 柱图、折线图中图例中对X轴说明(0.4.0.1版本未使用) |
Color | 该系列的颜色(0.4.0.1版本未使用) |
AutoColor | 是否自动选择颜色(0.4.0.1版本未使用) |
[/b]说明:
所有Form图形控件的父类
属性:
DataSource | MyNChart.Forms.ChartControl 数据源(DataTable) |
ScaleCloum | 控件刻度() |
CharTitle | 图形标题 |
TitleFont | 标题字体 |
LegendFont | 图例字体 |
ScaleFont | 刻度字体 |
BackColor | 背景颜色 |
ForeColor | 前景颜色 |
VisibleCutline | 图例是否可见 |
void AddSeries(Series series) | MyNChart.Forms.ChartControl 增加一个系列 |
void ClearSeries() | 清除所有已经增加的系列 |
ScaleCloum | 设置控件刻度 |
void Draw() | 控件绘制图形方法 |
[/b]说明:
饼图控件,继承于MyNChart.Forms.ChartControl
属性、方法:
与MyNChart.Forms.ChartControl在0.4.0.1中完全相同
4.5 [/b]MyNChart.Forms.[/b] PoleControl
[/b]说明:
柱图控件,继承于MyNChart.Forms.ChartControl
属性、方法:
与MyNChart.Forms.ChartControl在0.4.0.1中完全相同
4.6 [/b]MyNChart.Forms.[/b] LineControl
[/b]说明:
折线图控件,继承于MyNChart.Forms.ChartControl
属性、方法:
与MyNChart.Forms.ChartControl在0.4.0.1中完全相同
5 [/b]Demo[/b]简单说明[/b]
[/b]//声明控件
public ChartControl chartControl1;
//根据选择不同实例化控件
private void button1_Click_1(object sender, System.EventArgs e)
{
this.panel1.Controls.Clear();
if(this.radioButton1.Checked)
this.chartControl1 = new PiControl();
if(this.radioButton2.Checked)
this.chartControl1 = new PoleControl();
if(this.radioButton3.Checked)
this.chartControl1 = new LineControl();
this.chartControl1.CharTitle="工作种类统计表";
this.chartControl1.Parent = this.panel1;
this.chartControl1.Dock = DockStyle.Fill;
Draw();
}
private void Draw()
{
if(this.chartControl1==null)
return;
//填充数据
this.dataSetJobs1.Clear();
this.sqlSelectCommand1.Parameters[0].Value =Convert.ToInt32(this.textBox1.Text);
this.sqlDataAdapter1.Fill(this.dataSetJobs1);
this.chartControl1.DataSource = this.dataSetJobs1.Tables[0];
//指定刻度
Scale scale=new Scale();
scale.Name = "job_id";
scale.Label = "工作编号";
this.chartControl1.ScaleCloum = scale;
this.chartControl1.ClearSeries();
//增加系列
Series series=new Series("min_lvl","最小值");
this.chartControl1.AddSeries(series);
//增加系列
Series seriesMax=new Series("max_lvl","最大值");
this.chartControl1.AddSeries(seriesMax);
//绘制图形
this.chartControl1.Draw();
}
相关文章推荐
- 终于完成MyNChart 0.4.0.1版本(一)介绍
- 今天完成了公司的版本控制平台的打建,终于可以轻松度过平安夜了。
- 终于在pycharm下(Python3.6.1版本)安装完成机器学习相关库文件(sklearn scikit-learn gensim xgboost tensorflow nltk )
- DzzOffice Alpah 第一个版本终于完成发布(webos类产品)
- 花了很长的时间终于完成了1.0的稳定版本
- CSDN的群组功能终于可以发布测试版本了
- 终于完成任务了
- [置顶] QeePHP 快速入门 -- 色色pdf版本 -- 第2章初步完成
- 今天晚上终于回归喜欢的Myeclipse6.5版本,终于没有那么卡了,附上Myeclipse6.5注册破解方法
- Hubble.net 0.5 版本开发完成
- 终于完成了webkit移植
- python --eclipse 配置(完成后找不到pydev ,因为java版本不对)
- 终于搜了一个.net项目开发的版本控制工具
- SoftwareSOA小组SOA 1.0版本完成
- 终于完成了《前世今生的轮回》的再填词工作
- 终于完成了第一个商业网站作品初稿,写些心得
- 终于解决了TTS的speak朗读完成问题
- 项目终于完成了
- IE9:继IE5以来,微软终于又出了一个给力版本
- Sudoku 1.2 版本完成