Automatic Y fit
Use AutoYFit property to control the automatic Y axis adjustment. Automatic Y fit can be used to adjust the Y axis ranges to show all the data in the chart in visible X axis range. It is intended especially for real-time monitoring purposes. The fit is applied in time intervals, use UpdateInterval to set the interval in milliseconds. MarginPercents can be used to define if any empty space should be left between the series and the graph borders. By enabling Through, the fitting analysis is made for all data, but may cause some overhead in performance critical systems. By disabling it, only a small piece of latest data is used for fitting routine and may cause improper behavior in certain applications.
AutoYFit can be enabled via ZoomPanOptions:
_chart.ViewXY.ZoomPanOptions.AutoYFit.Enabled = true;
Which Y-axes are automatically fit should be also defined. With AutoYFit.TargetAllYAxes, automatic Y fit can be applied to every Y-axis simultaneously. Alternatively, yAxis.AllowAutoYFit can be enabled for each Y-axis separately.
// Enable AutoYFit for all Y axis.
_chart.ViewXY.ZoomPanOptions.AutoYFit.TargetAllYAxes = true;
// Enable AutoYFit only for this Y axis.
_chart.ViewXY.YAxes[0].AllowAutoYFit = true;
AxisY class also has Fit() methods for fitting in Y dimension.
Examples of usage could be found in our Demo application (see Learning from Demo): Signal reader; Audio L+R, area, spectrograms; Waveform, persistent spectrum.