BCGControlBar Pro for MFC
void CBCGPChartAxis::SetRightOffsetInPixels ( int  nValuesCount = 0)

Sets offset of last displayed value in pixels for charts in "fixed interval" mode.

Call this method to set offset from the right plot area bound of last displayed value in pixels for charts in "fixed interval" mode.

At the runtime call GetRightOffsetAsNumberOfValues() to determine how many data points fall in this interval (this method takes into account current zoom level).

In this way you can implement automatic scroll in real time charts as following:

Copy
void CChartStockRTView::OnInitialUpdate()
{
.....
pAxisX->SetFixedIntervalWidth(33, 2);
// offset as two intervals
pAxisX->SetRightOffsetInPixels(66);
}
void CChartStockRTView::OnTimer(UINT nIDEvent)
{
....
// if new data is coming and auto scroll is allowed set maximum displayed value to be greater than
// the number of data points by the required offset
pXAxis->SetFixedMaximumDisplayValue(nDataPointCount + pXAxis->GetRightOffsetAsNumberOfValues() - 1);
}
Parameters
nValuesCountSpecifies the offset in pixels.