using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZedGraph; namespace TestZedGraphControl
{
/// <summary>
/// 画图控件操作类(VS显示控件:工具-->添加项-->选择项-->ZedGraph.dll)
/// </summary>
public class CtlZedGraphOperate
{
private ZedGraphControl m_zedGraphControl = null; /// <summary>
/// 关联ZedGraph画图控件
/// </summary>
public ZedGraphControl refZedGraphControl
{
set
{
m_zedGraphControl = value;
}
get
{
return m_zedGraphControl;
}
} /// <summary>
/// 构造函数
/// </summary>
public CtlZedGraphOperate()
{ } private static volatile CtlZedGraphOperate zgOpera = null; /// <summary>
/// 获取画图控件操作类单一实例
/// </summary>
/// <returns></returns>
public static CtlZedGraphOperate GetInstance()
{
if(null == zgOpera)
{
zgOpera = new CtlZedGraphOperate();
}
return zgOpera;
} /// <summary>
/// 设置标题
/// </summary>
/// <param name="title">图标题</param>
/// <param name="x_title">X轴标题</param>
/// <param name="y_title">Y轴标题</param>
/// <param name="x_type">X轴类型</param>
/// <param name="y_type">Y轴类型</param>
public void SetTitles(string title, string x_title, string y_title)
{
m_zedGraphControl.GraphPane.Title.Text = title;
m_zedGraphControl.GraphPane.XAxis.Title.Text = x_title;
m_zedGraphControl.GraphPane.YAxis.Title.Text = y_title;
} /// <summary>
/// 设置标题(Linear:线性,Exponent:指数,Log:对数,Date:时间,Text:文本,Ordinal:序数,LinearOrdinal:线性序数,DateOrdinal:时间序数)
/// </summary>
/// <param name="title">图标题</param>
/// <param name="x_title">X轴标题</param>
/// <param name="y_title">Y轴标题</param>
/// <param name="x_type">X轴类型</param>
/// <param name="y_type">Y轴类型</param>
public void SetTitles(string title, string x_title, string y_title, AxisType x_type, AxisType y_type)
{
m_zedGraphControl.GraphPane.Title.Text = title;
m_zedGraphControl.GraphPane.XAxis.Title.Text = x_title;
m_zedGraphControl.GraphPane.YAxis.Title.Text = y_title;
m_zedGraphControl.GraphPane.XAxis.Type = x_type;
m_zedGraphControl.GraphPane.YAxis.Type = y_type;
} /// <summary>
/// 依据点集画线
/// </summary>
/// <param name="pointList">点集</param>
public LineItem DrawLines(string label, PointPairList pointList, System.Drawing.Color color, SymbolType symbolType)
{
return m_zedGraphControl.GraphPane.AddCurve(label, pointList, color, symbolType);
} /// <summary>
/// 刷新
/// </summary>
public void ReFresh()
{
m_zedGraphControl.AxisChange();
m_zedGraphControl.Refresh();
}
}
}

