All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

GaugeContext Class

Provides a connection between data item containers from the Gauges section and underlying control's gauges.

Declaration

export class GaugeContext

Remarks

The following code snippet shows how to use GaugeContext to get a Gauge item's gauges:

var Model = DevExpress.Dashboard.Model;

function onItemWidgetOptionsPrepared(args) {
    if(args.dashboardItem instanceof Model.GaugeItem) {
        var gaugeOptions = args.options;
        var dashboardGauge = args.gaugeContext.getDashboardItemGauge(gaugeOptions);
        if(dashboardGauge.deltaOptions.valueType() === 'AbsoluteVariation') {
            gaugeOptions.title.text = 'AbsoluteVariation: ' + gaugeOptions.title.text;
        }
    }
}

constructor(_dashboardItem)

Initializes a new instance of the GaugeContext class with specified settings.

Declaration

constructor(_dashboardItem: GaugeItem)

Parameters

Name Type
_dashboardItem GaugeItem

Methods

getDashboardItemGauge(gaugeOptions) Method

Declaration

getDashboardItemGauge(gaugeOptions: DevExpress.viz.dxLinearGaugeOptions | DevExpress.viz.dxCircularGaugeOptions): Gauge

Parameters

Name Type
gaugeOptions dxLinearGaugeOptions | dxCircularGaugeOptions

Returns

Type
Gauge