Code: Select all
private void ScrollAxis()
{
if (m_plot.XValues.Last >= m_plot.Chart.Axes.Bottom.Maximum
&&
!Helper.IsPainterInStaticMode)
{
double range = m_plot.Chart.Axes.Bottom.Maximum - m_plot.Chart.Axes.Bottom.Minimum;
m_plot.Chart.Axes.Bottom.SetMinMax(m_plot.XValues.Last - range , m_plot.XValues.Last );
m_plot.Chart.Axes.Bottom.IncrementOffset = m_plot.Chart.Axes.Bottom.Increment - m_plot.XValues.Last % m_plot.Chart.Axes.Bottom.Increment;
}
}