public void DrawSingle2(int _zone, int _sensor) { Clear(CBPoint.Etype.Single2); if (_sensor < 0) { return; } if (_sensor >= chart.Series.Count) { return; } Series ser = chart.Series[_sensor]; if (_zone < 0) { return; } if (_zone >= ser.Points.Count) { return; } CBPoint cbdp = FindAdd(CBPoint.Etype.Single2, ser.Points[_zone]); cbdp.Draw(); }
public void DrawLine(int _zone0, int _zone1, int _sensor) { Clear(CBPoint.Etype.Line); if (_sensor < 0) { return; } if (_sensor >= chart.Series.Count) { return; } Series ser = chart.Series[_sensor]; for (int z = _zone0; z <= _zone1; z++) { if (z < 0) { continue; } if (z >= ser.Points.Count) { continue; } CBPoint cbdp = FindAdd(CBPoint.Etype.Line, ser.Points[z]); cbdp.Draw(); } }
public void DrawColumn2(int _zone) { Clear(CBPoint.Etype.Column2); if (_zone < 0) { return; } foreach (Series ser in chart.Series) { if (_zone >= ser.Points.Count) { continue; } CBPoint cbdp = FindAdd(CBPoint.Etype.Column2, ser.Points[_zone]); cbdp.Draw(); } }
CBPoint FindAdd(CBPoint.Etype _tp, DataPoint _dp) { CBPoint cbdp = null; foreach (CBPoint p in L) { if (p.dp == _dp) { cbdp = p; break; } } if (cbdp == null) { cbdp = new CBPoint(_dp); } cbdp.Mark(_tp, true); L.Add(cbdp); return(cbdp); }