Attributes

Interpolation Methods

Interpolation is used in trending when determining how - or whether - to plot a line between two consecutive time-series points. It is also used by expressions in scripting when requesting a value for a point in time between the two actual time-series points. Line segments plotted will appear as either stepped (previous, next) or sloped (linear). No line segment is drawn for the ‘none’ interpolation method.

These are the existing interpolation methods:

  • None
    • Only points are shown - no interpolation used
    • System will return NULL if queried for a value between the points
  • Previous
    • Plot a straight horizontal line segment between the two consecutive points using the value of the PREVIOUS point until the next point is available
    • If queried for a value between the points, the system will return the value of the PREVIOUS point
  • Next
    • Plot a straight horizontal line segment between the two consecutive points using the value of the NEXT point
    • If queried for a value between the points, the system will return the value of the NEXT point
  • Linear
    • Plot a straight line segment directly between the two consecutive points
    • If queried for a value between the points, the system will return a calculated value using this formula: 
 value = v1 + (v2 - v1) * (time - t1) / (t2 - t1)
      where,
          t1 and v1 is the time and value, respectively, for the earlier time-series data point
          t2 and v2 is the time and value, respectively, for the later time-series data point
          time is the point on the x-axis representing the clock time between the two actual time-series data points to calculate the value for
          value is the results of the calculation which will be the y-axis value corresponding the time queried

 The chart below illustrates what is meant by the interpolation methods in the system.

interpolation examples

Default interpolation methods by data type

Data Type Interpolation Method Default
boolean none, next, previous PREVIOUS
datetime none, next, previous PREVIOUS
enumeration none, next, previous PREVIOUS
float none, next, previous, linear LINEAR
geopoint none, next, previous PREVIOUS
integer none, next, previous, linear PREVIOUS
interval none, next, previous PREVIOUS
json none, next, previous PREVIOUS
object none, next, previous PREVIOUS
string none, next, previous PREVIOUS

 

Contact Us

ThinkIQ

65 Enterprise
Aliso Viejo, CA  92656
United States

phone: 844-THINKIQ (844)844-6547
email: support@thinkiq.com
websitewww.thinkiq.com