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.
Ok, in this case you can try change:
UltraChart1.Axis.X.TickmarkIntervalType = AxisIntervalType.Minutes;
to Hours or Days, so you will reduce the number of the labels.
Apologies if I was not precise.
The chart that is shown is actually a line chart. My requirement is that i should be able to plot 720 points (2 Minutes interval for a day). My data looks like this.
There could be null values as well. The x axis labels should not be visible for every 2 minutes but for every hour. If there is a better chart (Instead of the line chart) to do this, please suggest as well.
You can use a custom axis range, so the chart won’t display the whole data. Try using this code:
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;