CircularGauge

The dxCircularGauge is a widget that indicates values on a circular numeric scale.

Included in: dx.chartjs.js, dx.all.js
CircularGauge interactive configuration
Copy Code
Copy to Codepen
$("#circulargauge").dxCircularGauge({
});

                    

You can create the widget using one of the following approaches.

  • jQuery
    Use the dxCircularGauge jQuery plug-in.

    HTML
    <div id="gaugeContainer"></div>
    JavaScript
    $("#gaugeContainer").dxCircularGauge({
        scale: {
            startValue: 50,
            endValue: 150,
            tickInterval: 10
        },  
        rangeContainer: {
            ranges: [
                { startValue: 50, endValue: 90 },
                { startValue: 90, endValue: 130 },
                { startValue: 130, endValue: 150 }
            ]
        },
        value: 105
    });
  • Knockout
    Add a div element and apply the dxCircularGauge binding to this element.

    HTML
    <div data-bind="dxCircularGauge: {
        scale: {
            startValue: 50,
            endValue: 150,
            tickInterval: 10
        },  
        rangeContainer: {
            ranges: [
                { startValue: 50, endValue: 90 },
                { startValue: 90, endValue: 130 },
                { startValue: 130, endValue: 150 }
            ]
        },
        value: 105
    }"></div>
  • AngularJS
    Add a div element and apply the dx-circular-gauge directive to this element.

    HTML
    <div dx-circular-gauge="{
        scale: {
            startValue: 50,
            endValue: 150,
            tickInterval: 10
        },  
        rangeContainer: {
            ranges: [
                { startValue: 50, endValue: 90 },
                { startValue: 90, endValue: 130 },
                { startValue: 130, endValue: 150 }
            ]
        },
        value: 105
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on how to link the needed libraries, refer to the Installation article.

View Demo Watch Video

See Also

To learn the widget's concepts and overview features, refer to the Gauges section within the Data Visualization Guides.

Configuration

An object that defines configuration options for the dxCircularGauge widget.

Name Description
animation

Specifies animation options.

containerBackgroundColor

Specifies the color of the parent page element.

geometry

Specifies the options required to set the geometry of the dxCircularGauge widget.

loadingIndicator

Specifies the appearance of the loading indicator.

margin

Specifies the blank space in pixels between the widget's extreme elements and the boundaries of the area provided for the widget (see size).

onDisposing

A handler for the disposing event.

onDrawn

A handler for the drawn event.

onIncidentOccurred

A handler for the incidentOccurred event.

onInitialized

A handler for the initialized event.

onOptionChanged

A handler for the optionChanged event.

onTooltipHidden

A handler for the tooltipHidden event.

onTooltipShown

A handler for the tooltipShown event.

pathModified

Notifies a widget that it is embedded into an HTML page that uses a path modifier.

rangeContainer

Specifies gauge range container options.

redrawOnResize

Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates.

rtlEnabled

Specifies whether or not the widget supports right-to-left representation.

scale

Specifies a gauge's scale options.

size

Specifies the size of the widget in pixels.

subvalueIndicator

Specifies the appearance options of subvalue indicators.

subvalues

Specifies a set of subvalues to be designated by the subvalue indicators.

theme

Sets the name of the theme to be used in the widget.

title

Specifies a title for the gauge.

tooltip

Specifies tooltip options for the gauge.

value

Specifies the main value on a gauge.

valueIndicator

Specifies the appearance options of the value indicator.

Methods

This section describes the methods that can be used in code to manipulate objects related to the dxCircularGauge widget.

Name Description
beginUpdate()

Prevents the component from refreshing until the endUpdate method is called.

element()

Returns the root HTML element of the widget.

endUpdate()

Enables the component to refresh after the beginUpdate method call.

hideLoadingIndicator()

Conceals the loading indicator.

instance()

Returns an instance of this component class.

off(eventName)

Detaches all event handlers from the specified event.

off(eventName, eventHandler)

Detaches a particular event handler from the specified event.

on(eventName, eventHandler)

Subscribes to a specified event.

on(events)

Subscribes to the specified events.

option()

Returns the configuration options of this component.

option(optionName)

Gets the value of the specified configuration option of this component.

option(optionName, optionValue)

Sets a value to the specified configuration option of this component.

option(options)

Sets one or more options of this component.

render()

Redraws a widget.

showLoadingIndicator()

Displays the loading indicator.

subvalues()

Returns an array of gauge subvalues.

subvalues(subvalues)

Updates gauge subvalues.

svg()

Returns the widget's SVG markup.

value()

Returns the main gauge value.

value(value)

Updates a gauge value.

Events

This section describes events fired by this widget.

Name Description
disposing

Fires when the widget is being removed.

drawn

Fires when the widget has finished drawing itself.

incidentOccurred

Fires when an error or warning appears in a widget.

initialized

Fires when the widget is initialized.

optionChanged

Fires after an option of the component is changed.

tooltipHidden

Fires when an indicator's tooltip becomes hidden.

tooltipShown

Fires when an indicator's tooltip appears.

Indicator Types

This section lists objects that define options used to configure value and subvalue indicators of specific types.