apex_add_gauge
Add a gauge/dial chart to an Oracle APEX region from a SQL query that returns a single VALUE, with configurable min/max, thresholds, and color zones.
Instructions
Add a gauge/dial chart with min/max/thresholds. SQL must return a VALUE column.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No | Single color hex for the gauge needle/fill (optional). Note: color is accepted for future compatibility but not applied in APEX 24.2.13. | |
| height | No | Gauge height in pixels (default 300). | |
| page_id | Yes | Target page ID. | |
| sequence | No | Region display order. | |
| max_value | No | Maximum scale value (default 100). | |
| min_value | No | Minimum scale value (default 0). | |
| sql_query | Yes | SQL returning a single numeric value in VALUE_COLUMN. Example: "SELECT ROUND(AVG(NR_PCT_TOTAL)) AS VALUE FROM TEA_AVALIACOES" | |
| thresholds | No | List of threshold zones. Each dict: {"value": 33, "color": "#e53935"} -- red up to 33 {"value": 66, "color": "#fb8c00"} -- orange up to 66 {"value": 100, "color": "#43a047"} -- green up to 100 If omitted, uses a single green zone. | |
| region_name | Yes | Region title. | |
| value_column | No | Column name with the gauge value (default "VALUE"). | VALUE |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |