-
This control is not suitable for users who require assistive technologies.
In InfoSQL use the meters created using JSON instead. See Detailview for details.
Displays meters inline in Info SQL.
Start value:
Return value:
Supported in:
InfoSql
Grid
SQL
SQL Call: Get meters
(mandatory)
Gets one or more meters to display.
May modify database:
No
Parameters
@Id
string
The value of the field.
Resultset: Data
Get information about the meters to be drawn.
Table count:
repeated exactly once
Row count:
one or more rows
Columns
MeterId
optional
int
Used to identify a meter if more than one meter is displayed in a field.
Value
mandatory
int
Value of the indicator.
ScaleStart
mandatory
int
Start of the scale.
ScaleEnd
mandatory
int
End of the scale.
ScaleStepSize
optional
int
Steps between the labels on the scale, default 1/10th of total scale size.
Unit
optional
string
Unit of the meter.
Heading
optional
string
Heading of the meter.
Resultset: Intervals
(optional)
Intervals to display on the meter. Unspecified intervals will be gray.
Table count:
repeated zero or one time
Row count:
one or more rows
Columns
MeterId
optional
int
Id if more than one meter is displayed. Used to match intervals to data.
IntervalStart
mandatory
int
Start of interval.
IntervalEnd
mandatory
int
End of interval.
ColorName
mandatory
string
Name of the color for the interval.
Possible value
|
Description
|
Default
|
|
Green
|
|
Red
|
|
Yellow
|
|
Tooltip
optional
string
Additional tooltip for the interval.
Resultset: Extra indicators
(optional)
Extra value indicators.
Table count:
repeated zero or one time
Row count:
one or more rows
Columns
MeterId
optional
int
Id if more than one meter is displayed in field.
IndicatorValue
mandatory
int
Value of the extra indicator.
Tooltip
optional
string
Tooltip for the extra indicator.
Default: Displays value and unit if omitted or null.
Examples
Single meter
CREATE PROCEDURE [dbo].[MeterExample]
@Id int
AS
BEGIN
SELECT
80 AS Value,
0 AS ScaleStart,
100 AS ScaleEnd;
SELECT
0 AS IntervalStart,
10 AS IntervalEnd,
'Green' AS ColorName
UNION ALL
SELECT
90 AS IntervalStart,
100 AS IntervalEnd,
'Red' AS ColorName;
END;
Multiple meters
CREATE PROCEDURE [dbo].[MeterExample2]
@Id int
AS
BEGIN
SELECT
1 AS MeterId,
80 AS Value,
0 AS ScaleStart,
300 AS ScaleEnd,
'MKR' AS Unit,
'Income' AS Heading,
20 AS ScaleStepSize
UNION ALL
SELECT
2 AS MeterId,
5 AS Value,
0 AS ScaleStart,
20 AS ScaleEnd,
'%' AS Unit,
'Profit' AS Heading,
2 AS ScaleStepSize;
SELECT
1 AS MeterId,
0 AS IntervalStart,
100 AS IntervalEnd,
'Red' AS ColorName
UNION ALL
SELECT
1 AS MeterId,
200 AS IntervalStart,
280 AS IntervalEnd,
'Green' AS ColorName
UNION ALL
SELECT
1 AS MeterId,
100 AS IntervalStart,
200 AS IntervalEnd,
'Yellow' AS ColorName
UNION ALL
SELECT
2 AS MeterId,
0 AS IntervalStart,
4 AS IntervalEnd,
'Red' AS ColorName;
SELECT
1 AS MeterId,
40 AS IndicatorValue
UNION ALL
SELECT
1 AS MeterId,
60 AS IndicatorValue
UNION ALL
SELECT
2 AS MeterId,
3 AS IndicatorValue;
END;