Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
350
Need to manually alter the X axis
posted

Hi,

We are implementing a chart wherein we need to display the data for every 2 minutes. The graph we are plotting is 'Time' Vs 'Load'.

We are fine with the Y axis. But the X axis has the time data for one whole day splitted by 2 minutes, e.g. 1:01, 1:03.... 23:01.....

So, it has a total of 720 points (24 x 30). We want to reduce the number of points to 24 e.g. 1:01. 2:01... etc

Is there a way to show only the selected points and hide the others? The chart we are using is 'Ultrachart'.

Please have a look at the X axis in the graph below.

Parents
  • 17605
    posted

    Hi,

    You can use a custom axis range, so the chart won’t display the whole data. Try using this code:

    UltraChart1.Axis.X.TickmarkIntervalType = AxisIntervalType.Minutes;

    UltraChart1.Axis.X.TickmarkInterval = 2;

    UltraChart1.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval;

           

    UltraChart1.Axis.X.RangeMax = DateTime.Now.Ticks;

    UltraChart1.Axis.X.RangeMin = DateTime.Now.AddMinutes(-2 * 24).Ticks;

    UltraChart1.Axis.X.RangeType = AxisRangeType.Custom;

Reply Children