plotly.graph_objects.layout.slider package

class plotly.graph_objects.layout.slider.Currentvalue(arg=None, font=None, offset=None, prefix=None, suffix=None, visible=None, xanchor=None, **kwargs)

Bases: plotly.basedatatypes.BaseLayoutHierarchyType

property font

Sets the font of the current value label text.

The ‘font’ property is an instance of Font that may be specified as:

  • An instance of plotly.graph_objects.layout.slider.currentvalue.Font

  • A dict of string/value properties that will be passed to the Font constructor

    Supported dict properties:

    color

    family

    HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren’t available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include “Arial”, “Balto”, “Courier New”, “Droid Sans”,, “Droid Serif”, “Droid Sans Mono”, “Gravitas One”, “Old Standard TT”, “Open Sans”, “Overpass”, “PT Sans Narrow”, “Raleway”, “Times New Roman”.

    size

Returns

Return type

plotly.graph_objects.layout.slider.currentvalue.Font

property offset

The amount of space, in pixels, between the current value label and the slider.

The ‘offset’ property is a number and may be specified as:
  • An int or float

Returns

Return type

int|float

property prefix

When currentvalue.visible is true, this sets the prefix of the label.

The ‘prefix’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property suffix

When currentvalue.visible is true, this sets the suffix of the label.

The ‘suffix’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property visible

Shows the currently-selected value above the slider.

The ‘visible’ property must be specified as a bool (either True, or False)

Returns

Return type

bool

property xanchor

The alignment of the value readout relative to the length of the slider.

The ‘xanchor’ property is an enumeration that may be specified as:
  • One of the following enumeration values:

    [‘left’, ‘center’, ‘right’]

Returns

Return type

Any

class plotly.graph_objects.layout.slider.Font(arg=None, color=None, family=None, size=None, **kwargs)

Bases: plotly.basedatatypes.BaseLayoutHierarchyType

property color
The ‘color’ property is a color and may be specified as:
  • A hex string (e.g. ‘#ff0000’)

  • An rgb/rgba string (e.g. ‘rgb(255,0,0)’)

  • An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)

  • An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)

  • A named CSS color:

    aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, cadetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgrey, darkgreen, darkkhaki, darkmagenta, darkolivegreen, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkslategrey, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dimgrey, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, grey, green, greenyellow, honeydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgrey, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightslategrey, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, rebeccapurple, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, slategrey, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen

Returns

Return type

str

property family

HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren’t available on the system. The Chart Studio Cloud (at https://chart- studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include “Arial”, “Balto”, “Courier New”, “Droid Sans”,, “Droid Serif”, “Droid Sans Mono”, “Gravitas One”, “Old Standard TT”, “Open Sans”, “Overpass”, “PT Sans Narrow”, “Raleway”, “Times New Roman”.

The ‘family’ property is a string and must be specified as:
  • A non-empty string

Returns

Return type

str

property size
The ‘size’ property is a number and may be specified as:
  • An int or float in the interval [1, inf]

Returns

Return type

int|float

class plotly.graph_objects.layout.slider.Pad(arg=None, b=None, l=None, r=None, t=None, **kwargs)

Bases: plotly.basedatatypes.BaseLayoutHierarchyType

property b

The amount of padding (in px) along the bottom of the component.

The ‘b’ property is a number and may be specified as:
  • An int or float

Returns

Return type

int|float

property l

The amount of padding (in px) on the left side of the component.

The ‘l’ property is a number and may be specified as:
  • An int or float

Returns

Return type

int|float

property r

The amount of padding (in px) on the right side of the component.

The ‘r’ property is a number and may be specified as:
  • An int or float

Returns

Return type

int|float

property t

The amount of padding (in px) along the top of the component.

The ‘t’ property is a number and may be specified as:
  • An int or float

Returns

Return type

int|float

class plotly.graph_objects.layout.slider.Step(arg=None, args=None, execute=None, label=None, method=None, name=None, templateitemname=None, value=None, visible=None, **kwargs)

Bases: plotly.basedatatypes.BaseLayoutHierarchyType

property args
Sets the arguments values to be passed to the Plotly method set

in method on slide.

The ‘args’ property is an info array that may be specified as:

  • a list or tuple of up to 3 elements where:

  1. The ‘args[0]’ property accepts values of any type

  2. The ‘args[1]’ property accepts values of any type

  3. The ‘args[2]’ property accepts values of any type

    list

property execute

When true, the API method is executed. When false, all other behaviors are the same and command execution is skipped. This may be useful when hooking into, for example, the plotly_sliderchange method and executing the API command manually without losing the benefit of the slider automatically binding to the state of the plot through the specification of method and args.

The ‘execute’ property must be specified as a bool (either True, or False)

Returns

Return type

bool

property label

Sets the text label to appear on the slider

The ‘label’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property method

Sets the Plotly method to be called when the slider value is changed. If the skip method is used, the API slider will function as normal but will perform no API calls and will not bind automatically to state updates. This may be used to create a component interface and attach to slider events manually via JavaScript.

The ‘method’ property is an enumeration that may be specified as:
  • One of the following enumeration values:

    [‘restyle’, ‘relayout’, ‘animate’, ‘update’, ‘skip’]

Returns

Return type

Any

property 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. 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.

The ‘name’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property templateitemname

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.

The ‘templateitemname’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property value

Sets the value of the slider step, used to refer to the step programatically. Defaults to the slider label if not provided.

The ‘value’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property visible

Determines whether or not this step is included in the slider.

The ‘visible’ property must be specified as a bool (either True, or False)

Returns

Return type

bool

class plotly.graph_objects.layout.slider.Transition(arg=None, duration=None, easing=None, **kwargs)

Bases: plotly.basedatatypes.BaseLayoutHierarchyType

property duration

Sets the duration of the slider transition

The ‘duration’ property is a number and may be specified as:
  • An int or float in the interval [0, inf]

Returns

Return type

int|float

property easing

Sets the easing function of the slider transition

The ‘easing’ property is an enumeration that may be specified as:
  • One of the following enumeration values:

    [‘linear’, ‘quad’, ‘cubic’, ‘sin’, ‘exp’, ‘circle’, ‘elastic’, ‘back’, ‘bounce’, ‘linear-in’, ‘quad-in’, ‘cubic-in’, ‘sin-in’, ‘exp-in’, ‘circle-in’, ‘elastic-in’, ‘back-in’, ‘bounce-in’, ‘linear-out’, ‘quad-out’, ‘cubic-out’, ‘sin-out’, ‘exp-out’, ‘circle-out’, ‘elastic-out’, ‘back-out’, ‘bounce-out’, ‘linear-in-out’, ‘quad-in-out’, ‘cubic-in-out’, ‘sin-in-out’, ‘exp-in-out’, ‘circle-in-out’, ‘elastic-in-out’, ‘back-in-out’, ‘bounce-in-out’]

Returns

Return type

Any