Dial#
A Dial represents a value in some range as a position on an annular dial. It is similar to a Gauge but more minimal visually.
Use pn.ui.Dial to create this component.
API#
.. py:class:: Dial(*, annulus_width, background, bounds, colors, default_color, end_angle, format, label_color, nan_format, needle_color, needle_width, start_angle, 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 Dial represents a value in some range as a position on an
annular dial. It is similar to a Gauge but more minimal
visually.
Reference: https://panel.holoviz.org/reference/indicators/Dial.html
:Example:
Dial(label=’Speed’, value=79, format=”{value} km/h”, bounds=(0, 200), colors=[(0.4, ‘green’), (1, ‘red’)])
:Attributes:
**background**
..
**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=250, 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=250, 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.
annulus_width = Number(default=0.2, inclusive_bounds=(True, True), label='Annulus width')
Width of the radial annulus as a fraction of the total.
background = Parameter(allow_None=True, label='Background')
Background color of the component.
bounds = Range(default=(0, 100), inclusive_bounds=(True, True), label='Bounds', length=2)
The upper and lower bound of the dial.
colors = List(allow_None=True, bounds=(0, None), item_type=<class 'tuple'>, label='Colors')
Color thresholds for the Dial, specified as a list of tuples
of the fractional threshold and the color to switch to.
default_color = String(default='lightblue', label='Default color')
Color of the radial annulus if not color thresholds are supplied.
end_angle = Number(default=25, inclusive_bounds=(True, True), label='End angle')
Angle at which the dial ends.
format = String(default='{value}%', label='Format')
Formatting string for the value indicator and lower/upper bounds.
label_color = String(default='black', label='Label color')
Color for all extraneous labels.
nan_format = String(default='-', label='Nan format')
How to format nan values.
needle_color = String(default='black', label='Needle color')
Color of the Dial needle.
needle_width = Number(default=0.1, inclusive_bounds=(True, True), label='Needle width')
Radial width of the needle.
start_angle = Number(default=-205, inclusive_bounds=(True, True), label='Start angle')
Angle at which the dial starts.
tick_size = String(allow_None=True, label='Tick size')
Font size of the Dial min/max labels.
title_size = String(allow_None=True, label='Title size')
Font size of the Dial title.
unfilled_color = String(default='whitesmoke', label='Unfilled color')
Color of the unfilled region of the Dial.
value_size = String(allow_None=True, label='Value size')
Font size of the Dial value label.