I have application with real time Chart control that received date and display this on my control:
This is my control:
MyObject obj...
Series series = new Series();
series.Color = Color.Blue;
series.ChartType = SeriesChartType.Spline;
series.BorderWidth = 2;
chart1.Series.Add(series);
chart1.ChartAreas[0].AxisX.MajorGrid.LineColor = Color.White;
chart1.ChartAreas[0].AxisY.MajorGrid.LineColor = Color.White;
chart1.ChartAreas[0].AxisX.IsStartedFromZero = true;
chart1.ChartAreas[0].AxisX.IntervalOffsetType = DateTimeIntervalType.Number
;
Timer tick:
private void chartTimer_Tick(object sender, EventArgs e)
{
series.Points.Add(wf.BitsPerSecond * 0.000001);
chart1.ResetAutoValues();
}
my problem is that at the beginning this is the graph:
After few minutes the X axis is growing and growing and it looks like the graph stop to moving:
how can i make sure my graph will be look at the beginning ?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…