AFValues.PlotValues Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Namespace: OSIsoft.AF.Asset
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public AFValues PlotValues( AFTimeRange timeRange, int intervals )
Public Function PlotValues ( timeRange As AFTimeRange, intervals As Integer ) As AFValues Dim instance As AFValues Dim timeRange As AFTimeRange Dim intervals As Integer Dim returnValue As AFValues returnValue = instance.PlotValues(timeRange, intervals)
public: AFValues^ PlotValues( AFTimeRange timeRange, int intervals )
member PlotValues : timeRange : AFTimeRange * intervals : int -> AFValues
Parameters
- timeRange
- Type: OSIsoft.AF.TimeAFTimeRange
The bounding time range for the plot values request. - intervals
- Type: SystemInt32
The number of intervals to plot over. Typically, this would be the number of horizontal pixels in a horizontal trend.
Return Value
Type: AFValuesReturns an AFValues collection with values that will produce the most accurate plot over the time range while minimizing the amount of data returned.
Exceptions
Remarks
This method is a client side calculation on the AFValues collection previously retrieved.
For each interval, the data available is examined and significant values are returned. Each interval can produce up to 5 values if they are unique, the first value in the interval, the last value, the highest value, the lowest value and at most one exceptional value (bad status or digital state).
For performance reason, this method assumes that events (timestamp) in AFValues are in order (monotonic), either in forward or reverse direction. The user can programmatically utilize the default extension method to AFValues if the events are not in order.