49 lines
2.0 KiB
Markdown
49 lines
2.0 KiB
Markdown
# 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, cell_padding=12, **config)`:
|
|
table-backed
|
|
wrapping gauge grid. Pass an integer `columns` to set the maximum column count; 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. Pass `columns="auto"` for autobreak mode, where the
|
|
column count is derived entirely from the available width and `min_column_width`. Gauges without
|
|
an explicit positive width fill their grid cell. Increase `cell_padding` if a custom Dear PyGui
|
|
theme uses wider table padding or borders.
|
|
|
|
## 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.
|