I have several problems when i have a very large number of point on my series in my chart area, the problem is my GUI block, but chart point are ploting perfectly, my progress bar and my timer (elapsed) stop running, but qhen a i resize my form to small resolution, it work perfectly.
(sorry my english first)
I do only this, i dont use graph, add points directly to the seria asigned to the chart
asing serie
chart1.Series.Add(Serie[(int)showfactor]);
adding point
Serie[0].Points.AddXY(_CoordenadaX,_CoordenadaY / 1000);
show point
chart1.Series.SuspendUpdates();
ConfigExperimentos[working].NuevoDato(nuevodato);
chart1.Series.ResumeUpdates();
advice that is a real time app.
private void serialPort_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e){
while (serialPort.BytesToRead >= 14)
{
for (int i = 0; i < 14; i++)
{
buffer[i] = (byte)serialPort.ReadByte();
}
if (buffer[13] == (byte)'F')
{
this.BeginInvoke(new InvokeDelegate(() =>
{
this.Invoke(new EventHandler(DatoRecibido));
}));
}
else
{
while ((charend != (byte)'F') && (serialPort.BytesToRead != 0))
charend = (byte)serialPort.ReadByte();
}
}
}