Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Model Driven MES 7​.0

barSettings

  • Last UpdatedOct 10, 2025
  • 5 minute read

The barSettings object is part of a data property and consists of the different elements described in the following table, which affect the Progress Bar widget data and its visual representation. You can set these elements individually or collectively. They are cached until their next update. If the value for the elements isn't set in the script, the widget uses the default value.

To visualize how some of the elements in the table appear in the Progress Bar widget, see Progress Bar widget representation.

Element Name

Description

1

widgetTitle

Name or information text for the widget. Shown directly above the top-left corner of the widget.

This has maximum 2 lines with a line separator "<BR>". Its whitespace is collapsed when it's null, empty, or has a non-string datatype value.

Datatype: String

Default: " "

2

enableColumnBindings

This allows the user to set up the lookup source. This is set to false when it's null or has a non-boolean value.

Datatype: Boolean

Default: false

3

uom

Unit of measure for the widget value. This has 1 line and its whitespace is collapsed when it's null or empty, or has a non-string datatype value.

Datatype: String

Default: " "

4

targetValue

Target value of the widget. This is the value to which the target indicator points at. If its value is non-numeric, the target indicator isn't shown.

If the target value is greater than the scale maximum value, the target indicator is set at the scale maximum value. If the target value is smaller than the scale minimum value, the target indicator is set at the scale minimum value.

Datatype: Null or Numeric

Default: scaleMinimumValue

5

value

This is the default value for the widget. It defaults to scaleMinimumValue when it is null or has a non-numeric value.

If its value is greater than the scale maximum value, the value is set to the scale maximum value, and the actual value is shown just above the right end of the bar. If the target value is smaller than the scale minimum value, the value is set to the scale minimum value, and the actual value is shown just above the left end of the bar.

Datatype: Numeric

Default: scaleMinimumValue

6

decimalPlaces

The decimal places used in the value of the widget. It also applies to the values of the Range element in the scale.

This defaults to 0 when it is null or has a non-numeric value. If you specify a value for this property higher than 3, for example, 4, then the displayed value shows the full 4-digit decimal place.

However, for scale or range value, it rounds the decimal places to the nearest thousandth or three decimal places. The actual value is shown in a tooltip when you hover over the scale value.

For example, the scale value shows 5.000, when you hover over 5.000, the tool tip shows 5.0001.

Note: If you enter a value for this property higher than the supported 7 decimal places, for example, 9, the widget resets the property value to 7 and displays this message: The input was validated and corrected. For more information, see console.

Datatype: Numeric

Valid values: 0-7

Default: 0

7

scaleMinimumValue

Minimum value displayed on the scale.

It defaults to 0 when it's null or has a non-numeric value. If it's greater than 90000000, it's set at 90000000. If it's smaller than -90000000, it's set at -90000000. If it's greater than or equal to scaleMaximumValue, it's reset to 0 and scaleMaximumValue is reset to 100.

Datatype: Numeric

Valid values: -90000000 to 90000000

Default: 0

8

scaleMaximumValue

Maximum value displayed on the scale.

It defaults to 100 when it's null or has a non-numeric value. If it's greater than 90000000, it's set at 90000000. If it's smaller than -90000000, it's set at -90000000. If it's less than or equal to the scaleMinimumValue, it's reset to 100 and scaleMinimumValue is reset to 0.

Datatype: Numeric

Valid values: -90000000 to 90000000

Default: 100

9

scale

Controls the visibility of the scale or use of ranges in the widget.

It defaults to 0 if the provided value is not set to 0, 1, or 2.

Datatype: Numeric

Valid values:

  • 0 - None

  • 1 - Show

  • 2 - Range (Allows use of the breakpoint values specified under ranges, where it displays a value with a maximum of 3 decimal places.)

Default: 0

If this is set to 1, this works together with numberOfDivision element.

10

numberOfDivision

Note This property is used if scale is set to 1.

The number of divisions within the scale, from the minimum to the maximum value.

This divides the difference between the maximum and minimum values of the scale. For example:

  • scaleMinimumValue = 0

  • scaleMaximumValue = 200

  • numberOfDivision = 5

So the difference between the scale's max and min values is 200. The difference divided by the number of divisions is 40. The scale tick marks are then shown as 0, 40, 80, 120, 160, and 200.

Datatype: Numeric

Valid values: 1 to 99

Default: 10

11

barBackgroundColor

The color to represent the background of the bar. It's set to default when it's null or empty.

Datatype: String (color value)

Default: "#CCCCCC" (gray)

12

barColor

The color to represent the bar. It's set to default when it's null or empty. It's used when ranges are not defined or if it's out of the ranges' maximum limit.

If ranges are defined, the rendered bar color follows the color of the breakpoint at which the value falls.

Datatype: String (color value)

Default: "#179D71" (green)

13

ranges

The breakpoint to apply in the widget's range bar.

Each data entry (value-color pair) under ranges corresponds to a breakpoint. If the value in an entry is greater than the scale maximum value, the widget takes the scale maximum value.

For example, see the ranges table below, Example 1 | without lookup.

Datatype: Object

Note This property is used if scale is set to 2.

14

enableTimerRefresh

Enables refresh based on the specified refresh rate. It's set to false when it's null or has a non-boolean value.

Datatype: Boolean

Valid values: true, false

Default: false

15

timerRefreshRate

The number of times in seconds the widget display is refreshed. This is used when enableTimerRefresh is set to true. It defaults to 30 when it's null, out-of-boundary, or has a non-numeric value.

Datatype: Numeric

Valid values: 10-600

Default: 30

16

columnNameMapping

For more information, see the columnNameMapping table below.

Enables column definition mapping.

Datatype: Object

Default: Empty string for all elements in Column Name Mapping properties

columnNameMapping

The columnNameMapping data element consists of the following sub-elements:

Element

Datatype

Default

1

uomColumnName

String

" "

2

targetValueColumnName

3

valueColumnName

Note If any of these sub-elements are not defined or empty, the value isn't fetched.

ranges

This is a collection of range elements that consists of value and color objects. This is used to define ranges bar scale when the scale is set to 2. The range bar is shown if the collection has at least one element. The bar color changes to a specified color when it's within the specified value.

Element

Datatype

1

value

Numeric

2

color

String

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in