ColorAxis
public final class ColorAxis : Encodable, SubplotAxis
Undocumented
-
Unique identifier of the axis.
Declaration
Swift
public var uid: UInt -
Determines whether or not the color domain is computed with respect to the input data (here corresponding trace color array(s)) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.Declaration
Swift
public var cAuto: Bool? -
Sets the lower bound of the color domain.
Value should have the same units as corresponding trace color array(s) and if set,
cmaxmust be set as well.Declaration
Swift
public var cMin: Double? -
Sets the upper bound of the color domain.
Value should have the same units as corresponding trace color array(s) and if set,
cminmust be set as well.Declaration
Swift
public var cMax: Double? -
Sets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point.Value should have the same units as corresponding trace color array(s). Has no effect when
cautoisfalse.Declaration
Swift
public var cMiddle: Double? -
Sets the colorscale.
The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example,
[[0, 'rgb(0,0,255)'], [1, 'rgb(255,0,0)']]. To control the bounds of the colorscale in color space, usecminandcmax. Alternatively,colorscalemay be a palette name string of the following list: Greys,YlGnBu,Greens,YlOrRd,Bluered,RdBu,Reds,Blues,Picnic,Rainbow,Portland,Jet,Hot,Blackbody,Earth,Electric,Viridis,Cividis.Declaration
Swift
public var colorScale: ColorScale? -
Determines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale.In case
colorscaleis unspecified orautocolorscaleis true, the default palette will be chosen according to whether numbers in thecolorarray are all positive, all negative or mixed.Declaration
Swift
public var autoColorScale: Bool? -
Reverses the color mapping if true.
If true,
cminwill correspond to the last color in the array andcmaxwill correspond to the first color.Declaration
Swift
public var reverseScale: Bool? -
Determines whether or not a colorbar is displayed for this trace.
Declaration
Swift
public var showScale: Bool? -
Undocumented
Declaration
Swift
public var colorBar: ColorBar? -
Shared and preset default axis reference used to initialize layout and all traces.
Declaration
Swift
public static let preset: ColorAxis -
Creates
ColorAxisobject with specified properties.Declaration
Swift
public init(uid: UInt = UInt.random(in: 2...UInt.max), cAuto: Bool? = nil, cMin: Double? = nil, cMax: Double? = nil, cMiddle: Double? = nil, colorScale: ColorScale? = nil, autoColorScale: Bool? = nil, reverseScale: Bool? = nil, showScale: Bool? = nil, colorBar: ColorBar? = nil)Parameters
uidUnique identifier of the axis.
cAutoDetermines whether or not the color domain is computed with respect to the input data (here corresponding trace color array(s)) or the bounds set in
cminandcmaxDefaults tofalsewhencminandcmaxare set by the user.cMinSets the lower bound of the color domain.
cMaxSets the upper bound of the color domain.
cMiddleSets the mid-point of the color domain by scaling
cminand/orcmaxto be equidistant to this point.colorScaleSets the colorscale.
autoColorScaleDetermines whether the colorscale is a default palette (
autocolorscale: true) or the palette determined bycolorscale.reverseScaleReverses the color mapping if true.
showScaleDetermines whether or not a colorbar is displayed for this trace.
colorBar
View on GitHub
Install in Dash
ColorAxis Class Reference