Skip to content

Meter

Meter displays a single numeric value within a range, often as a circular or arc-style gauge.

It's ideal for dashboards, summaries, and status panels where visual emphasis matters more than precision.


Quick start

import bootstack as bs

app = bs.App()

meter = bs.Meter(app, amountused=65, amounttotal=100)
meter.pack(padx=20, pady=20)

app.mainloop()

When to use

Use Meter when:

  • showing a snapshot or status value

  • visual emphasis is important

  • you need a dashboard-style indicator

Consider a different control when...

  • Tracking task progress over time — use Progressbar instead

  • Showing capacity or fullness levels — use FloodGauge instead

  • You need a compact text-based indicator — use Badge instead


Appearance

Styling with accent

Meters are highly visual and often color-coded:

bs.Meter(app, accent="success")
bs.Meter(app, accent="danger")
bs.Meter(app, accent="info")

Examples & patterns

Value model

Meters display:

  • amountused relative to amounttotal

  • optional text/label overlays

meter = bs.Meter(
    app,
    amountused=75,
    amounttotal=100,
    subtext="CPU Usage"
)
meter.pack()

Common options

  • amountused — current value

  • amounttotal — maximum value

  • subtext — label displayed below the value

  • stripethickness — thickness of the gauge stripe

  • interactive=False — whether the meter can be adjusted by the user (if supported)

With subtext

bs.Meter(
    app,
    amountused=42,
    amounttotal=100,
    subtext="Progress"
).pack()

Behavior

  • The meter arc fills proportionally based on amountused / amounttotal

  • Visual updates occur when values are changed programmatically

  • Some implementations support interactive mode where users can drag to adjust


Reactivity

Meter can be updated dynamically by binding to signals:

usage = bs.Signal(50)
meter = bs.Meter(app, amountused=usage, amounttotal=100)

# Update value
usage.set(75)  # Meter updates automatically

Additional resources

Framework concepts

API reference