Creating Gauges Using the Gauge Classes
You can specify a field in a rowset and have it depicted graphically as a gauge with minimal PeopleCode. The data in the field must be numeric. You can also choose to make the gauge interactive.
The high-level steps involved in creating any gauge are:
-
Identify a field on a record that has a numeric value that you want to show in a gauge.
-
Add a chart area to a page in Application Designer. Associate the record and field in Step 1 with that chart area.
-
In PeopleCode instantiate a gauge object using one of the built-in functions available for gauges:
-
GetLEDGauge
-
GetRatingGauge
-
GetStatusMeterGauge
-
-
Set property values for the gauge object as needed, keeping in mind the design guidelines below. Most properties have default values, so you can start by reviewing your gauge with no properties set and then set those that you need to in order to tailor the appearance and functionality of the gauge.
-
Depending on the gauge type:
-
For the LEDGauge and StatusMeterGauge classes, optionally, create an instance of the Threshold class and associate it with your instance of the gauge.
-
For the RatingGaugeChart class, create instances of the RatingGaugeState class and of the GaugeThreshold class and associate them with your instance of the gauge.
-