LinearGauge#

A LinearGauge represents a value in some range as a position on an linear scale. It is similar to a Dial/Gauge but visually more compact.

Use pn.ui.LinearGauge to create this component.

API#

.. py:class:: LinearGauge(*, bounds, colors, default_color, format, horizontal, nan_format, needle_color, show_boundaries, tick_size, title_size, unfilled_color, value_size, disabled, loading, align, aspect_ratio, css_classes, design, height, height_policy, margin, max_height, max_width, min_height, min_width, sizing_mode, styles, stylesheets, tags, visible, width, width_policy, label, value, name) :module: panel.widgets.indicators

A LinearGauge represents a value in some range as a position on an linear scale. It is similar to a Dial/Gauge but visually more compact.

Reference: https://panel.holoviz.org/reference/indicators/LinearGauge.html

:Example:

LinearGauge(value=30, default_color=’red’, bounds=(0, 100))

:Attributes:

   **colors**
       ..

   **tick_size**
       ..

   **title_size**
       ..

   **value_size**
       ..

.. !! processed by numpydoc !!

Parameter Definitions


Parameters inherited from:

   :class:`panel.widgets.base.WidgetBase`: label

   :class:`panel.viewable.Layoutable`: align, aspect_ratio, css_classes, design, min_width, min_height, max_width, max_height, styles, stylesheets, tags, width_policy, height_policy, visible

   :class:`panel.viewable.Viewable`: loading

   :class:`panel.widgets.base.Widget`: margin, disabled

   :class:`panel.widgets.indicators.Indicator`: sizing_mode

value = Number(allow_None=True, default=25, inclusive_bounds=(True, True), label='Value')

  Value to indicate on the dial a value within the declared bounds.

height = Integer(allow_None=True, bounds=(1, None), default=300, inclusive_bounds=(True, True), label='Height')

    The height of the component (in pixels).  This can be either
    fixed or preferred height, depending on height sizing policy.

width = Integer(allow_None=True, bounds=(1, None), default=125, inclusive_bounds=(True, True), label='Width')

    The width of the component (in pixels). This can be either
    fixed or preferred width, depending on width sizing policy.

bounds = Range(default=(0, 100), inclusive_bounds=(True, True), label='Bounds', length=2)

  The upper and lower bound of the gauge.

default_color = String(default='lightblue', label='Default color')

  Color of the radial annulus if not color thresholds are supplied.

colors = Parameter(allow_None=True, label='Colors')

  Color thresholds for the gauge, specified as a list of tuples
  of the fractional threshold and the color to switch to.

format = String(default='{value:.2f}%', label='Format')

  Formatting string for the value indicator and lower/upper bounds.

horizontal = Boolean(default=False, label='Horizontal')

  Whether to display the linear gauge horizontally.

nan_format = String(default='-', label='Nan format')

  How to format nan values.

needle_color = String(default='black', label='Needle color')

  Color of the gauge needle.

show_boundaries = Boolean(default=False, label='Show boundaries')

  Whether to show the boundaries between colored regions.

unfilled_color = String(default='whitesmoke', label='Unfilled color')

  Color of the unfilled region of the LinearGauge.

title_size = String(allow_None=True, label='Title size')

  Font size of the gauge title.

tick_size = String(allow_None=True, label='Tick size')

  Font size of the gauge tick labels.

value_size = String(allow_None=True, label='Value size')

  Font size of the gauge value label.