Usage
Signature:
interface StatusMeterGaugeElement
Typescript Import Format
//To typecheck the element APIs, import as below.
import { StatusMeterGaugeElement } from "ojs/ojgauge";
//For the transpiled javascript to load the element's module, import as below
import "ojs/ojgauge";
For additional information visit:
Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
Styling
-
CSS Variables
-
metricLabel
-
Horizontal and Vertical Status Meter Gauge Size
-
Circular Status Meter Gauge Size
-
Plot Area
Name | Type | Description |
---|---|---|
----oj-gauge-metric-label-font-weight |
<font_weight> | Font weight for metric label. |
Name | Type | Description |
---|---|---|
--oj-statusmeter-gauge-bar-sm-size |
<length> | Vertical and horizontal status meter gauge small size |
--oj-statusmeter-gauge-bar-md-size |
<length> | Vertical and horizontal status meter gauge medium size |
--oj-statusmeter-gauge-bar-lg-size |
<length> | Vertical and horizontal status meter gauge large size |
Name | Type | Description |
---|---|---|
--oj-statusmeter-gauge-circular-sm-size |
<length> | Circular status meter gauge small size |
--oj-statusmeter-gauge-circular-md-size |
<length> | Circular status meter gauge medium size |
--oj-statusmeter-gauge-circular-lg-size |
<length> | Circular status meter gauge large size |
Name | Type | Description |
---|---|---|
----oj-statusmeter-gauge-bar-plotarea-border-color |
<color> | Border color for plot area in vertical and horizontal status meter gauges. |
----oj-statusmeter-gauge-bar-plotarea-color |
<color> | Color for plot area in vertical and horizontal status meter gauges. |
Slots
JET components that allow child content support slots. Please see the slots section of the JET component overview doc for more information on allowed slot content and slot types.
-
centerTemplate
-
The
centerTemplate
slot is used to specify custom center content for a circular status meter gauge. This slot takes precedence over the center.renderer property if specified.When the template is executed, the component's binding context is extended with the following properties:
- $current - an object that contains information for the gauge center. (See oj.ojStatusMeterGauge.CenterContext or the table below for a list of properties available on $current)
Properties of $current:
Name Type Description componentElement
Element The status meter gauge HTML element. innerBounds
oj.ojStatusMeterGauge.Bounds Object containing (x, y, width, height) of the rectangle inscribed in the center area. The inner bounds are useful for inserting content that is guaranteed to fit within the center area. If the angleExtent isn't 360 then we will provide the clipped square. metricLabel
string The computed metric label. outerBounds
oj.ojStatusMeterGauge.Bounds Object containing (x, y, width, height) of the rectangle circumscribing the center area. The outer bounds are useful for creating background for the entire center area when used with a CSS border-radius. If the angleExtent isn't 360 then we will provide the clipped square. -
contextMenu
-
The contextMenu slot is set on the
oj-menu
within this element. This is used to designate the JET Menu that this component should launch as a context menu on right-click, Shift-F10, Press & Hold, or component-specific gesture. If specified, the browser's native context menu will be replaced by the JET Menu specified in this slot.The application can register a listener for the Menu's ojBeforeOpen event. The listener can cancel the launch via event.preventDefault(), or it can customize the menu contents by editing the menu DOM directly, and then calling refresh() on the Menu.
To help determine whether it's appropriate to cancel the launch or customize the menu, the ojBeforeOpen listener can use component API's to determine which table cell, chart item, etc., is the target of the context menu. See the JSDoc of the individual components for details.
Keep in mind that any such logic must work whether the context menu was launched via right-click, Shift-F10, Press & Hold, or component-specific touch gesture.
- Deprecated:
-
Since Description 13.0.0
This web component no longer supports launching a context menu.
-
tooltipTemplate
-
The
tooltipTemplate
slot is used to specify custom tooltip content. This slot takes precedence over the tooltip.renderer property if specified.When the template is executed, the component's binding context is extended with the following properties:
- $current - an object that contains information for the gauge. (See oj.ojStatusMeterGauge.TooltipContext or the table below for a list of properties available on $current)
Properties of $current:
Attributes
-
angle-extent :number
-
Specifies the angle extent of a gauge with circular orientation. Value should be provided in degrees.
- Default Value:
360
Names
Item Name Property angleExtent
Property change event angleExtentChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-angle-extent-changed
-
(nullable) animation-duration :number
-
The duration of the animations in milliseconds. The default value comes from the CSS and varies based on theme.
Names
Item Name Property animationDuration
Property change event animationDurationChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-animation-duration-changed
-
animation-on-data-change :"auto"|"none"
-
Defines the animation that is applied on data changes.
- Default Value:
"none"
Supported Values:
Value auto
none
Names
Item Name Property animationOnDataChange
Property change event animationOnDataChangeChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-animation-on-data-change-changed
-
animation-on-display :"auto"|"none"
-
Defines the animation that is shown on initial display.
- Default Value:
"none"
Supported Values:
Value auto
none
Names
Item Name Property animationOnDisplay
Property change event animationOnDisplayChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-animation-on-display-changed
-
border-color :string
-
The border color of the gauge. Only applies when thresholds are not defined. The default value varies based on theme.
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system.
Names
Item Name Property borderColor
Property change event borderColorChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-border-color-changed
-
border-radius :string
-
Defines the border radius of the indicator and plot area. When set to "auto", the border radius is set to a built-in default. Acceptable input follows CSS border-radius attribute specifications. The plot area border radius can be overwritten with the plotArea borderRadius atribute.
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system.
- Default Value:
"auto"
Names
Item Name Property borderRadius
Property change event borderRadiusChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-border-radius-changed
-
center :Object
-
An object defining the center content of a status meter with circular orientation.
Names
Item Name Property center
Property change event centerChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-center-changed
-
center.renderer :((context: ojStatusMeterGauge.CenterContext) => ({insert: Element|string}|{preventDefault: boolean}))
-
A function that returns custom center content. The function takes a center context argument, provided by the gauge, and should return an object with the following property:
- insert: HTMLElement - HTML element, which will be overlaid on top of the gauge. This HTML element will block interactivity of the gauge by default, but the CSS pointer-events property can be set to 'none' on this element if the gauge's interactivity is desired.
- Default Value:
null
Names
Item Name Property center.renderer
-
color :string
-
The color of the gauge. Only applies when thresholds are not defined. The default value varies based on theme.
Names
Item Name Property color
Property change event colorChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-color-changed
-
described-by :string|null
-
Names
Item Name Property describedBy
Property change event describedByChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-described-by-changed
-
indicator-size :number
-
Defines the ratio of relative thickness of the indicator to the plot area.
- Default Value:
1
Names
Item Name Property indicatorSize
Property change event indicatorSizeChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-indicator-size-changed
-
inner-radius :number
-
Specifies the inner radius of a gauge with circular orientation, defined by the distance from the center of the gauge to the innermost edge of the indicator and plot area. Valid values are a percent or ratio from 0 to 1.
- Default Value:
.7
Names
Item Name Property innerRadius
Property change event innerRadiusChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-inner-radius-changed
-
label :Object
-
An object defining the label.
- Deprecated:
-
Since Description 12.1.0
This attribute is deprecated. Use metric-label instead.
Names
Item Name Property label
Property change event labelChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-changed
-
(nullable) label.position :string
-
Defines the position of the label for horizontal and vertical gauges. The default position for horizontal gauges is 'start' and for vertical gauges is 'center'.
- Default Value:
"auto"
Supported Values:
Value auto
center
start
Names
Item Name Property label.position
-
label.style :Partial<CSSStyleDeclaration>
-
The CSS style object defining the style of the label.
- Default Value:
{}
Names
Item Name Property label.style
-
(nullable) label.text :string
-
The text for the label.
- Default Value:
""
Names
Item Name Property label.text
-
labelled-by :string|null
-
It is used to establish a relationship between this component and another element. A common use is to tie the oj-label and the oj-status-meter-gauge together for accessibility. The oj-label custom element has an id, and you use the labelled-by attribute to tie the two components together to facilitate correct screen reader behavior.
Names
Item Name Property labelledBy
Property change event labelledByChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-labelled-by-changed
-
max :number
-
The maximum value of the gauge.
- Default Value:
100
Names
Item Name Property max
Property change event maxChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-max-changed
-
metric-label :Object
-
An object defining the value label.
Names
Item Name Property metricLabel
Property change event metricLabelChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-metric-label-changed
-
(nullable) metric-label.converter :oj.Converter.<(string|number)>
-
The converter used to format the labels. When using a converter, scaling should be set to none, as the formatted result may not be compatible with the scaling suffixes.
- Default Value:
null
Names
Item Name Property metricLabel.converter
-
(nullable) metric-label.position :string
-
Defines the position of the metric label for horizontal and vertical gauges. The default position of the metric label is outside of the plot area. If the label is not rendered, then 'withLabel' will render the metric label outside the plot area. When the label is rendered, all positions are treated as 'withLabel' except 'auto' and 'outsidePlotArea' which render the metric label outside the plot area. When the metric label is rendered 'withLabel', the metric label is displayed with the same style as the label. The position in the 'withLabel' case is specified by the label position attribute.
- Default Value:
"auto"
Supported Values:
Value auto
center
insideIndicatorEdge
outsideIndicatorEdge
outsidePlotArea
withLabel
Names
Item Name Property metricLabel.position
-
(nullable) metric-label.rendered :string
-
Defines if the label is rendered. If set to auto, the label is rendered if the orientation is circular.
- Default Value:
"auto"
Supported Values:
Value auto
off
on
Names
Item Name Property metricLabel.rendered
-
(nullable) metric-label.scaling :string
-
The scaling behavior of the labels. When using a converter, scaling should be set to none, as the formatted result may not be compatible with the scaling suffixes.
- Default Value:
"auto"
Supported Values:
Value auto
billion
million
none
quadrillion
thousand
trillion
Names
Item Name Property metricLabel.scaling
-
metric-label.style :Partial<CSSStyleDeclaration>
-
The CSS style object defining the style of the label. The following style properties are supported: color, cursor, fontFamily, fontSize, fontStyle, fontWeight, textDecoration.
- Default Value:
{}
Names
Item Name Property metricLabel.style
-
(nullable) metric-label.text :string
-
The text for the label. If specified, text will overwrite the numeric value that is displayed by default. The converter, scaling, and textType attributes are ignored when text is specified.
- Default Value:
""
Names
Item Name Property metricLabel.text
-
(nullable) metric-label.text-type :string
-
Defines whether the label is a number or a percentage of the total value.
- Default Value:
"number"
Supported Values:
Value number
percent
Names
Item Name Property metricLabel.textType
-
min :number
-
The minimum value of the gauge.
- Default Value:
0
Names
Item Name Property min
Property change event minChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-min-changed
-
orientation :"circular"|"vertical"|"horizontal"
-
Defines the type of status meter to be rendered.
- Default Value:
"horizontal"
Supported Values:
Value circular
horizontal
vertical
Names
Item Name Property orientation
Property change event orientationChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-orientation-changed
-
plot-area :Object
-
Plot Area for Status Meter Gauge
Names
Item Name Property plotArea
Property change event plotAreaChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-plot-area-changed
-
(nullable) plot-area.border-color :string
-
The border color of the plot area.
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system.
Names
Item Name Property plotArea.borderColor
-
(nullable) plot-area.border-radius :string
-
Defines the border radius of the plot area shape. When set to "auto", the border radius is the same as the top level border radius. Acceptable input follows CSS border-radius attribute specifications.
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system.
- Default Value:
"auto"
Names
Item Name Property plotArea.borderRadius
-
(nullable) plot-area.color :string
-
The color of the plot area.
Names
Item Name Property plotArea.color
-
(nullable) plot-area.rendered :string
-
Defines if the plot area is to be rendered. If set to auto, the plot area is rendered if the orientation is circular or if the thresholdDisplay is not onIndicator.
- Default Value:
"auto"
Supported Values:
Value auto
off
on
Names
Item Name Property plotArea.rendered
-
(nullable) plot-area.svg-class-name :string
-
The CSS style class to apply to the plot area. The style class and inline style will override any other styling specified through the properties.
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system.
- Default Value:
""
Names
Item Name Property plotArea.svgClassName
-
plot-area.svg-style :Partial<CSSStyleDeclaration>
-
The inline style to apply to the plot area. The style class and inline style will override any other styling specified through the properties. Only SVG CSS style properties are supported.
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system.
- Default Value:
{}
Names
Item Name Property plotArea.svgStyle
-
readonly :boolean
-
Defines whether the value of the gauge can be changed by the end user.
- Default Value:
false
Names
Item Name Property readonly
Property change event readonlyChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-readonly-changed
-
reference-lines :Array.<oj.ojStatusMeterGauge.ReferenceLine>
-
An array of objects with the following properties defining the reference lines for the gauge.
- Default Value:
[]
Names
Item Name Property referenceLines
Property change event referenceLinesChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-reference-lines-changed
-
size :"sm"|"md"|"lg"|"fit"
-
Specifies the size of the status meter gauge.
- Default Value:
"fit"
Supported Values:
Value Description fit
The size of the gauge will be determined based on the application styling. If no explicit component size is specified, a default size will be used. lg
Large size, as determined by the theme, will be used for the size of the gauge. md
Medium size, as determined by the theme, will be used for the size of the gauge. sm
Small size, as determined by the theme, will be used for the size of the gauge. Names
Item Name Property size
Property change event sizeChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-size-changed
-
start-angle :number
-
Specifies the start angle of a gauge with circular orientation. Value should be provided in degrees.
- Default Value:
90
Names
Item Name Property startAngle
Property change event startAngleChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-start-angle-changed
-
step :number|null
-
Specifies the increment by which values can be changed by the end user when readonly is false. The step must be a positive value that is smaller than the difference between the min and max. If not specified, the default step is 1/100 if the difference between the min and max.
Names
Item Name Property step
Property change event stepChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-step-changed
-
svg-class-name :string
-
The CSS style class to apply to the gauge indicator. The style class and inline style will override any other styling specified through the properties. For tooltip interactivity, it's recommended to also pass a representative color to the color attribute.
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system.
- Default Value:
""
Names
Item Name Property svgClassName
Property change event svgClassNameChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-svg-class-name-changed
-
svg-style :Partial<CSSStyleDeclaration>
-
The inline style to apply to the gauge indicator. The style class and inline style will override any other styling specified through the properties. For tooltip interactivity, it's recommended to also pass a representative color to the color attribute. Only SVG CSS style properties are supported.
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system.
- Default Value:
{}
Names
Item Name Property svgStyle
Property change event svgStyleChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-svg-style-changed
-
threshold-display :"currentOnly"|"all"|"onIndicator"
-
Controls whether the current threshold is displayed on the indicator, in the plotArea, or if all the thresholds are displayed in the plot area.
- Default Value:
"onIndicator"
Supported Values:
Value all
currentOnly
onIndicator
Names
Item Name Property thresholdDisplay
Property change event thresholdDisplayChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-threshold-display-changed
-
thresholds :Array.<oj.ojStatusMeterGauge.Threshold>
-
An array of objects with the following properties defining the thresholds for the gauge.
- Default Value:
[]
Names
Item Name Property thresholds
Property change event thresholdsChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-thresholds-changed
-
tooltip :Object
-
An object containing an optional callback function for tooltip customization.
Names
Item Name Property tooltip
Property change event tooltipChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-tooltip-changed
-
tooltip.renderer :((context: ojStatusMeterGauge.TooltipContext) => ({insert: Element|string}|{preventDefault: boolean}))
-
A function that returns a custom tooltip. The function takes a tooltip context argument, provided by the gauge, and should return an object that contains only one of the two properties:
- insert: HTMLElement | string - An HTML element, which will be appended to the tooltip, or a tooltip string.
- preventDefault:
true
- Indicates that the tooltip should not be displayed. It is not necessary to return {preventDefault:false} to display tooltip, since this is a default behavior.
- Default Value:
null
Names
Item Name Property tooltip.renderer
-
track-resize :"on"|"off"
-
Defines whether the element will automatically render in response to changes in size. If set to
off
, then the application is responsible for callingrefresh
to render the element at the new size.- Default Value:
"on"
Supported Values:
Value off
on
Names
Item Name Property trackResize
Property change event trackResizeChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-track-resize-changed
-
(readonly) transient-value :number|null
-
The
transientValue
is the read-only property for retrieving the transient value from the status meter gauge. It is triggered when dragging over the status meter gauge.This is a read-only property so page authors cannot set or change it directly.
- Supports writeback:
true
- Since:
- 4.2.0
Names
Item Name Property transientValue
Property change event transientValueChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-transient-value-changed
-
translations :object|null
-
A collection of translated resources from the translation bundle, or
null
if this component has no resources. Resources may be accessed and overridden individually or collectively, as seen in the examples.If the component does not contain any translatable resource, the default value of this attribute will be
null
. If not, an object containing all resources relevant to the component.If this component has translations, their documentation immediately follows this doc entry.
Names
Item Name Property translations
Property change event translationsChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-translations-changed
-
(nullable) translations.accessible-contains-controls :string
-
Used to describe a container that contains controls.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Since:
- 14.0.0
Names
Item Name Property translations.accessibleContainsControls
-
(nullable) translations.component-name :string
-
Used to describe the data visualization type for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Gauge"
Names
Item Name Property translations.componentName
-
(nullable) translations.label-and-value :string
-
Used to display a label and its value.
See the translations attribute for usage examples.
- Default Value:
"{0}: {1}"
Names
Item Name Property translations.labelAndValue
-
(nullable) translations.label-clear-selection :string
-
Text shown for clearing multiple selection on touch devices.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Clear Selection"
Names
Item Name Property translations.labelClearSelection
-
(nullable) translations.label-count-with-total :string
-
Used to display a count out of a total.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"{0} of {1}"
Names
Item Name Property translations.labelCountWithTotal
-
(nullable) translations.label-data-visualization :string
-
Label for data visualizations used for accessibility.
See the translations attribute for usage examples.
- Default Value:
"Data Visualization"
Names
Item Name Property translations.labelDataVisualization
-
(nullable) translations.label-invalid-data :string
-
Text shown when the component receives invalid data.
See the translations attribute for usage examples.
- Default Value:
"Invalid data"
Names
Item Name Property translations.labelInvalidData
-
(nullable) translations.label-no-data :string
-
Text shown when the component receives no data.
See the translations attribute for usage examples.
- Default Value:
"No data to display"
Names
Item Name Property translations.labelNoData
-
(nullable) translations.state-collapsed :string
-
Used to describe the collapsed state for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Collapsed"
Names
Item Name Property translations.stateCollapsed
-
(nullable) translations.state-drillable :string
-
Used to describe a drillable object for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Drillable"
Names
Item Name Property translations.stateDrillable
-
(nullable) translations.state-expanded :string
-
Used to describe the expanded state for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Expanded"
Names
Item Name Property translations.stateExpanded
-
(nullable) translations.state-hidden :string
-
Used to describe the hidden state for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Hidden"
Names
Item Name Property translations.stateHidden
-
(nullable) translations.state-isolated :string
-
Used to describe the isolated state for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Isolated"
Names
Item Name Property translations.stateIsolated
-
(nullable) translations.state-maximized :string
-
Used to describe the maximized state for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Maximized"
Names
Item Name Property translations.stateMaximized
-
(nullable) translations.state-minimized :string
-
Used to describe the minimized state for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Minimized"
Names
Item Name Property translations.stateMinimized
-
(nullable) translations.state-selected :string
-
Used to describe the selected state for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Selected"
Names
Item Name Property translations.stateSelected
-
(nullable) translations.state-unselected :string
-
Used to describe the unselected state for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the oj-status-meter-gauge.
- Default Value:
"Unselected"
Names
Item Name Property translations.stateUnselected
-
(nullable) translations.state-visible :string
-
Used to describe the visible state for accessibility.
See the translations attribute for usage examples.
- Deprecated:
-
Since Description 14.0.0
This is deprecated because it is not used by the status meter gauge.
- Default Value:
"Visible"
Names
Item Name Property translations.stateVisible
-
value :number|null
-
The metric value.
- Supports writeback:
true
Names
Item Name Property value
Property change event valueChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-value-changed
-
visual-effects :"none"|"auto"
-
Defines whether the theme specific visual effects such as overlays and gradients are applied to the gauge.
- Deprecated:
-
Since Description 12.1.0
Overlays and gradients are not supported in Redwood theme and are not recommended. As such, this attribute is deprecated.
- Default Value:
"auto"
Supported Values:
Value auto
none
Names
Item Name Property visualEffects
Property change event visualEffectsChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-visual-effects-changed
Methods
-
getMetricLabel : {string}
-
Returns the gauge's formatted metric label.
Deprecated:
Since Description 7.0.0
The use of this function is no longer recommended. Returns:
The formatted metric label.
- Type
- string
-
getProperty(property) : {any}
-
Retrieves the value of a property or a subproperty. The return type will be the same as the type of the property as specified in this API document. If the method is invoked with an incorrect property/subproperty name, it returns undefined.
Parameters:
Name Type Description property
string The property name to get. Supports dot notation for subproperty access. - Since:
- 4.0.0
Returns:
- Type
- any
Example
let subpropValue = myComponent.getProperty('complexProperty.subProperty1.subProperty2');
-
refresh : {void}
-
Refreshes the component.
Returns:
- Type
- void
-
setProperties(properties) : {void}
-
Performs a batch set of properties. The type of value for each property being set must match the type of the property as specified in this API document.
Parameters:
Name Type Description properties
Object An object containing the property and value pairs to set. - Since:
- 4.0.0
Returns:
- Type
- void
Example
myComponent.setProperties({"prop1": "value1", "prop2.subprop": "value2", "prop3": "value3"});
-
setProperty(property, value) : {void}
-
Sets a property or a subproperty (of a complex property) and notifies the component of the change, triggering a [property]Changed event. The value should be of the same type as the type of the attribute mentioned in this API document.
Parameters:
Name Type Description property
string The property name to set. Supports dot notation for subproperty access. value
any The new value to set the property to. - Since:
- 4.0.0
Returns:
- Type
- void
Example
myComponent.setProperty('complexProperty.subProperty1.subProperty2', "someValue");
Type Definitions
-
Bounds
-
Properties:
Name Type Description height
number The height of the bounding rectangle. width
number The width of the bounding rectangle. x
number The x position of the bounding rectangle. y
number The y position of the bounding rectangle. -
CenterContext
-
Properties:
Name Type Description componentElement
Element The status meter gauge HTML element. innerBounds
oj.ojStatusMeterGauge.Bounds Object containing (x, y, width, height) of the rectangle inscribed in the center area. The inner bounds are useful for inserting content that is guaranteed to fit within the center area. If the angleExtent isn't 360 then we will provide the clipped square. metricLabel
string The computed metric label. outerBounds
oj.ojStatusMeterGauge.Bounds Object containing (x, y, width, height) of the rectangle circumscribing the center area. The outer bounds are useful for creating background for the entire center area when used with a CSS border-radius. If the angleExtent isn't 360 then we will provide the clipped square. -
ReferenceLine
-
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system - Deprecated:
-
Since Description 14.1.0
This is not recommended in the Redwood design system
Properties:
Name Type Argument Default Description color
string <optional>
The color of the reference line. lineStyle
"dashed" | "dotted" | "solid" <optional>
"solid" The line style of the reference line. lineWidth
number <optional>
2 The width of the reference line. value
number <optional>
The value of the reference line. -
Threshold
-
- Deprecated:
-
Since Description 14.0.0
This is not recommended in the Redwood design system
Properties:
Name Type Argument Description borderColor
string <optional>
The border color of the threshold. color
string <optional>
The color of the threshold. max
number <optional>
The upper bound of the threshold. This value is ignored for the final threshold, which uses the maximum value of the gauge. shortDesc
string <optional>
Specific description for the threshold and overwrites the shortDesc specified on gauge. This is used for accessibility and also for customizing the tooltip text. -
TooltipContext