42 lines
1.4 KiB
Markdown
42 lines
1.4 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(**config)`: lightweight horizontal gauge group.
|
|
|
|
## 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.
|