plotly.graph_objects.Indicator

class plotly.graph_objects.Indicator(arg=None, align=None, customdata=None, customdatasrc=None, delta=None, domain=None, gauge=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, mode=None, name=None, number=None, stream=None, title=None, uid=None, uirevision=None, value=None, visible=None, **kwargs)
__init__(arg=None, align=None, customdata=None, customdatasrc=None, delta=None, domain=None, gauge=None, ids=None, idssrc=None, legend=None, legendgrouptitle=None, legendrank=None, legendwidth=None, meta=None, metasrc=None, mode=None, name=None, number=None, stream=None, title=None, uid=None, uirevision=None, value=None, visible=None, **kwargs)

Construct a new Indicator object

An indicator is used to visualize a single value along with some contextual information such as steps or a threshold, using a combination of three visual elements: a number, a delta, and/or a gauge. Deltas are taken with respect to a reference. Gauges can be either angular or bullet (aka linear) gauges.

Parameters
  • arg – dict of properties compatible with this constructor or an instance of plotly.graph_objects.Indicator

  • align – Sets the horizontal alignment of the text within the box. Note that this attribute has no effect if an angular gauge is displayed: in this case, it is always centered

  • customdata – Assigns extra data each datum. This may be useful when listening to hover, click and selection events. Note that, “scatter” traces also appends customdata items in the markers DOM elements

  • customdatasrc – Sets the source reference on Chart Studio Cloud for customdata.

  • deltaplotly.graph_objects.indicator.Delta instance or dict with compatible properties

  • domainplotly.graph_objects.indicator.Domain instance or dict with compatible properties

  • gauge – The gauge of the Indicator plot.

  • ids – Assigns id labels to each datum. These ids for object constancy of data points during animation. Should be an array of strings, not numbers or any other type.

  • idssrc – Sets the source reference on Chart Studio Cloud for ids.

  • legend – Sets the reference to a legend to show this trace in. References to these legends are “legend”, “legend2”, “legend3”, etc. Settings for these legends are set in the layout, under layout.legend, layout.legend2, etc.

  • legendgrouptitle – :class:`plotly.graph_objects.indicator.Legendgrouptitle ` instance or dict with compatible properties

  • legendrank – Sets the legend rank for this trace. Items and groups with smaller ranks are presented on top/left side while with “reversed” legend.traceorder they are on bottom/right side. The default legendrank is 1000, so that you can use ranks less than 1000 to place certain items before all unranked items, and ranks greater than 1000 to go after all unranked items. When having unranked or equal rank items shapes would be displayed after traces i.e. according to their order in data and layout.

  • legendwidth – Sets the width (in px or fraction) of the legend for this trace.

  • meta – Assigns extra meta information associated with this trace that can be used in various text attributes. Attributes such as trace name, graph, axis and colorbar title.text, annotation text rangeselector, updatemenues and sliders label text all support meta. To access the trace meta values in an attribute in the same trace, simply use %{meta[i]} where i is the index or key of the meta item in question. To access trace meta in layout attributes, use %{data[n[.meta[i]} where i is the index or key of the meta and n is the trace index.

  • metasrc – Sets the source reference on Chart Studio Cloud for meta.

  • mode – Determines how the value is displayed on the graph. number displays the value numerically in text. delta displays the difference to a reference value in text. Finally, gauge displays the value graphically on an axis.

  • name – Sets the trace name. The trace name appears as the legend item and on hover.

  • numberplotly.graph_objects.indicator.Number instance or dict with compatible properties

  • streamplotly.graph_objects.indicator.Stream instance or dict with compatible properties

  • titleplotly.graph_objects.indicator.Title instance or dict with compatible properties

  • uid – Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.

  • uirevision – Controls persistence of some user-driven changes to the trace: constraintrange in parcoords traces, as well as some editable: true modifications such as name and colorbar.title. Defaults to layout.uirevision. Note that other user-driven trace attribute changes are controlled by layout attributes: trace.visible is controlled by layout.legend.uirevision, selectedpoints is controlled by layout.selectionrevision, and colorbar.(x|y) (accessible with config: {editable: true}) is controlled by layout.editrevision. Trace changes are tracked by uid, which only falls back on trace index if no uid is provided. So if your app can add/remove traces before the end of the data array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a uid that stays with it as it moves.

  • value – Sets the number to be displayed.

  • visible – Determines whether or not this trace is visible. If “legendonly”, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).

Returns

Return type

Indicator

plotly.graph_objects.indicator

plotly.graph_objects.indicator

class plotly.graph_objects.indicator.Delta(arg=None, decreasing=None, font=None, increasing=None, position=None, prefix=None, reference=None, relative=None, suffix=None, valueformat=None, **kwargs)
property decreasing

The ‘decreasing’ property is an instance of Decreasing that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.delta.Decreasing

property font

Set the font used to display the delta

The ‘font’ property is an instance of Font that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.delta.Font

property increasing

The ‘increasing’ property is an instance of Increasing that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.delta.Increasing

property position

Sets the position of delta with respect to the number.

The ‘position’ property is an enumeration that may be specified as:
  • One of the following enumeration values:

    [‘top’, ‘bottom’, ‘left’, ‘right’]

Returns

Return type

Any

property prefix

Sets a prefix appearing before the delta.

The ‘prefix’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property reference

Sets the reference value to compute the delta. By default, it is set to the current value.

The ‘reference’ property is a number and may be specified as:
  • An int or float

Returns

Return type

int|float

property relative

Show relative change

The ‘relative’ property must be specified as a bool (either True, or False)

Returns

Return type

bool

property suffix

Sets a suffix appearing next to the delta.

The ‘suffix’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property valueformat

Sets the value formatting rule using d3 formatting mini- languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.

The ‘valueformat’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

class plotly.graph_objects.indicator.Domain(arg=None, column=None, row=None, x=None, y=None, **kwargs)
property column

If there is a layout grid, use the domain for this column in the grid for this indicator trace .

The ‘column’ property is a integer and may be specified as:
  • An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]

