Trend Interval defined in a binding

Interval is a property used in conjunction with analytic trend requests to specify the time window to combine records using the configured Rollup function. The framework handles the Interval property in special ways depending on where you configure it.

Widgets, such as a table or chart use the Analytic Web Bindings function similarly to the way standard Web Chart sampling works, where sampling type is a function like analytic Rollup and the desired period is a window of time like analytic Interval. Consider a NumericPoint with associated history data (an actual history extension or imported from a remote station that has an n:history tag mapping to the imported history), where the history records are coming in at one hour intervals and the value is totalized (ever increasing) by a fixed value of 25 for each record. The point has tags including hs:hisTotalized, hs:energy and a:a marker tags. The px view includes a web widget (analytic web chart) with an Analytic Web Chart Binding:

Figure 43.   WebWidget configured for a NumericPoint
Image

The binding is configured with a Rollup function of Sum and a Time Range of Yesterday, but does not explicitly configure the Interval. Analytics automatically picks a best fit interval based on the time range and available data records. In this case, it uses the raw collection interval of one hour. As expected, the value of each record is 25.

Figure 44.   Chart produced with the default Interval of one hour
Image

Simply changing the Time Range for the chart to Last Week instead of Yesterday results in a different automatic Interval of six hours instead of one hour.

Figure 45.   Chart produced with the default Interval of six hours
Image

In this example, the framework plots records at midnight, 6 am, noon and 6 pm for each day. Each record value is 150, which is the record value of 25 * 6 records in the interval window. This is just one example of how changing the Time Range likely results in different automatic intervals being applied. Explicitly configuring the Interval in the binding takes precedence over these default automatic interval values.

 TIP: To ensure that your trend result is what you expect, always configure the Interval in your binding.