在zedgraph中隐藏多条曲线中的特定曲线 [英] hide specific curve in multiple curves in zedgraph

查看:936
本文介绍了在zedgraph中隐藏多条曲线中的特定曲线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我使用zed图RollingPointPairList()API设计了一个实时图形应用程序。在该用户应该隐藏已选中复选框上的特定曲线,但无论何时取消选中,它都应显示所有隐藏点的曲线。我尝试了一个曲线隐藏点的多个选项,但无论何时未选中,它都会绘制直线&从列表中删除特定点;怎么做?

下面我复制了一些我尝试过的代码片段

Hi,
I designed one real time graph application using zed graph RollingPointPairList() API. In that user should hide specific curve on checked check box but whenever it unchecked then it should show curve with all points which were hide . I tried multiple options in one that curve is hiding the points but whenever unchecked it draws straight line & drop specific points from list; how to do that?
Below i copy some code snippest which i've tried

if (chkXScale.Checked == true) {
	zedGraphControl1.GraphPane.CurveList[0].Clear();
        zedGraphControl1.Refresh();
}

推荐答案

自从我使用ZedGraph已经有很长一段时间了,但我认为你有代码示例显示只清除Index = 0处曲线的点列表。



尝试使用如下所示的内容。我没有对此进行测试,因为我必须下载ZedGraph的副本并挫败自己试图记住创建图形所需的所有部分。 :)

It has been a long time since I have used ZedGraph, but I think that the code sample you have shown just clears the points list of the curve at Index=0.

Try using something like shown below. I have not tested this as I would have to download a copy of ZedGraph and frustrate myself trying to remember the all the parts needed to create a graph . :)
// define a Zedgraph.CurveItem to store a reference to the curve you want to toggle on/of with the checkbac
ZedGraph.CurveItem toggledcurve = your curve definition;  

if (chkXScale.Checked)
 {
    zedGraphControl1.GraphPane.CurveList.Remove(toggledcurve);
 }
 else
 {
    zedGraphControl1.GraphPane.CurveList.Add(toggledcurve);
 }

zedGraphControl1.Refresh();

另一方面,我认为当MS发布Chart控件时,他们停止了ZedGraph的开发。它在某个地方再次活跃吗? SourceForge仍然显示2008年是最后一次更新。

On another note, I thought they stopped development of ZedGraph when MS released the Chart control. Is it active again somewhere? SourceForge still shows 2008 as the last update.


我试过这个解决方案但是没有解决,你能不能给我一些更详细的说明ZedGraph.CurveItem toggledcurve =你的曲线定义;

谢谢!
I have tried this solution but it not solved, could you give me some more details explanation on line "ZedGraph.CurveItem toggledcurve = your curve definition;"
Thanks!


这篇关于在zedgraph中隐藏多条曲线中的特定曲线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