Hi Abhishek,
In ChartDirector, the x-axis scale is controlled by your code. The x-axis scale will move only if your code move it. In all of the real-time chart examples that come with ChartDirector, there are code to move the x-axis scale when the data reaches the viewport end.
For example, in the "Realtime Chart with Zooming and Scrolling" sample code, there are the following lines which moves the x-axis scale if the user can see the viewport end and the data reaches the viewport end.
// Update the full range to reflect the actual duration of the data. In this case,
// if the view port is viewing the latest data, we will scroll the view port as new
// data are added. If the view port is viewing historical data, we would keep the
// axis scale unchanged to keep the chart stable.
int updateType = Chart.ScrollWithMax;
if (viewer.ViewPortLeft + viewer.ViewPortWidth < 0.999)
updateType = Chart.KeepVisibleRange;
bool axisScaleHasChanged = viewer.updateFullRangeH("x", startDate, endDate, updateType);
If you think the x-axis scale is not changing, please try to trace your code to see if it does change the x-axis scale.
Regards
Peter Kwan |