C#:ZedGraph画图控件(待补充)的更多相关文章

  1. VS2010 使用TeeChart画图控件 - 之二 - 绘制图形(折线图,柱状图)

    1.前期准备 详细可见VS2010 使用TeeChart画图控件 - 之中的一个 控件和类的导入 1. 1 加入TeeChart控件,给控件加入变量m_TeeChart 加入TeeChart控件,右击 ...

  2. DevExpress控件的安装及画图控件的使用

    近期须要绘制纵断面图,而AE自带的又不是非常好,查找资料后使用DevExpress控件中的画图控件实现了纵断面的绘制.Dev控件是须要付费的.这里我们使用破解版的哈. 安装包及破解文件上传至我的网盘了 ...

  3. TimeSeriesEditor时间序列编辑软件之实战ReoGrid表格控件和Zedgraph绘图控件

    最近用ReoGrid表格控件和Zedgraph绘图控件写了一个TimeSeriesEditor时间序列编辑软件,如下图. 目的就是体验一下这两个空间的用法,感觉还是挺好用的, 关于软件的使用说明可以访 ...

  4. 使用Aspose.Cell控件实现Excel高难度报表的生成(三)

    在之前几篇文章中,介绍了关于Apsose.cell这个强大的Excel操作控件的使用,相关文章如下: 使用Aspose.Cell控件实现Excel高难度报表的生成(一) 使用Aspose.Cell控件 ...

  5. C# 控件

    .ascx:Web窗体用户控件.用来存放独立的用户控件,可提供众多页面使用: <%@ Control Language="C#" AutoEventWireup=" ...

  6. High-speed Charting Control--MFC绘制图表(折线图、饼图、柱形图)控件

    原文地址:https://www.codeproject.com/articles/14075/high-speed-charting-control 本文翻译在CodeProject上的介绍(主要还 ...

  7. 用ZedGraph控件作图圆

    转自原文 用ZedGraph控件作图圆 用ZedGraph控件绘制圆各位:    我想利用第三方控ZedGraph在WinForm窗体中绘制图形如,圆,填充圆,只是简单的圆图形,但一直没有找到相应的方 ...

  8. ZedGraph控件生成饼图、拆线图和柱状图例程

    这几天做了个自己觉得还蛮NB的功能,在GRID中选中一块数据,然后右键菜单即可生成三种图形,还可以互相切换,对了,饼图还添加了鼠标点击分离的处理,大致如图: 用的控件就是ZedGraph,我把它继承封 ...

  9. zedgraph控件的一些比较有用的属性 转

    (1)zedgraph控件属性具体解释: AxisChange()() ->> This performs an axis change command on the graphPane. ...

随机推荐

  1. 如何理解Hibernate中的HibernateSessionFactory类

    package com.zz.util; import org.hibernate.HibernateException; import org.hibernate.Session; import o ...

  2. localhost与127.0.0.1的区别 2

    localhost与127.0.0.1的区别localhost与127.0.0.1的区别是什么?相信有人会说是本地ip,曾有人说,用127.0.0.1比localhost好,可以减少一次解析.看来这个 ...

  3. Ext Connection

    <html> <head> <meta http-equiv="Content-Type" content="text/html; char ...

  4. SHA1算法实现及详解

    1 SHA1算法简介 安全哈希算法(Secure Hash Algorithm)主要适用于数字签名标准(Digital Signature Standard DSS)里面定义的数字签名算法(Digit ...

  5. comgrid获取多选值

    var val = $('#cc').combobox('getValues');

  6. MS Sql Server 中主从库的配置和使用介绍

    网站规模到了一定程度之后,该分的也分了,该优化的也做了优化,但是还是不能满足业务上对性能的要求:这时候我们可以考虑使用主从库. 主从库是两台服务器上的两个数据库,主库以最快的速度做增删改操作+最新数据 ...

  7. ARM指令集—SWP指令

    ARM指令集-SWP指令 SWP和SWPB是ARM指令集中对存储单元的原子操作.即对存储单元的一次读和一次不可被切割. SWP和SWPB分别完毕存储器和寄存器之间 一个字(32bit)和一个字节(8b ...

  8. JAVA Selenium PHONCOMJS 获取js动态生成完整网页

    首先需要在maven的pom.xml中包含以下依赖 <dependency> <groupId>com.github.detro</groupId> <art ...

  9. Python下科学计算包numpy和SciPy的安装【原创】

    Python下大多数工具包的安装都很简单,只需要执行 "python setup.py install"命令即可.然而,由于SciPy和numpy这两个科学计算包的依赖关系较多,安 ...

  10. Unity 打包发布Android新手教学 (小白都能看懂的教学 ) [转]

    版权声明:本文为Aries原创文章,转载请标明出处.如有不足之处欢迎提出意见或建议,联系QQ531193915 扫码关注微信公众号,获取最新资源 最近在Unity的有些交流群里,发现好多Unity开发 ...