I am current building an application that graphs streaming data. I can receive and add data points to the chart just fine, but after every point is added, the graph alters its scale to include all the data points automatically(ie. the points get closer together as more are added). How can I turn this off?
Ideally, I would like the graph to simply scroll along the x axis rather than setting the scale each time a point is added. What is the best way to do this?
Here is the code I use for adding a data point as data arrives on the serial port:
chart1.Series["Series1"].Points.AddY(parsed);
The graph is just a default fast line plot. Here are screen captures of the graph plotting data over time. As you can see, it just compresses the graph over time rather than just leaving the scale alone and scrolling to the right.

This will disable auto-scaling:
chart1.ChartAreas[0].AxisY.ScaleBreakStyle.Enabled = false;
chart1.ChartAreas[0].AxisY.Maximum = 0.3;
chart1.ChartAreas[0].AxisY.Minimum = -0.3;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With