numeric_range

class virtualitics_sdk.elements.numeric_range.NumericRangeSlider(min_range, max_range, min_selection=None, max_selection=None, title='', description='', show_title=True, show_description=True, step_size=None)

Bases: NumericRange

A Numeric Range Slider Input Element.

Parameters:
  • min_range (Union[int, float]) – The minimum value for the range.

  • max_range (Union[int, float]) – The maximum value for the range.

  • min_selection (Union[int, float, None]) – The minimum selected value. Defaults to min_range value, defaults to None.

  • max_selection (Union[int, float, None]) – The maximum selected value. Defaults to max_range value, defaults to None.

  • title (str) – The title of the element, defaults to ‘’.

  • description (str) – The element’s description, defaults to ‘’.

  • show_title (bool) – whether to show the title on the page when rendered, defaults to True.

  • show_description (bool) – whether to show the description to the page when rendered, defaults to True.

  • step_size (Union[int, float, None]) – The size of default intervals between the min and max, defaults to None to automatically determine step size.

EXAMPLE:

# Imports
from virtualitics_sdk import NumericRangeSlider
.  .  .
# Example usage
class ExampleStep(Step):
    def run(self, flow_metadata):
        .  .  .
        num_range_slider = NumericRangeSlider(
                                min_range=-2,
                                max_range=17,
                                min_selection=0,
                                max_selection=15,
                                title="Numeric Range Slider",
                                description="This is a numeric range slider between -2 and 17",
                            )
class virtualitics_sdk.elements.numeric_range.NumericSlider(min_range, max_range, selected=None, title='', description='', show_title=True, show_description=True, step_size=None)

Bases: NumericRange

A Numeric Slider Input Element.

Parameters:
  • min_range (Union[int, float]) – The minimum value for the range.

  • max_range (Union[int, float]) – The maximum value for the range.

  • selected (Union[int, float]) – The value to change to set defaults, defaults to None.

  • title (str) – The title of the element, defaults to ‘’.

  • description (str) – The element’s description, defaults to ‘’.

  • show_title (bool) – whether to show the title on the page when rendered, defaults to True.

  • show_description (bool) – whether to show the description to the page when rendered, defaults to True.

  • step_size (Union[int, float, None]) – The size of default intervals between the min and max, defaults to None to automatically determine step size.

EXAMPLE:

# Imports
from virtualitics_sdk import NumericSlider
. . .
# Example usage
class ExampleStep(Step):
    def run(self, flow_metadata):
        . . .
        num_slider = NumericSlider(min_range=0,
                                    max_range=50,
                                    selected=10,
                                    title="Numeric Slider",
                                    description="This is a numeric slider.",
                                )