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: DevExpress.Dashboard.Model.GaugeItem
)
Parameters
Name | Type |
---|---|
_dashboardItem | GaugeItem |
Methods
getDashboardItemGauge(gaugeOptions) Method
Declaration
getDashboardItemGauge(
gaugeOptions: DevExpress.viz.dxLinearGauge.Properties | DevExpress.viz.dxCircularGauge.Properties
): DevExpress.Dashboard.Model.Gauge
Parameters
Name | Type |
---|---|
gaugeOptions | any |
Returns
Type |
---|
Gauge |