Add a trend

Configure the source of the data to display in the Trend object. Add a pen for each data point you want drawn on the trend chart.
  1. In
    Project view
    , right-click a node to contain the
    Trend
    object and select
    New
    Data controls
    Trend
    .
  2. In
    Properties
    , create a dynamic link between
    Model
    and a node or database from which you want to obtain the data.
    For more information about dynamic links, see Create dynamic links.
    TIP: To quickly configure the trend and trend pens for data logger data, from
    Project view
    , drop a data logger onto the trend in the editor. You can also drop the data logger onto the trend
    Model
    in
    Properties
    .
  3. (optional) Configure the trend properties:
    • Query
      . An SQL query that filters the data. For more information about queries, see SQL query.
    • Refresh time
      . Sampling time.
    • Reference time zone
      . Time zone of the date and time on the X-axis.
  4. Under
    Pens
    , associate
    TrendPen
    #
    with the pen data source.
    Data type
    Data source
    Real time values of a specific variable
    A dynamic link to a variable.
    Real time values sampled by a data logger
    A dynamic link to the
    Last value
    property of a Data logger.
    Historic values of variables stored in a database
    The name of the column of interest in a Database.
    Do not create a dynamic link to the column of interest in the Database. Provide the name of the column instead.
  5. (optional) Add a Y-axis by right-clicking a
    TrendPen
    and selecting
    YAxis
    .
    TIP: Adding more Y-axes to trend pens is useful for visualiz ing the same data in different scales. Control the scale by setting
    Maximum value
    and
    Minimum value
    properties.
  6. (optional) Configure the X-axis properties:
    • Interactive
      . If
      True
      , makes the X-axis interactive at runtime.
    • Date and time
      . Date and time that displays in the X-axis at runtime. Defaults to the current time.
    • Follow
      . If
      True
      , scrolls the X-axis automatically as time progresses at runtime.
    • Time window
      . Time interval shown by the trend (in milliseconds).
  7. (optional) Configure the Y-axes properties:
    • Automatic scaling
      . If
      True
      , scales the Y-axis at runtime based on the minimum and maximum values.
    • Interactive
      . If
      True
      , makes the Y-axis interactive.
    • Minimum value
      . Minimum value displayed on the Y-axis.
    • Maximum value
      . Maximum value displayed on the Y-axis.
  8. (optional) To add a pen, next to
    Pens
    , select
    Add
    and repeat 4.
  9. (optional) Associate the
    Refresh
    method of the
    Trend
    object with an event.
    For example, associate the
    Refresh
    method with the
    MouseClick event
    of a
    Button
    object.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.