An object that defines configuration options for the BarGauge 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 bars 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 a color for the remaining segment of the bar's track.
BarGauge displays values in the form of several circular bars each placed on a separate track. Since a bar indicates a value, it occupies only a segment of this track. The remaining segment is drawn in the color specified by the backgroundColor option.
Specifies a distance between bars in pixels.
Specifies a base value for bars.
By default, all bars start from the beginning of the gauge's scale. If you need to draw them starting from a specific scale value, assign the required value to the baseValue option. In this instance, each bar will display the range from the baseValue to the corresponding value specified to this bar.
Specifies an end value for the gauge's invisible scale.
Configures the exporting and printing features.
These features allow a user to export your widget into a document or print it. When exporting is enabled, the "Exporting/Printing" button appears in the widget. A click on it invokes a drop-down menu that lists exporting and printing commands. The following formats are supported for exporting into: PNG, PDF, JPEG, SVG and GIF.
- exportTo(fileName, format) - exports the widget.
- print() - opens the browser's print window.
- DevExpress.viz.exportFromMarkup(markup, options) - exports the widget using its SVG markup.
Defines the shape of the gauge's arc.
Specify the startAngle and endAngle options of the geometry configuration object to customize the shape of the bar gauge's arc. This arc is drawn from the startAngle to the endAngle as illustrated by the following image.
Specifies the options of the labels that accompany gauge bars.
Each gauge bar is accompanied by a label that usually displays the value of the bar. Use the options of the label object to customize the label's text, specify its format, font, and distance between the label and the bar.
To hide labels, use the label | visible option or assign false straight to the label option.
Configures the loading indicator.
When the widget visualizes local data, loading is instant. But when the widget is bound to a remote data source, loading may takes a considerable amount of time. To keep the viewer's attention, the widget can display a loading indicator.
To activate the loading indicator, assign true to the loadingIndicator | show option. Once data is loaded, the loading indicator will be hidden automatically.
A handler for the disposing event.
A handler for the drawn event.
Assign a callback function to this option if you need to perform specific actions when the widget has finished drawing itself. When implementing this function, you can access the drawn widget using the function's parameter.
A handler for the exported event.
To perform a custom action after data from the widget is exported, assign a function to this option. For example, this function can notify the user that the exporting has been completed. Within this function, you can use the object passed to it as the parameter.
A handler for the exporting event.
To perform a custom action before data from the widget is exported, assign a function to this option. Within this function, you can use the object passed to it as the parameter. For example, using the cancel field of this object, you can cancel exporting.
A handler for the fileSaving event.
Possible Values: 'PNG' | 'PDF' | 'JPEG' | 'SVG' | 'GIF'
To perform a custom action before a file with exported data is saved on the user's local storage, assign a function to this option. Within this function, you can use the object passed to it as the parameter. For example, using the cancel field of this object, you can cancel file saving.
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 bar's tooltip becomes invisible when a user hovers the mouse cursor over another bar 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 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 bar. You can use its index field to get the index of the hovered bar.
A handler for the tooltipShown event.
The tooltip appears when a user hovers the mouse cursor over a bar.
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 bar. You can use its index field to get the index of the hovered bar.
Sets the name of the palette or an array of colors to be used for coloring the gauge range container.
Use this option to set a predefined or custom palette. The colors listed in the specified palette will be used to draw bars. If the number of the bars is greater than the number of colors in the palette, palette colors are repeated, but slightly modified.
In addition, you can declare an array of colors and use it as a palette. Refer to the Palettes topic for more information on palettes.
Notifies a widget that it is embedded into an HTML page that uses a path modifier.
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.
Defines the radius of the bar that is closest to the center relatively to the radius of the topmost bar.
This option accepts values from the (0, 1) range.
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 size of the widget in pixels.
By default, the widget occupies the entire area of the parent container. If you need to set a particular size for the widget, different from the container's size, assign a height and width in pixels to height and width properties of the size object.
Using the size object, you can hide the widget. For this purpose, simply assign 0 to both the height and width of the widget.
Specifies a start value for the gauge's invisible scale.
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.
Specifies the widget title.
Use this property to set the text to be displayed as the widget title. If you need to specify the title's position in the widget, assign an object to the title property with the required fields specified. In this instance, set the title's text using the text property.
The widget can display additional text in the subtitle. It is placed under the title. Use properties of the subtitle object to assign a text to the subtitle and change its font.
A tooltip is a miniature rectangle displaying the value of a gauge's bar. A tooltip appears when the end-user hovers the cursor over a bar. You can enable/disable tooltips, change their appearance and format their text using fields of the tooltip configuration object.
Specifies the array of values to be indicated on a bar gauge.