What Happens When You Create a Gauge Using Tabular Data

Using ADF Gauge Components 25-13 2. If you want to display the metric value as a percentage rather than as a value, then set the NumberType attribute of the dvt:metricLabel tag to NT_PERCENT. 3. If you want to specify additional formatting for the number in the metric label, do the following:

a. Right-click the metricLabel node and choose Insert inside dvt:metricLabel

Convert Number . b. In the Property Inspector, specify values in the attributes of the af:convertNumber tag to produce additional formatting. The procedure for formatting numbers in gauge tick labels is similar to that of formatting numbers in the metric label except that you insert the dvt:tickLabel tag as a child of the gauge.

25.4.6 What Happens When You Format the Numbers in a Gauge Metric Label

When you add a metric label and number formatting to a gauge, XML code is generated. Example 25–3 shows a sample of the XML code that is generated. Example 25–3 XML Code Generated When Formatting a Number in a Metric Label dvt:gauge dvt:metricLabel position=LP_BELOW_GAUGE numberType=NT_PERCENT af:convertNumber type=percent dvt:metricLabel dvt:gauge

25.4.7 What You May Need to Know About Automatic Scaling and Precision

In order to achieve a compact and clean display, gauges automatically determine the scale and precision of the values being displayed in metric labels and tick labels. For example, a value of 40,000 will be formatted as 40K, and 0.230546 will be displayed with 2 decimal points as 0.23. Automatic formatting still occurs when af:convertNumber is specified. Gauge tags that support af:convertNumber child tags have scaling and autoPrecision attributes that can be used to control the graphs automatic number formatting. By default, these attribute values are set to scaling=auto and autoPrecision=on. Fraction digit settings specified in af:convertNumber, such as minFractionDigits, maxFractionDigits, or pattern, are ignored unless autoPrecision is set to off.

25.4.8 How to Format Text in Gauges

You can format text in any of the following gauge tags that represent titles and labels in a gauge: ■ dvt:bottomLabel ■ dvt:gaugeMetricLabel Note: When the numberType attribute of metric or tick labels is set to percent NT_PERCENT, a child af:convertNumber tag, if used, will be automatically set to percent for its type attribute. When af:convertNumber is forced to percent, gauge clears the pattern attribute. This means that patterns are ignored when a gauge forces percent formatting.