How can we get the X axis labels to line up on an even time interval, such as 5 minute intervals?
The graph includes:
- A numeric X axis - multiple numeric Y axes.- multiple ScatterLineSeries - Series data in an observable collection of datapoints having - Date time - date time of the data point (computed by StartTime + elapsed minutes) - The X axis is bound to this - Elapsed minutes - number of minutes from the start time (double) - Start time - DateTime of the first data point in the series (DateTime) - DataValue - value to display on the chart (double) - The Y axis is bound to this The data points are collected in real time and can come in at any time. The first data point in the series will be on an odd boundary, such as 3:41:20pm, instead of a rounded 3:30:00pm.
What we want is the X axis to start on an even boundary, such as 3:40:00pm and have labels at even intervals, 3:45:00pm, 3:50:00pm, 3:55:00pm...
We cannot use a CategoryDateTimeXAxis because the data points do not fall on even boundaries (i.e., there is no nicely aligned time value to bind the X axis to and the number of data points in a given time interval may vary).
The X axis labels in the middle of the chart are not on even boundaries if you set the X axis minimum or maximum or both.
Is there a way to make the Numeric X axis labels occur on even 5 minute boundaries?
Can this be accomplished by adding a hidden ScatterLineSeries with data points on 5 minute intervals and use that data series as the one the X axis uses for its labels?The numeric X axis should let us set the interval for labels since it appears that Infragistics will arbitrarily map the label to a nearby data point's X value. That mapping does not work well for evenly spacing labels and for a consistent user interface especially when zooming in.
The help has: In NumericXAxis, data is treated as continuously varying numerical labels, and the marker is placed at a point along the X-axis which varies according to the value in a data column that is mapped using the XMemberPath property of Scatter Series.
Jason,
If you are using a sufficiently recent version of the product, you should see properties on the CategoryDateTimeXAxis called MinimumValue and MaximumValue, you can use these to set the start and end of the range of data. These were not included in earlier versions of the product.
-Graham
I have an issue similar to this. I have time data that varies greatly (anywhere from a few minutes to a few years). As such, I have logic that determines the best labeling interval to use. For example, if I have a week of data, I'll be labeling by days, so I'll use an interval of 24 hours. Using the Interval property on the axis works, but the problem that I've run into is that there is no way to set a start value for the labeling; it seems to always start at the axis minimum. If I'm labeling days but the first value is 07/08/2012 11:30PM, I'd like my first label to be located at 07/09/2012 12:00AM. I'm currently using CategoryDateTimeXAxis. Is there a way I can achieve this functionality?
Thanks,
Jason
Hello,
I am checking if this is still an issue for you.
If you require any further assistance please do not hesitate to ask.
Would you please send us an isolated sample application following your scenario in order to provide you with more accurate assistance ?
Looking forward to hearing from you.
We also have a different graph that shows elapsed minutes on the X axis. That would need to break down label intervals into meaningful values (hours, 30 minutes, 15 minutes, 5 minutes, 1 minute, 30 seconds, 15 seconds, 5 seconds, 1 second, 1/2 second, 1/4 second, 1/10 second, 1/50 second, 1/100 second).
Our graphed data has anywhere from a few minutes of data up to 20+ hours of data depending on the data set.