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
len
to 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
x
position 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
y
position 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
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(visible:
active: steps: lengthMode: length: x: padding: xAnchor: y: yAnchor: transition: currentValue: font: activeBackgroundColor: backgroundColor: borderColor: borderWidth: tickLength: tickColor: tickWidth: minorTickLength: name: templateItemName: ) Creates
Slider
object 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
visible
Determines whether or not the slider is visible.
active
Determines which button (by index starting from 0) is considered active.
steps
lengthMode
Determines whether this slider length is set in units of plot fraction or in *pixels.
length
Sets the length of the slider This measure excludes the padding of both ends.
x
Sets the x position (in normalized coordinates) of the slider.
padding
Set the padding of the slider component along each side.
xAnchor
Sets the slider’s horizontal position anchor.
y
Sets the y position (in normalized coordinates) of the slider.
yAnchor
Sets the slider’s vertical position anchor This anchor binds the
y
position to the top, middle or bottom of the range selector.transition
currentValue
font
Sets the font of the slider step labels.
activeBackgroundColor
Sets the background color of the slider grip while dragging.
backgroundColor
Sets the background color of the slider.
borderColor
Sets the color of the border enclosing the slider.
borderWidth
Sets the width (in px) of the border enclosing the slider.
tickLength
Sets the length in pixels of step tick marks
tickColor
Sets the color of the border enclosing the slider.
tickWidth
Sets the tick width (in px).
minorTickLength
Sets the length in pixels of minor step tick marks
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.