fields

query to specify the data block from which to draw the fields.

Specifies the field of the data block to be displayed by the Gauge component. This is equivalent to selecting a field from the ‘Columns’ menu under the Data tab of the component ‘Properties’ dialog box.

GaugeFields

When you use a bivariate aggregation method (e.g., correlation), the fields array should contain two field names. Otherwise, the array should contain just a single field name.

Type

Array

Examples

One-measure aggregation
Gauge1.query = 'Sales';
Gauge1.fields = ['Total'];
Gauge1.formula = StyleConstant.AVERAGE_FORMULA;
Two-measure aggregation
Gauge1.query = 'Sales';
Gauge1.fields = ['Total','Quantity Purchased'];
Gauge1.formula = StyleConstant.CORRELATION_FORMULA;

Either syntax below can be used in component script:

fields           // unqualified
Gauge1.fields    // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.