问题描述
我使用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();
}
推荐答案
// 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中隐藏多条曲线中的特定曲线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!