protected void AddValue(DateTime time, object value) { if (value == null) { return; } if (values.Count > 0) { var diff = time - stateEnter; values[values.Count - 1].Y = diff.TotalSeconds; } if (!value.Equals(state)) { state = value; stateEnter = time; values.Add(stateIndex++, 0, value.ToString()); var textLabels = new string[values.Count]; for (int i = 0; i < textLabels.Length; i++) { textLabels[i] = (string)values[i].Tag; } graph.GraphPane.XAxis.Scale.TextLabels = textLabels; } graph.Invalidate(); }
public override void Show(object value) { var time = DateTime.Now; controller.AddValues(value, this); if ((time - updateTime) > TargetElapsedTime) { graph.Invalidate(); updateTime = time; } }
public override void Show(object value) { controller.AddValues(value, this); graph.Invalidate(); }