Dimension
public struct Dimension : Encodable
The dimensions (variables) of the parallel categories diagram.
-
The shown name of the dimension.
Declaration
Swift
public var label: String? -
Specifies the ordering logic for the categories in the dimension.
By default, plotly uses trace, which specifies the order that is present in the data supplied. Set
categoryorderto category ascending or category descending if order should be determined by the alphanumerical order of the category names. Setcategoryorderto array to derive the ordering from the attributecategoryarray. If a category is not found in thecategoryarrayarray, the sorting behavior for that attribute will be identical to the trace mode. The unspecified categories will follow the categories incategoryarray.Declaration
Swift
public var categoryOrder: CarpetCategoryOrder? -
Sets the order in which categories in this dimension appear.
Only has an effect if
categoryorderis set to array. Used withcategoryorder.Declaration
Swift
public var categoryArray: [Double]? -
Sets alternative tick labels for the categories in this dimension.
Only has an effect if
categoryorderis set to array. Should be an array the same length ascategoryarrayUsed withcategoryorder.Declaration
Swift
public var tickText: [Double]? -
Dimension values.
values[n]represents the category value of thenth point in the dataset, therefore thevaluesvector for all dimensions must be the same (longer vectors will be truncated).Declaration
Swift
public var values: [Double]? -
The display index of dimension, from left to right, zero indexed, defaults to dimension index.
Declaration
Swift
public var displayIndex: Int? -
Shows the dimension when set to
true(the default).Hides the dimension for
false.Declaration
Swift
public var visible: Bool? -
Creates
Dimensionobject with specified properties.Declaration
Swift
public init(label: String? = nil, categoryOrder: CarpetCategoryOrder? = nil, categoryArray: [Double]? = nil, tickText: [Double]? = nil, values: [Double]? = nil, displayIndex: Int? = nil, visible: Bool? = nil)Parameters
labelThe shown name of the dimension.
categoryOrderSpecifies the ordering logic for the categories in the dimension.
categoryArraySets the order in which categories in this dimension appear.
tickTextSets alternative tick labels for the categories in this dimension.
valuesDimension values.
displayIndexThe display index of dimension, from left to right, zero indexed, defaults to dimension index.
visibleShows the dimension when set to
true(the default).
View on GitHub
Install in Dash
Dimension Structure Reference