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
815
NumericXAxis - get X axis labels on even boundary
posted

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.

 

Parents Reply Children
No Data