ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  X axis needs to move when data plot reaches view port end
Posted by abhishek.mr on May-23-2018 23:27
Hello,

I have created sample run time chart .I am facing on issue when data plotting reaches to viewport end  the x axis is not moving and also while plotting data if i change system time manually to plus one hour the x axis is not moving to end data plotting area.


Regards,
Abhishek

  Re: X axis needs to move when data plot reaches view port end
Posted by Peter Kwan on May-25-2018 03:52
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