Slider
public struct Slider : Encodable
Undocumented
-
Determines whether or not the slider is visible.
Declaration
Swift
public var visible: Bool? -
Determines which button (by index starting from 0) is considered active.
Declaration
Swift
public var active: Double? -
Undocumented
See moreDeclaration
Swift
public struct Step : Encodable -
Undocumented
Declaration
Swift
public var steps: [Step]? -
Determines whether this slider length is set in units of plot fraction or in *pixels.
Use
lento set the value.Declaration
Swift
public var lengthMode: LengthMode? -
Sets the length of the slider This measure excludes the padding of both ends.
That is, the slider’s length is this length minus the padding on both ends.
Declaration
Swift
public var length: Double? -
Sets the x position (in normalized coordinates) of the slider.
Declaration
Swift
public var x: Double? -
Set the padding of the slider component along each side.
Declaration
Swift
public var padding: Padding? -
Sets the slider’s horizontal position anchor.
This anchor binds the
xposition to the left, center or right of the range selector.Declaration
Swift
public var xAnchor: XAutoAnchor? -
Sets the y position (in normalized coordinates) of the slider.
Declaration
Swift
public var y: Double? -
Sets the slider’s vertical position anchor This anchor binds the
yposition to the top, middle or bottom of the range selector.Declaration
Swift
public var yAnchor: YAutoAnchor? -
Undocumented
See moreDeclaration
Swift
public struct Transition : Encodable -
Undocumented
Declaration
Swift
public var transition: Transition? -
Undocumented
See moreDeclaration
Swift
public struct CurrentValue : Encodable -
Undocumented
Declaration
Swift
public var currentValue: CurrentValue? -
Sets the font of the slider step labels.
Declaration
Swift
public var font: Font? -
Sets the background color of the slider grip while dragging.
Declaration
Swift
public var activeBackgroundColor: Color? -
Sets the background color of the slider.
Declaration
Swift
public var backgroundColor: Color? -
Sets the color of the border enclosing the slider.
Declaration
Swift
public var borderColor: Color? -
Sets the width (in px) of the border enclosing the slider.
Declaration
Swift
public var borderWidth: Double? -
Sets the length in pixels of step tick marks
Declaration
Swift
public var tickLength: Double? -
Sets the color of the border enclosing the slider.
Declaration
Swift
public var tickColor: Color? -
Sets the tick width (in px).
Declaration
Swift
public var tickWidth: Double? -
Sets the length in pixels of minor step tick marks
Declaration
Swift
public var minorTickLength: 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
templateitemnamematching thisnamealongside your modifications (includingvisible: falseorenabled: falseto 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
templateitemnamematching itsname, alongside your modifications (includingvisible: falseorenabled: falseto 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(visible:active: steps: lengthMode: length: x: padding: xAnchor: y: yAnchor: transition: currentValue: font: activeBackgroundColor: backgroundColor: borderColor: borderWidth: tickLength: tickColor: tickWidth: minorTickLength: name: templateItemName: ) Creates
Sliderobject with specified properties.Declaration
Swift
public init(visible: Bool? = nil, active: Double? = nil, steps: [Step]? = nil, lengthMode: LengthMode? = nil, length: Double? = nil, x: Double? = nil, padding: Padding? = nil, xAnchor: XAutoAnchor? = nil, y: Double? = nil, yAnchor: YAutoAnchor? = nil, transition: Transition? = nil, currentValue: CurrentValue? = nil, font: Font? = nil, activeBackgroundColor: Color? = nil, backgroundColor: Color? = nil, borderColor: Color? = nil, borderWidth: Double? = nil, tickLength: Double? = nil, tickColor: Color? = nil, tickWidth: Double? = nil, minorTickLength: Double? = nil, name: String? = nil, templateItemName: String? = nil)Parameters
visibleDetermines whether or not the slider is visible.
activeDetermines which button (by index starting from 0) is considered active.
stepslengthModeDetermines whether this slider length is set in units of plot fraction or in *pixels.
lengthSets the length of the slider This measure excludes the padding of both ends.
xSets the x position (in normalized coordinates) of the slider.
paddingSet the padding of the slider component along each side.
xAnchorSets the slider’s horizontal position anchor.
ySets the y position (in normalized coordinates) of the slider.
yAnchorSets the slider’s vertical position anchor This anchor binds the
yposition to the top, middle or bottom of the range selector.transitioncurrentValuefontSets the font of the slider step labels.
activeBackgroundColorSets the background color of the slider grip while dragging.
backgroundColorSets the background color of the slider.
borderColorSets the color of the border enclosing the slider.
borderWidthSets the width (in px) of the border enclosing the slider.
tickLengthSets the length in pixels of step tick marks
tickColorSets the color of the border enclosing the slider.
tickWidthSets the tick width (in px).
minorTickLengthSets the length in pixels of minor step tick marks
nameWhen used in a template, named items are created in the output figure in addition to any items the figure already has in this array.
templateItemNameUsed to refer to a named item in this array in the template.
View on GitHub
Install in Dash
Slider Structure Reference