CircularGauge

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

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

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

jQuery
JavaScript
HTML
$(function () {
    $("#circularGauge").dxCircularGauge({
        scale: {
            startValue: 50,
            endValue: 150
        },    
        rangeContainer: {
            ranges: [
                { startValue: 50, endValue: 90 },
                { startValue: 90, endValue: 130 },
                { startValue: 130, endValue: 150 }
            ]
        },
        value: 105
    });
});
<div id="circularGauge"></div>
Angular
HTML
<dx-circular-gauge [value]="105">
    <dxo-scale
        [startValue]="50"
        [endValue]="150">
    </dxo-scale>
    <dxo-rangeContainer>
        <dxi-range 
            [startValue]="50"
            [endValue]="90">
        </dxi-range>
        <dxi-range 
            [startValue]="90"
            [endValue]="130">
        </dxi-range>
        <dxi-range 
            [startValue]="130"
            [endValue]="150">
        </dxi-range>
    </dxo-rangeContainer>
</dx-circular-gauge>
AngularJS
HTML
<div dx-circular-gauge="{
    scale: {
        startValue: 50,
        endValue: 150
    },    
    rangeContainer: {
        ranges: [
            { startValue: 50, endValue: 90 },
            { startValue: 90, endValue: 130 },
            { startValue: 130, endValue: 150 }
        ]
    },
    value: 105
}"></div>
Knockout
HTML
<div data-bind="dxCircularGauge: {
    scale: {
        startValue: 50,
        endValue: 150
    },    
    rangeContainer: {
        ranges: [
            { startValue: 50, endValue: 90 },
            { startValue: 90, endValue: 130 },
            { startValue: 130, endValue: 150 }
        ]
    },
    value: 105
}"></div>
ASP.NET MVC Controls
Razor C#
Razor VB
@(Html.DevExtreme().CircularGauge()
    .ID("circularGauge")
    .Scale(scale => scale
        .StartValue(50)
        .EndValue(50)
    )
    .RangeContainer(rc => rc
        .Ranges(ranges => {
            ranges.Add().StartValue(50).EndValue(90);
            ranges.Add().StartValue(90).EndValue(130);
            ranges.Add().StartValue(130).EndValue(150);
        })
    )
)
@(Html.DevExtreme().CircularGauge() _
    .ID("circularGauge") _
    .Scale(Sub(scale)
        scale.StartValue(50) _
                .EndValue(50)
    End Sub) _
    .RangeContainer(Sub(rc)
        rc.Ranges(Sub(ranges)
            ranges.Add().StartValue(50).EndValue(90)
            ranges.Add().StartValue(90).EndValue(130)
            ranges.Add().StartValue(130).EndValue(150)
        End Sub)
    End Sub)
)

Note that DevExtreme widgets require you to link the jQuery library to your application. If you use the Knockout or AngularJS approach, the Knockout or AngularJS library is also required. For detailed information on linking these libraries to your project, refer to the topics in the Installation section.

View Demo Watch Video

See Also

Configuration

An object that defines configuration options for the CircularGauge widget.

Methods

This section describes methods that can be used to manipulate the widget.

Events

This section describes events fired by this widget.

See Also

Indicator Types

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