numeric_range

class virtualitics_sdk.elements.numeric_range.NumericRange(min_range, max_range, min_selection=None, max_selection=None, include_nulls_visible=True, include_nulls_value=False, title='', description='', single=False, show_title=True, show_description=True, label='', placeholder='', step_size=None)

Bases: InputElement

A Numeric Range 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. For single sided sliders, this is the value to change to set defaults.

  • include_nulls_visible (bool) – whether null values will be visible, defaults to True.

  • include_nulls_value (bool) – whether to include null values, defaults to False.

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

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

  • single (bool) – whether this range element is for a single sided slider, defaults to False.

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

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

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

  • 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.elements.numeric_range import NumericRange
. . .
# Example usage
class ExampleStep(Step):
  def run(self, flow_metadata):
    . . . 
    num_range = NumericRange(0, 
                             50, 
                             max_selection=10, 
                             single=True, 
                             label="Slider Value",
                             title="Single Numeric Range", 
                             description="This is a single sided slider.",
                             placeholder='Type a Number', step_size=10)

The above NumericRange will be displayed as:

get_value()

Get the value of an element. If the user has interacted with the value, the default will be updated.