TagGroup
public struct TagGroup
Groups allow you to construct a query to return data points in specified groups
Groups can be made by providing one or more of the following attribute:
name: Allows data points to be the name of a property of the data point. For example you could group data points by there quality by setting name = quality
rangeSize: Is the number of values to place in a group. For example, a range size of 10 puts measurements between 0-9 in one group, 10-19 in the next group, and so on
groupCount: Defines the maximum number of groups to return. For example if you set the rangeSize to 1 hour and you set the groupCount to 24 than you would get 24 groups each with an hours worth of data points
Example of grouping by quality:
let group = TagGroup
group.name = "quality"
group.rangeSize = 4
group.groupCount = 4
...
The above example would give you 4 groups of quality (Bad, Uncertain, Not Acceptable and Good). The first group would contain all quality values for bad data points, the second group would contain all the data points for uncertain data points and so on.
-
The name of the data sets you want to group by
Declaration
Swift
public var name: String?
-
The range the number values should be placed in. For example, a range size of 10 puts measurements between 0-9 in one group, 10-19 in the next group, and so on
Declaration
Swift
public var rangeSize: String?
-
The number of groups you want to returned
Declaration
Swift
public var groupCount: Int?
-
Constructs an instance of the group
Declaration
Swift
public init(name: String? = nil, rangeSize: String? = nil, groupCount: Int? = nil)