Returns

Return type

int

property row

If there is a layout grid, use the domain for this row in the grid for this indicator trace .

The ‘row’ property is a integer and may be specified as:
  • An int (or float that will be cast to an int) in the interval [0, 9223372036854775807]

Returns

Return type

int

property x
Sets the horizontal domain of this indicator trace (in plot

fraction).

The ‘x’ property is an info array that may be specified as:

  • a list or tuple of 2 elements where:

  1. The ‘x[0]’ property is a number and may be specified as:
    • An int or float in the interval [0, 1]

  2. The ‘x[1]’ property is a number and may be specified as:
    • An int or float in the interval [0, 1]

    list

property y
Sets the vertical domain of this indicator trace (in plot

fraction).

The ‘y’ property is an info array that may be specified as:

  • a list or tuple of 2 elements where:

  1. The ‘y[0]’ property is a number and may be specified as:
    • An int or float in the interval [0, 1]

  2. The ‘y[1]’ property is a number and may be specified as:
    • An int or float in the interval [0, 1]

    list

class plotly.graph_objects.indicator.Gauge(arg=None, axis=None, bar=None, bgcolor=None, bordercolor=None, borderwidth=None, shape=None, steps=None, stepdefaults=None, threshold=None, **kwargs)
property axis

The ‘axis’ property is an instance of Axis that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.gauge.Axis

property bar

Set the appearance of the gauge’s value

The ‘bar’ property is an instance of Bar that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.gauge.Bar

property bgcolor

Sets the gauge background color.

The ‘bgcolor’ property is a color and may be specified as:
  • A hex string (e.g. ‘#ff0000’)

  • An rgb/rgba string (e.g. ‘rgb(255,0,0)’)

  • An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)

  • An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)

  • A named CSS color: see https://plotly.com/python/css-colors/ for a list

