shapelets.apps.DataApp.metric#

DataApp.metric(title: Optional[str] = None, value: Optional[str] = None, unit: Optional[str] = None, delta: Optional[str] = None, align: Optional[Literal['right', 'left']] = None, **additional) MetricWidget#

Creates a Metric.

Parameters:
titlestr, optional

Text associated to the metric widget.

valuestr, optional

Param to indicate the value of the widget

unitstr, optional

Unit of the widget

deltastr, optional

Delta of the metric

alignstr, optional

Select how the metric is aligned vertically: right or left.

Returns:
Metric.

Examples

>>> metric = app.metric(title='Title', value="2023,46", unit="$", delta="+20,25", align="right")

Bind compatibility

You can bind this widget with this:

Bindable as

You can bind this widget as:

  • str

  • int

  • float