Files
dpg-gauges/docs/API_REFERENCE.md

1.7 KiB

API Reference

Configuration

  • configure(**config): set package-wide defaults for later gauges.

Gauge Creation

Creation functions are context managers and accept common options such as tag, label, value, min_value, max_value, unit, width, height, show, tooltip, callback, theme, style, animation, smoothing, thresholds, and markers.

  • analog_gauge(**config)
  • digital_gauge(**config)
  • bar_gauge(**config)
  • level_gauge(**config)
  • status_light(**config)
  • segmented_gauge(**config)
  • compass_gauge(**config)
  • thermometer_gauge(**config)
  • battery_gauge(**config)
  • multi_value_gauge(**config)

Layout Helpers

  • gauge_panel(**config): child-window panel for grouped gauges.
  • gauge_grid(columns=1, min_column_width=180, fit_gauges=True, **config): table-backed wrapping gauge grid. columns is the maximum number of columns. If the parent is narrower than columns * min_column_width, the grid uses fewer columns and wraps gauges onto later rows to avoid horizontal scrolling. Gauges without an explicit positive width fill their grid cell.

Runtime API

  • set_value(tag, value): set the latest target value.
  • get_value(tag): return the latest raw target value.
  • update_gauge(tag, **config): update value and/or configuration.
  • configure_gauge(tag, **config): update configuration.
  • set_thresholds(tag, thresholds): replace visual threshold bands.
  • set_markers(tag, markers): replace visual markers.
  • set_show(tag, show): show or hide a gauge.
  • delete_gauge(tag): remove a gauge.
  • get_gauge_debug_state(tag): return internal debug state.

Runtime functions are GUI-thread functions unless explicitly documented otherwise.