private void UpdatePlotHumid(double t, double d) { LineSeries lineSeries = Humid.Series[0] as LineSeries; lineSeries.Points.Add(new DataPoint(t, d)); if (lineSeries.Points.Count > config.MaxSampleNumber) { lineSeries.Points.RemoveAt(0); } if (t >= config.XAxisMax) { Humid.Axes[0].Minimum = (t - config.XAxisMax); Humid.Axes[0].Maximum = t + config.SampleTime / 1000.0;; } Humid.InvalidatePlot(true); }