Returns

Return type

str

property bordercolor

Sets the color of the border enclosing the gauge.

The ‘bordercolor’ property is a color and may be specified as:
  • A hex string (e.g. ‘#ff0000’)

  • An rgb/rgba string (e.g. ‘rgb(255,0,0)’)

  • An hsl/hsla string (e.g. ‘hsl(0,100%,50%)’)

  • An hsv/hsva string (e.g. ‘hsv(0,100%,100%)’)

  • A named CSS color: see https://plotly.com/python/css-colors/ for a list

Returns

Return type

str

property borderwidth

Sets the width (in px) of the border enclosing the gauge.

The ‘borderwidth’ property is a number and may be specified as:
  • An int or float in the interval [0, inf]

Returns

Return type

int|float

property shape

Set the shape of the gauge

The ‘shape’ property is an enumeration that may be specified as:
  • One of the following enumeration values:

    [‘angular’, ‘bullet’]

Returns

Return type

Any

property stepdefaults

When used in a template (as layout.template.data.indicator.gauge.stepdefaults), sets the default property values to use for elements of indicator.gauge.steps

The ‘stepdefaults’ property is an instance of Step that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.gauge.Step

property steps

The ‘steps’ property is a tuple of instances of Step that may be specified as:

  • A list or tuple of instances of plotly.graph_objects.indicator.gauge.Step

  • A list or tuple of dicts of string/value properties that will be passed to the Step constructor

Returns

Return type

tuple[plotly.graph_objects.indicator.gauge.Step]

property threshold

The ‘threshold’ property is an instance of Threshold that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.gauge.Threshold

class plotly.graph_objects.indicator.Legendgrouptitle(arg=None, font=None, text=None, **kwargs)
property font

Sets this legend group’s title font.

The ‘font’ property is an instance of Font that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.legendgrouptitle.Font

property text

Sets the title of the legend group.

The ‘text’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

class plotly.graph_objects.indicator.Number(arg=None, font=None, prefix=None, suffix=None, valueformat=None, **kwargs)
property font

Set the font used to display main number

The ‘font’ property is an instance of Font that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.number.Font

property prefix

Sets a prefix appearing before the number.

The ‘prefix’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property suffix

Sets a suffix appearing next to the number.

The ‘suffix’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

property valueformat

Sets the value formatting rule using d3 formatting mini- languages which are very similar to those in Python. For numbers, see: https://github.com/d3/d3-format/tree/v1.4.5#d3-format.

The ‘valueformat’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str

class plotly.graph_objects.indicator.Stream(arg=None, maxpoints=None, token=None, **kwargs)
property maxpoints

Sets the maximum number of points to keep on the plots from an incoming stream. If maxpoints is set to 50, only the newest 50 points will be displayed on the plot.

The ‘maxpoints’ property is a number and may be specified as:
  • An int or float in the interval [0, 10000]

Returns

Return type

int|float

property token

The stream id number links a data trace on a plot with a stream. See https://chart-studio.plotly.com/settings for more details.

The ‘token’ property is a string and must be specified as:
  • A non-empty string

Returns

Return type

str

class plotly.graph_objects.indicator.Title(arg=None, align=None, font=None, text=None, **kwargs)
property align

Sets the horizontal alignment of the title. It defaults to center except for bullet charts for which it defaults to right.

The ‘align’ property is an enumeration that may be specified as:
  • One of the following enumeration values:

    [‘left’, ‘center’, ‘right’]

Returns

Return type

Any

property font

Set the font used to display the title

The ‘font’ property is an instance of Font that may be specified as:

Returns

Return type

plotly.graph_objects.indicator.title.Font

property text

Sets the title of this indicator.

The ‘text’ property is a string and must be specified as:
  • A string

  • A number that will be converted to a string

Returns

Return type

str