Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
179
Any way to suspend chart updates while adding several rows or points to chart
posted

I have an application that generates a lot of data at 60 Hz and I have used a timer to update the chart at a periodic rate.  I'd like to show maybe the last hour of data on a chart, but I understand the chart slows down after say 10,000 pts.  One thing I would like to do is add points in a batch, but not have the chart update after every point is added.  Is there any way to turn off the updates, add points to the series, then cause a refresh to occur.  This is what I am currently doing in my timer_Tick() function:

 

 

 

 

 

 

 

 

private void timer1_Tick(object sender, EventArgs e)

{

 

 

NumericTimeSeries series = this.ultraChart1.Series[0] as NumericTimeSeries;

 

 

while (this.dataListX[index].CompareTo(DateTime.Now) < 1)

{

 

 

NumericTimeDataPoint dataPoint = new NumericTimeDataPoint(this.dataListX[index], this.dataListY[index], this.dataListX[index].ToString(), false);

series.Points.Add(dataPoint);

index++;

}

 

 

this.ultraChart1.Axis.X.TickmarkInterval = series.Points.Count / maxLabels;

}