<layer name="reading">
The reading
layer provides data to be displayed by a gauge widget. The
reading
layer is required if column names are used in the
reading_
attribute of <widget class_="gauge">
, or if the
reading_
attribute is omitted altogether. (Available as of
prod-9)
Inside the <layer>
tags, a query that returns the column names passed
to the reading_
attribute must be provided. The resultant columns from the
query must be numeric. Only the first row of the worksheet returned by this query will be
used.
If the reading_
attribute is omitted from <widget
class_="gauge">
, the number of columns resulting from the query associated with
the <layer>
must not exceed the value of the maxcols_
attribute, if it is specified
<dynamic> <widget class_="gauge"> <layer name="reading"> [1010data_QUERY] </layer> </widget> </dynamic>
Example: <layer name="reading">
with reading_
attribute
<dynamic> <widget class_="gauge" type_="linear" base_="pub.demo.retail.item" title_="Total Units by Store" min_="0" max_="25" width_="300" major_="10" colors_="purple,red,blue" reading_="m0,m1,m2" > <layer name="reading"> <tabu label="Tabulation on Sales Item Detail" breaks="store"> <tcol source="units" name="tot_units" fun="cnt" label="Count"/> </tabu> <colord cols="tot_units"/> <transpose/> </layer> </widget> </dynamic>
Example: <layer name="reading">
without reading_
attribute
<dynamic> <widget class_="gauge" base_="pub.demo.retail.item" min_="0" max_="20" width_="300" electric_="1"> <layer name="reading"> <tabu label="Tabulation on Sales Item Detail" breaks="store"> <tcol source="units" name="tot_units" fun="cnt" label="Count"/> </tabu> <colord cols="tot_units"/> <transpose/> </layer> </widget> </dynamic>