Display a prominent current metric with optional prefix or suffix.
Dashboard KPI cards
Plotly · Class
go.Indicator visualizes one value as a number, delta, gauge, or combination. Its mode selects the rendered components, while related settings control comparison, formatting, and placement.
Constructs a Plotly indicator trace that visualizes one value. The selected mode controls whether the trace renders a number, a delta against a reference, a gauge, or a combination; layout positioning is supplied through the domain.
go.Indicator(arg=None, alignmentgroup=None, autorange=None, ...)| Name | Type | Description |
|---|---|---|
value | number | The value to visualize. |
mode | string | Specifies which visual elements to draw, including number, delta, and gauge. |
delta | object | The number to compare value with when displaying a delta. |
gauge | object | Configuration for the gauge visualization. |
domain | object | Positioning information for the indicator. |
title | object | Text displayed as the indicator title. |
A Plotly Indicator trace object.
import plotly.graph_objects as go
fig = go.Figure(go.Indicator(
mode="gauge+number+delta",
value=450,
delta={"reference":400},
title={"text":"Speed"},
gauge={"axis":{"range":[None,500]}}
))
fig.show()Creates one indicator showing a numeric value, its difference from a reference, and a gauge.
Dashboard KPI cards
Target tracking
Progress monitoring
Compact multi-metric layouts
go.Indicator is a trace for visualizing one value. It can render a number, a delta, a gauge, or any combination of those elements selected through mode.
Follow-up: How would you show progress toward a target? Add a gauge and set delta.reference to the target value, then choose an appropriate gauge range.
The value attribute supplies the single value being displayed, while mode determines which visual components appear. For example, gauge+number renders both a gauge and the numeric value.
Follow-up: How can the displayed value be labeled? Configure title, and use number.prefix or number.suffix when text must appear directly beside the number.
delta compares value with a reference number and displays their difference. Its options include absolute or relative comparison, formatting, colors, symbols, position, prefix, and suffix.
Follow-up: How can the gauge be placed in a multi-indicator figure? Give each indicator a suitable domain, such as distinct x and y intervals or grid positions.
plotly.graph_objects.Figureindicator.deltaindicator.gaugeindicator.numberindicator.domainindicator.title