ZedGraph的在线文档

官网的源代码 http://sourceforge.net/projects/zedgraph/?source=directory

zedgraph的demo在线范例

http://zedgraph.sourceforge.net/samples.html

这里介绍了如何实现动态加载数据,并且提供了demo

http://goorman.free.fr/ZedGraph/zedgraph.org/wiki/index3061.html?title=Display_Dynamic_or_Real-Time_Data

The ZedGraphControl can display dynamic or static data. For dynamic displays, each time you want to add data to a graph, you will need to do the following:

ZedGraph可以显示动态或者静态的数据,对于动态展示,每当你想要把数据加载到graph上的时候,你需要按照以下的步骤来做

1.Find the CurveItem of interest within the GraphPane.CurveList collection

第一步,先找到GraphPane.CurveList 中的相关曲线

2.Access the PointPairList (or other IPointListEdit type) for the CurveItem, and add the new data or modify the existing data as required

第二步,找到曲线中的PointPairList ,然后根据需要加载新数据或者修改已经存在的数据

3.Call ZedGraphControl.AxisChange() to update the auto-scaled axis ranges

第三步,调用ZedGraphControl的AxisChange()函数来更新坐标轴范围的比例

4.Call Form.Invalidate() to update the graph

第四步,调用Form.Invalidate() 来更新graph------------[貌似我没有找到这个方法,winform支持?]

The data points are stored with each CurveItem as a reference to an IPointList interface in CurveItem.Points. Note that this point list reference can be any class that implements IPointList. If it also implements IPointListEdit, thenIPointListEdit.Add() and IPointListEdit.RemoveAt() methods will be available.

The code sample is for a form that implements a ZedGraphControl with a Timer event to show dynamically updated data. You can download the complete project from the links below:

ZedGraph控件随机生成曲线的颜色,以及X轴坐标文字竖着显示==========mypane.XAxis.Scale.FontSpec.Angle = 270;//X轴的时间垂直显示

http://blog.csdn.net/happy09li/article/details/7535388

ZedGraph使用大全http://www.cnblogs.com/peterzb/archive/2009/07/19/1526726.html

//zedgraph一些属性的介绍

http://blog.chinaunix.net/uid-20776117-id-1847015.html

ZedGraph刷新数据的方法

zedGraphControl1.AxisChange();//此方法   调整坐标轴的范围

Invalidate()//使控件的特定区域无效并向控件发送绘制消息。

//调用 Invalidate 方法并不强制同步绘制;若要强制同步绘制,请在调用 Invalidate 方法之后调用 Update 方法。 在不带参数的情况下调用此方法时,会将整个工作区添加到更新区域。

zedGraphControl1.Invalidate();

zedGraphControl1.Update();

或者

zedGraphControl1.Refresh();//强制控件使其工作区无效并立即重绘自己和任何子控件。

//让坐标轴不不显示10^x;[这样做会导致比例尺失调]

zedGraphControl1.GraphPane.XAxis.Type = AxisType.Log;

zedGraphControl1.GraphPane.XAxis.Scale.IsUseTenPower = false;

IsUseTenPower ->> 是否为10次幂表示,scale为LogScale时有效。 The powers-of-ten notation is just the text "10" followed by a superscripted value indicating the magnitude. This mode is only valid for log scales. boolean value; true to show the title as a power of ten, false to show a regular numeric value (e.g., "0.01", "10", "1000")

zedGraphControl1.GraphPane.XAxis.Title.IsOmitMag

true to show the magnitude value, false to hide it .   //IsOmitMag为true的时候,显示数量级,为false的时候,不显示

For large scale values, a "magnitude" value (power of 10) is automatically used for scaling the graph. This magnitude value is automatically appended to the end of the Axis Title (e.g., "(10^4)") to indicate that a magnitude is in use. This property controls whether or not the magnitude is included in the title. Note that it only affects the axis title; a magnitude value may still be used even if it is not shown in the title.

对于大数量级,10幂,会自动显示;数量级会自动加载坐标的Title后面,无论IsOmitMag是true还是false;它仅仅是影响Title,数量级还是正常的影响坐标系的。

以加载100万数据为例子,说明上面几个的属性

默认状态下的加载界面

zedGraphControl1.GraphPane.XAxis.Title.IsOmitMag 此属性默认为false,X轴的标题显示10的幂

将zedGraphControl1.GraphPane.XAxis.Title.IsOmitMag 设置为true的时候,就不显示10的幂了

zedGraphControl1.GraphPane.XAxis.Type = AxisType.Log;//横轴按照10的幂为步长//默认横轴是按照10的幂来显示的

zedGraphControl1.GraphPane.XAxis.Type = AxisType.Log;

zedGraphControl1.GraphPane.XAxis.Scale.IsUseTenPower = false;//横轴不显示成10的幂

给某一个曲线加载100万点,希望横轴显示100000,200000,300000

直接设定好,坐标轴

zedGraphControl1.GraphPane.XAxis.Scale.Max = number;//设定X轴的最大值

zedGraphControl1.GraphPane.XAxis.Scale.MajorStep = number / 10;//设定最大步长

zedGraphControl1.GraphPane.XAxis.Scale.MinorStep = number / 10 / 5;//设定最小步长

zedGraphControl1.GraphPane.XAxis.Scale.FontSpec.Angle = 45;//设定X轴的字体的倾斜度

