Button

public struct Button : Encodable

Sets the specifications for each buttons.

By default, a range selector comes with no buttons.

  • Determines whether or not this button is visible.

    Declaration

    Swift

    public var visible: Bool?
  • The unit of measurement that the count value will set the range by.

    See more

    Declaration

    Swift

    public enum Step : String, Encodable
  • The unit of measurement that the count value will set the range by.

    Declaration

    Swift

    public var step: Step?
  • Sets the range update mode.

    If backward, the range update shifts the start of range back count times step milliseconds. If todate, the range update shifts the start of range back to the first timestamp from count times step milliseconds back. For example, with step set to year and count set to 1 the range update shifts the start of the range back to January 01 of the current year. Month and year todate are currently available only for the built-in (Gregorian) calendar.

    See more

    Declaration

    Swift

    public enum StepMode : String, Encodable
  • Sets the range update mode.

    If backward, the range update shifts the start of range back count times step milliseconds. If todate, the range update shifts the start of range back to the first timestamp from count times step milliseconds back. For example, with step set to year and count set to 1 the range update shifts the start of the range back to January 01 of the current year. Month and year todate are currently available only for the built-in (Gregorian) calendar.

    Declaration

    Swift

    public var stepMode: StepMode?
  • Sets the number of steps to take to update the range.

    Use with step to specify the update interval.

    Declaration

    Swift

    public var count: Double?
  • Sets the text label to appear on the button.

    Declaration

    Swift

    public var label: String?
  • 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 this name alongside your modifications (including visible: false or enabled: 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 its name, alongside your modifications (including visible: false or enabled: false to hide it). If there is no template or no matching item, this item will be hidden unless you explicitly show it with visible: true.

    Declaration

    Swift

    public var templateItemName: String?
  • Creates Button object with specified properties.

    Declaration

    Swift

    public init(visible: Bool? = nil, step: Step? = nil, stepMode: StepMode? = nil, count: Double? =
            nil, label: String? = nil, name: String? = nil, templateItemName: String? = nil)

    Parameters

    visible

    Determines whether or not this button is visible.

    step

    The unit of measurement that the count value will set the range by.

    stepMode

    Sets the range update mode.

    count

    Sets the number of steps to take to update the range.

    label

    Sets the text label to appear on the button.

    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.