An object that defines configuration options for the dxLinearGauge widget.
Specifies animation options.
To make your gauge "live", enable animation for it by setting the enabled option of the animation object to true. In this instance, the gauge indicators will appear in motion. In addition, within the animation object, you can set an appropriate easing mode using the easing option and specify how long the animation should run using the duration option.
Specifies the color of the parent page element.
Set this property to the color of the parent page element. Certain elements of the widget will use this color so that they coordinate with the page. Currently, different auxiliary separators use the container background color, so there is no need to set a custom color for them.
Specifies the options required to set the geometry of the dxLinearGauge widget.
Specifies the appearance of the loading indicator.
Usually, the widget is quick enough to draw itself instantly for a viewer. There are, however, cases, when the widget takes longer to be drawn. In such cases, displaying the loading indicator is recommended. To display the loading indicator, assign true to the show field of the loadingIndicator object. Use other fields of this object to change the appearance of the loading indicator.
In this example, the gauge options are assigned 2000 ms after the example is loaded. Until that time the loading indicator is displayed. Its background and font are changed using the backgroundColor and font options respectively. Take note that these options should be specified at design-time so that the changes are applied at the right time.
Specifies the blank space in pixels between the widget's extreme elements and the boundaries of the area provided for the widget (see the size option).
Set the required values for the left, right, top and bottom margins using the margin object's corresponding options.
A handler for the disposing event.
A handler for the drawn event.
If you need to perform specific actions when the widget has finished drawing itself, assign a callback function to the drawn option. When implementing this function, you can access the drawn widget using the function's parameter.
A handler for the incidentOccurred event.
When an error or warning appears, the widget notifies you by passing a message to the browser console. This message contains the ID of the incident, a brief description, and a link to the Errors and Warnings section where further information about this incident can be found. However, you can handle errors and warnings in the way that you require. To do this, implement a callback function performing the required actions and assign it to the onIncidentOccurred option. Within this function, you can use information about the incident that occurred. This information can be accessed from the target field of the object passed to the callback function as a parameter. This information includes the following.
Contains the ID of the incident. The full list of IDs can be found in the Errors and Warnings section.
Contains the type of the incident. This field equals 'error' for errors or 'warning' for warnings.
Contains the argument of the incident's message. The content of this field varies greatly, depending on the incident. For example, it may contain the name of the data source field that was not specified correctly, or the name of the option that was not set properly.
Contains the text passed to the browser console. This text includes the content of the args field, if there are any.
Contains the name of the widget that produced the error or warning.
Contains the currently used version of the ChartJS library.
A handler for the initialized event.
Assign a function to perform a custom action when the widget is initialized.
A handler for the optionChanged event.
Assign a function to perform a custom action after an option of the component is changed.
A handler for the tooltipHidden event.
The indicator's tooltip becomes invisible when a user hovers the mouse cursor over another indicator or moves it outside the widget.
When a tooltip is made hidden, you can perform specific actions by handling the tooltipHidden event. To do this, implement a handling function and assign it to this option. When implementing a handling function, use the object passed to it as its parameter. This object will provide you with the widget instance, its container and the object describing the hovered indicator. You can use its index field to get the index of the hovered subvalue indicator (the index of the main value indicator is undefined).
A handler for the tooltipShown event.
The tooltip appears when a user hovers the mouse cursor over an indicator.
When a tooltip appears, you can perform specific actions by handling the tooltipShown event. To do this, implement a handling function and assign it to this option. When implementing this function, use the object passed to it as its parameter. This object will provide you with the widget instance, its container and the object describing the hovered indicator. You can use its index field to get the index of the hovered subvalue indicator (the index of the main value indicator is undefined).
Notifies a widget that it is embedded into an HTML page that uses a path modifier.
Specifies gauge range container options.
For the purpose of more intelligible data visualization, you can combine values into ranges and color each range differently. For instance, you can indicate the range of warm and cold temperatures. To set the ranges, assign an array of objects defining the ranges to the ranges property of the rangeContainer configuration object. In addition, you can specify the orientation of the ranges relative to an invisible scale line, and an offset from this line using the rangeContainer properties.
In this example, a number of options within the rangeContainer configuration object is changed. The range container is divided into ranges that are defined by the ranges option. These ranges are moved from the scale to a 5-pixel distance using the offset option. In addition, the backgroundColor option is set to firebrick.
Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates.
When this option is set to true, the widget will be redrawn automatically in case the size of its parent window changes.
Specifies whether or not the widget supports right-to-left representation.
The most common scenario is switching all the widgets to a right-to-left reading order. In this instance, set the DevExpress.rtlEnabled field to true. If you need to switch the reading order in a particular widget, use the rtlEnabled configuration option of this widget.
Specifies the gauge's scale options.
To divide a scale, set its startValue and endValue properties. The scale's major and minor ticks will be calculated automatically, so that the tick labels do not overlap each other. Major ticks will be shown by default. To show minor ticks, set their visible property to true. You can set custom major and minor tick intervals, show custom major and minor ticks, and format tick labels. These and other scale options are available in the scale configuration object.
Specifies the size of the widget in pixels.
The widget occupies the entire area of the parent container (division). If the container size (width or height) is set to zero, the widgets are not displayed.
To set the widget to a specific size that differs from the container size, use the size configuration object. Assign a height and width in pixels to the height and width properties.
Specifies the appearance options of subvalue indicators.
The dxLinearGauge widget can display one main value and several subvalues. The gauge's main value and subvalues are indicated by special pointers. You can customize the appearance of these pointers using the valueIndicator and subvalueIndicator configuration objects correspondingly.
The subvalue indicator is a pointer, which designates an extra value on a scale. There are several types of subvalue indicators. Set the required one by using the type option, and then specify the options that are specific to this type, if needed. To learn the options that can be specified for a particular type, refer to one of the following sections.
Specifies a set of subvalues to be designated by the subvalue indicators.
In addition to one main value, you can indicate several extra values on a gauge. These are called subvalues. To specify the subvalues, assign an array with them to the subvalues field.
You can obtain and change the subvalues at runtime. In order to do this, use the subvalues() and subvalues(subvalues) methods.
Subvalues are designated by subvalue indicators. You can customize the appearance of these indicators using the subvalueIndicator configuration object.
Sets the name of the theme to be used in the widget.
Use this property to set a predefined or custom theme. The options defining chart appearance will be set to the values that are set in the specified theme. You can override some of these values within the chart's configuration object.
In this example, a custom theme is implemented and applied to a gauge. In addition, you can change the type of the value indicator using the drop-down menu under the gauge. Note that options for the value indicator of each type are specified in separate objects within the gauge | valueIndicator configuration object.
Specifies a title for the gauge.
Use this property to set the text for the gauge title. If you need to specify the title's position on the widget, assign an object to the title property with the required title options specified. In this instance, set the title text using the text property. When title text is not specified, the widget is displayed without a title.
You can also place details on the gauge below the title. To do this, specify the subtitle configuration option.
Specifies tooltip options for the gauge.
A tooltip is a small pop-up rectangle that displays the value of the indicator that is currently hovered over. You can enable or disable tooltips, format or customize the displayed text, and change the default appearance. Use the properties of the tooltip configuration object to do this.
Specifies the main value on a gauge.
The main value is designated by the value indicator. To customize the appearance of the value indicator, use the valueIndicator configuration object.
You can obtain and change the gauge value at runtime. In order to do this, use the value() and value(value) methods.
Only one main value can be indicated on a gauge. Besides the main gauge value, you can indicate several extra values. Refer to the subvalues option description for more information.
Specifies the appearance options of the value indicator.
The value indicator is a pointer that designates the main value of the gauge. There are several types of value indicators. Set the required one by using the type option, and then specify the options that are specific to this type, if needed. To learn about the options that can be specified for a particular type, refer to one of the following sections.