注意:一定不要调用zedGraphControl1.AxisChange();否则上面的设置就白设置了,相当于重置了

zedgraph怎么画曲线图_ZedGraph如何动态的加载曲线相关推荐

  1. android 动态水球,Canvas 制作动态进度加载水球详解及实例代码

    Canvas 动态进度加载水球 前言 之前看到一些球型的动态加载的效果,一直想自己动手做一个,正好这段时间重温了一个Canvas,所以就尝试了一下. 实现思路 关于水波的实现,使用了sin()函数,通 ...

  2. React 中动态的加载组件 ---loadable-components

    loadable-components 用于在react 中动态的加载组件 安装方法: npm i loadable-components 使用: 引入: 代码中使用: 希望对你有所帮助

  3. js如何动态的加载js文件

    在这个地方我说的动态的加载js文件是通过调用函数来加载js文件,我们在这个地方通过一个简单的小例子来实现 首先创建3个文件分别为:test1.html,test1.js,demo.js test1.j ...

  4. nginx php动态编译加载模块.

    #Nginx动态编译加载模块步骤 #查看目前Nginx版本及编译模块 #[root@centos7 ~]# /opt/app/lnmp/nginx-1.12.0/sbin/nginx -V #ngin ...

  5. 【Android 逆向】Android 进程注入工具开发 ( 远程进程注入动态库文件操作 | 注入动态库 加载 业务动态库 | 业务动态库启动 | pthread_create 线程开发 )

    文章目录 前言 一.加载 libnattive.so 动态库 二. libnattive.so 动态库启动 三. pthread_create 线程开发 四. 线程执行函数 前言 libbridge. ...

  6. 【Android NDK 开发】Android.mk 配置动态库 ( Android Studio 配置动态库 | 动态库加载版本限制 | 本章仅做参考推荐使用 CMake 配置动态库 )

    文章目录 I . Android Studio 中使用 Android.mk 配置动态库 总结 II . 第三方动态库来源 III . 配置 Android.mk 构建脚本路径 IV . 预编译 第三 ...

  7. linux程序加载器,Linux 动态连接加载器 ld-linux用法

    Linux 动态连接加载器 ld-linux用法 文章作者:网友投稿 发布时间:2009-12-10 16:21:11 来源:网络 ld-linux有两种用法,间接调用和直接调用. 间接调用时,连接器 ...

  8. ELF动态库加载技术

    库用于将相似函数打包在一个单元中.Linux支持两种类型的库:静态库(在编译时静态绑定到程序)和动态库(在运行时绑定到程序).Linux系统使用的动态库是ELF格式,后缀名为so. 1 加载 动态库内 ...

  9. PySide2动态/静态加载UI及程序发布

    Python目前已经是一个"家喻户晓"的名词了,她可能用在很多行业领域,最牛逼的人工智能(AI).大数据(big data).今天要介绍的是Python图形化界面实现(GUI),记 ...

  10. ajax动态加载div,JQuery/AJAX:使用动态内容加载外部DIV使用动态内容

    我需要创建一个页面,使用Jquery和AJAX从外部页面加载div.JQuery/AJAX:使用动态内容加载外部DIV使用动态内容 我遇到了一些很好的教程,但它们都是基于静态内容的,我的链接和内容是由 ...

最新文章

  1. 【机器学习PAI实践十二】机器学习算法基于信用卡消费记录做信用评分
  2. 中国通货膨胀率2.8%,数据分析买房风险直线上升
  3. 一致性哈希算法在分布式缓存中的应用
  4. python基础数据类型一(元祖)
  5. rf调用的python函数报错_Robot Framework(15)- 扩展关键字
  6. 《深入理解LINUX网络技术内幕》小记1
  7. 自动化设备的软件框架
  8. SQL Server 审计
  9. 单片机c语言 oxfe,AVR单片机入门及C语言高效设计实践(五)
  10. 多台tomcat服务的session共享 memcached与redis
  11. table表格高级用法(一)
  12. 超全 泛微 E8 E-cology 8 开发资料大全 开源下载资料
  13. java标书_java软件项目投标技术标书.doc
  14. python pyplot bar 参数_数据可视化之条形图(1):Axes.bar
  15. Rosalind第88题:Counting Rooted Binary Trees
  16. 学得到专栏作者如何回答问题:万维钢(1)
  17. python画图小例(玫瑰、佩奇、哆啦A梦、美队盾牌)
  18. 网易视频云技术分享:记一次.gitignore的操作细节
  19. 中国金融出版社出版的2013版《风险管理》
  20. 关于 CST 和UTC时间的理解

热门文章

  1. 全网最详细ANSYS Maxwell16下载及安装
  2. Hart 常用命令 命令格式+命令含义 中文翻译
  3. 秒表的检定及设备使用方法说明
  4. 李永乐线性代数辅导讲义第四章学霸小结
  5. Could not find a version that satisfies the requirement PyQt5-Qt5>=5.15.2 (from pyqt5) (from version
  6. JSP学习——Eclipse自定义JSP模板(修改默认JSP文件)
  7. matlab 编写雷达波形,雷达信号处理+Matlab程序
  8. Steam忘记账号如何在文件夹中找回
  9. Mac最好用的RSS阅读器Reeder使用方法
  10. mac上调整phpstorm和webstorm的使用内存(默认是128m-750m) 避免卡顿