Dimension
public struct Dimension : Encodable
The dimensions (variables) of the parallel coordinates chart.
2..60 dimensions are supported.
-
The shown name of the dimension.
Declaration
Swift
public var label: String?
-
Sets the values at which ticks on this axis appear.
Declaration
Swift
public var tickValues: [Double]?
-
Sets the text displayed at the ticks position via
tickvals
.Declaration
Swift
public var tickText: [Double]?
-
Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python.
For numbers, see: https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format And for dates see: https://github.com/d3/d3-time-format#locale_format We add one item to d3’s date formatter: %{n}f for fractional seconds with n digits. For example, 2016-10-13 09:15:23.456 with tickformat %H~%M~%S.%2f would display 09~15~23.46
Declaration
Swift
public var tickFormat: String?
-
Shows the dimension when set to
true
(the default).Hides the dimension for
false
.Declaration
Swift
public var visible: Bool?
-
The domain range to which the filter on the dimension is constrained.
Must be an array of
[fromValue, toValue]
withfromValue <= toValue
, or ifmultiselect
is not disabled, you may give an array of arrays, where each inner array is[fromValue, toValue]
.Declaration
Swift
public var constraintRange: InfoArray?
-
Do we allow multiple selection ranges or just a single range?
Declaration
Swift
public var multiSelect: Bool?
-
Dimension values.
values[n]
represents the value of then
th point in the dataset, therefore thevalues
vector for all dimensions must be the same (longer vectors will be truncated). Each value must be a finite number.Declaration
Swift
public var values: [Double]?
-
When used in a template, named items are created in the output figure in addition to any items the figure already has in this array.
You can modify these items in the output figure by making your own item with
templateitemname
matching thisname
alongside your modifications (includingvisible: false
orenabled: false
to hide it). Has no effect outside of a template.Declaration
Swift
public var name: String?
-
Used to refer to a named item in this array in the template.
Named items from the template will be created even without a matching item in the input figure, but you can modify one by making an item with
templateitemname
matching itsname
, alongside your modifications (includingvisible: false
orenabled: false
to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it withvisible: true
.Declaration
Swift
public var templateItemName: String?
-
init(label:
tickValues: tickText: tickFormat: visible: range: constraintRange: multiSelect: values: name: templateItemName: ) Creates
Dimension
object with specified properties.Declaration
Swift
public init(label: String? = nil, tickValues: [Double]? = nil, tickText: [Double]? = nil, tickFormat: String? = nil, visible: Bool? = nil, range: InfoArray? = nil, constraintRange: InfoArray? = nil, multiSelect: Bool? = nil, values: [Double]? = nil, name: String? = nil, templateItemName: String? = nil)
Parameters
label
The shown name of the dimension.
tickValues
Sets the values at which ticks on this axis appear.
tickText
Sets the text displayed at the ticks position via
tickvals
.tickFormat
Sets the tick label formatting rule using d3 formatting mini-languages which are very similar to those in Python.
visible
Shows the dimension when set to
true
(the default).range
The domain range that represents the full, shown axis extent.
constraintRange
The domain range to which the filter on the dimension is constrained.
multiSelect
Do we allow multiple selection ranges or just a single range?
values
Dimension values.
name
When used in a template, named items are created in the output figure in addition to any items the figure already has in this array.
templateItemName
Used to refer to a named item in this array in the template.