In order to scroll the x-axis the ScrollFrame must auto-scale the related axes, using our own algorithms for the axis tick marks. If you want something other than the default values that we choose you must override the AxisTickMarkTimeBase property between the ScrollFrame's autoscale and the ChartView.UpdateDraw call.
First, turn off the ScrollFrame's AutoRescaleFrame property after you create it, as seen below.
scrollFrame = new RTScrollFrame(this, currentTemperature1, pTransform1, ChartObj.RT_FIXEDEXTENT_MOVINGSTART_AUTOSCROLL);
.
.
.
scrollFrame.AutoRecaleFrame = false;
chartVu.AddChartObject(scrollFrame);
Then, where you call the ChartView.UpdateDraw method, insert a call to
scrollFrame.RescaleFrame(), and explicity set the axis AxisTickMarkTimeBase property. Setting the AxisTickMarkTimeBase property MUST take place betweent the ScrollFrame.RescaleFrame call the the ChartView.UpdateDraw call.
private void timer2_Tick(object sender, System.EventArgs e)
{
if (this.IsDesignMode) return;
scrollFrame.RescaleFrame();
xaxis.AxisTickMarkTimeBase = ChartObj.TIMEAXIS_5SECONDSECOND;
this.UpdateDraw();
}