Hello,
I have a line chart that is taking in data from a serial port and plotting it in as close to real time as I can get. Right now I am saving 1000 values to a DataGridView chart and once the data reaches the 1000th value, it starts overwriting the oldest data first. I can stop the chart plotting and receive the row number in the DataGridView where the data has left off. Once the charting is stopped I set the HScrollmax to the row number and the HScrollmin to the next row (which is the oldest value saved). I am plotting 400 values at a time, so what I would like to be able to do is click the left arrow on the scrollbar and scroll through the DataGridView data, shifting back one row on each click of the arrow until I have gone through the 1000 saved values. Could anyone help with this idea? I have tried this a few ways and one issue is when the row number stops on a row less than 400, because I am plotting 400 values it has a data out of range type error. I need to be able to jump back to the 1000th row after I reach row 0.
I have a line chart that is taking in data from a serial port and plotting it in as close to real time as I can get. Right now I am saving 1000 values to a DataGridView chart and once the data reaches the 1000th value, it starts overwriting the oldest data first. I can stop the chart plotting and receive the row number in the DataGridView where the data has left off. Once the charting is stopped I set the HScrollmax to the row number and the HScrollmin to the next row (which is the oldest value saved). I am plotting 400 values at a time, so what I would like to be able to do is click the left arrow on the scrollbar and scroll through the DataGridView data, shifting back one row on each click of the arrow until I have gone through the 1000 saved values. Could anyone help with this idea? I have tried this a few ways and one issue is when the row number stops on a row less than 400, because I am plotting 400 values it has a data out of range type error. I need to be able to jump back to the 1000th row after I reach row 0.