GroupBy
public struct GroupBy : Transform
Specification of groupby operation on trace data.
-
Determines whether this group-by transform is enabled or disabled.
Declaration
Swift
public var enabled: Bool?
-
Sets the groups in which the trace data will be split.
For example, with
x
set to [1, 2, 3, 4] andgroups
set to [‘a’, ‘b’, ‘a’, ‘b’], the groupby transform with split in one trace withx
[1, 3] and one trace withx
[2, 4].Declaration
Swift
public var groups: [Double]?
-
Pattern by which grouped traces are named.
If only one trace is present, defaults to the group name (
"%{group}"
), otherwise defaults to the group name with trace name ("%{group} (%{trace})"
). Available escape sequences are%{group}
, which inserts the group name, and%{trace}
, which inserts the trace name. If grouping GDP data by country when more than one trace is present, for example, the default “%{group} (%{trace})” would return “Monaco (GDP per capita)”.Declaration
Swift
public var nameFormat: String?
-
Undocumented
See moreDeclaration
Swift
public struct Style : Encodable
-
Undocumented
Declaration
Swift
public var styles: [Style]?
-
Creates
GroupBy
object with specified properties.Declaration
Swift
public init(enabled: Bool? = nil, groups: [Double]? = nil, nameFormat: String? = nil, styles: [Style]? = nil)
Parameters
enabled
Determines whether this group-by transform is enabled or disabled.
groups
Sets the groups in which the trace data will be split.
nameFormat
Pattern by which grouped traces are named.
styles