11 Star 44 Fork 16

Joey Zhao / OpenChart

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

效果图
参见:http://www.cnblogs.com/zzy0471/archive/2011/01/23/1942316.html

实例代码

this.chart1.BackColor = Color.Black;

this.chart1.ChartArea.ChartType = Enums.ChartType.Line;
this.chart1.ChartArea.Data = this.dsTest1.Tables[0];
this.chart1.ChartArea.XValueMember = "F_X";

StringInfo chartTitle = new StringInfo();
chartTitle.Value = "LineChart";
chartTitle.Color = Color.DarkBlue;
chartTitle.Size = 15;
this.chart1.ChartArea.ChartTitle = chartTitle;

this.chart1.ChartArea.AxisLineColor = Color.DarkSeaGreen;
this.chart1.ChartArea.AxisLineWidth = 2;

PartingLine line = new PartingLine();
line.YValue = 50;
line.LineColor = Color.GreenYellow;
this.chart1.ChartArea.PartingLines.Add(line);

StringInfo axisXLable = new StringInfo();
axisXLable.Size = 12;
axisXLable.Color = Color.Silver;
axisXLable.Value = "时间";
this.chart1.ChartArea.AxisX.Lable = axisXLable;

this.chart1.ChartArea.AxisX.Interval = 1;
this.chart1.ChartArea.AxisX.IntervalType = Enums.InervalType.Hours;
this.chart1.ChartArea.AxisX.TimeFormat = "MM-dd HH:mm";
this.chart1.ChartArea.AxisX.Grid.LineColor = Color.RosyBrown;
this.chart1.ChartArea.AxisX.Grid.LineStyle = Enums.LineStyle.DashDot;
this.chart1.ChartArea.AxisX.ShowGrid = true;

StringInfo axisYLable = new StringInfo();
axisYLable.Size = 12;
axisYLable.Color = Color.Silver;
axisYLable.Value = "数据";
this.chart1.ChartArea.AxisY1.Lable = axisYLable;

this.chart1.ChartArea.AxisY1.Interval = 10;
this.chart1.ChartArea.AxisY1.IntervalType = Enums.InervalType.Number;
this.chart1.ChartArea.AxisY1.Grid.LineColor = Color.SaddleBrown;
this.chart1.ChartArea.AxisY1.Grid.LineStyle = Enums.LineStyle.DashDot;
this.chart1.ChartArea.AxisY1.ShowGrid = true;

Series series1 = new Series();
series1.Name = "SeriesOne";
series1.Color = Color.Red;
series1.Width = 1;
series1.YValueMember = "F_Y1";
this.chart1.ChartArea.Series.Add(series1);

Series series2 = new Series();
series2.Name = "SeriesTwo";
series2.Color = Color.RoyalBlue;
series2.Width = 1;
series2.YValueMember = "F_Y2";
this.chart1.ChartArea.Series.Add(series2);

Series series3 = new Series();
series3.Name = "SeriesThree";
series3.Color = Color.SeaShell;
series3.Width = 1;
series3.YValueMember = "F_Y3";
this.chart1.ChartArea.Series.Add(series3);

空文件

简介

用C#编写的一个简单的图表控件,运行于winform程序中。可展现的图形包括:曲线图、饼图和对象折线图。 展开 收起
C#
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/joeyzhao/openchart.git
git@gitee.com:joeyzhao/openchart.git
joeyzhao
openchart
OpenChart
master

搜索帮助