Oracle Apex: Status Meter Gauge Chart Example

This example shows, how to create a Status Meter Gauge chart in Oracle Apex.

SQL Query Example for Status Meter Gauge Chart

SQL query should return a single row, you can get the data by using functions such as MAX(), MIN(), SUM(), etc. or get the values directly for a single row. In the following SQL query example, it will fetch the target sales value and the actual sales value for the current day from the table DAILY_SALES:

select target_value, sales_value from daily_Sales where cdate = trunc(sysdate);

Steps to Create Status Meter Gauge Chart in Oracle Apex

  1. Create a region in Oracle Apex, do the right-click on the Region node and select Create Region option and then set the following properties:
  • Title: Status Meter Gauge
  • Type: Chart
  1. Then click on the Attribute node of the region and set the following properties:
  • Type: Status Meter Gauge
  • Title: Sales Status
  • Maximum Width: 400
  • Maximum Height: 300
  • Gauge > Orientation: Circle
  • Show Plot Area: Yes (Turn on the switch)
  • Indicator Size: .5
  • Inner Radius: .8
  • Start Angle: 180
  • Angle Extent: 180
  • Value > Value Type: Number
  • Format: Currency
  1. Then click on the Series node and set the following properties:
  • Source > Type: SQL Query
  • SQL Query: select target_value, sales_value from daily_Sales where cdate = trunc(sysdate);
  • Column Mapping > Label: TARGET_VALUE
  • Value: SALES_VALUE
  • Maximum Value: TARGET_VALUE
  • Custom Tooltip: TARGET_VALUE
  • Appearance > Color: Green
  • Threshold > Values: &SALES_VALUE., &TARGET_VALUE.
  • Colors: yellow, red
  • Display: All
  • Reference Lines > Values: &SALES_VALUE.
  • Colors: Green

The following is the screenshot for the above settings:

Oracle Apex - Create Status Meter Gauge Chart.

There are lots more options to set for the chart. Now save the changes and run the page, you will have the output as shown below:

Status Meter Gauge chart Oracle Apex.

Related tutorials:

Vinish Kapoor
Vinish Kapoor

Vinish Kapoor is a seasoned software development professional and a fervent enthusiast of artificial intelligence (AI). His impressive career spans over 20 years, marked by a relentless pursuit of innovation and excellence in the field of information technology. As an Oracle ACE, Vinish has distinguished himself as a leading expert in Oracle technologies, a title awarded to individuals who have demonstrated their deep commitment, leadership, and expertise in the Oracle community.

One comment

Comments are closed.