/** * DevExtreme (viz/bar_gauge.d.ts) * Version: 21.1.7 * Build date: Thu Aug 07 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import { UserDefinedElement, DxElement, } from '../core/element'; import { PaletteType, PaletteExtensionModeType, } from './palette'; import { template, } from '../core/templates/template'; import { EventInfo, InitializedEventInfo, ChangedOptionInfo, } from '../events/index'; import { format, } from '../ui/widget/ui.widget'; import { BaseLegend, BaseLegendItem, } from './common'; import BaseWidget, { BaseWidgetLoadingIndicator, BaseWidgetOptions, BaseWidgetTooltip, Font, FileSavingEventInfo, ExportInfo, IncidentInfo, } from './core/base_widget'; /** * @docid * @type object * @namespace DevExpress.viz */ export interface BarGaugeBarInfo { /** * @docid * @public */ color?: string; /** * @docid * @public */ index?: number; /** * @docid * @public */ value?: number; } /** * @public * @namespace DevExpress.viz.dxBarGauge */ export type LegendItem = BarGaugeLegendItem; /** * @deprecated Use LegendItem instead * @namespace DevExpress.viz */ export interface BarGaugeLegendItem extends BaseLegendItem { /** * @docid * @public */ item?: BarGaugeBarInfo; } export interface TooltipInfo { target?: any; } /** @public */ export type DisposingEvent = EventInfo; /** @public */ export type DrawnEvent = EventInfo; /** @public */ export type ExportedEvent = EventInfo; /** @public */ export type ExportingEvent = EventInfo & ExportInfo; /** @public */ export type FileSavingEvent = FileSavingEventInfo; /** @public */ export type IncidentOccurredEvent = EventInfo & IncidentInfo; /** @public */ export type InitializedEvent = InitializedEventInfo; /** @public */ export type OptionChangedEvent = EventInfo & ChangedOptionInfo; /** @public */ export type TooltipHiddenEvent = EventInfo & TooltipInfo; /** @public */ export type TooltipShownEvent = EventInfo & TooltipInfo; /** * @deprecated use Properties instead * @namespace DevExpress.viz */ export interface dxBarGaugeOptions extends BaseWidgetOptions { /** * @docid * @inherits BaseGaugeOptions.animation * @public */ animation?: any; /** * @docid * @default '#e0e0e0' * @public */ backgroundColor?: string; /** * @docid * @default 4 * @public */ barSpacing?: number; /** * @docid * @default 0 * @notUsedInTheme * @public */ baseValue?: number; /** * @docid * @default 100 * @notUsedInTheme * @public */ endValue?: number; /** * @docid * @public */ geometry?: { /** * @docid * @default 315 */ endAngle?: number; /** * @docid * @default 225 */ startAngle?: number; }; /** * @docid * @public */ label?: { /** * @docid * @default undefined */ connectorColor?: string; /** * @docid * @default 2 */ connectorWidth?: number; /** * @docid * @notUsedInTheme */ customizeText?: ((barValue: { value?: number; valueText?: string }) => string); /** * @docid * @default 16 &prop(size) */ font?: Font; /** * @docid * @default undefined */ format?: format; /** * @docid * @default 20 */ indent?: number; /** * @docid * @default true */ visible?: boolean; }; /** * @docid * @inherits BaseLegend * @type object * @public */ legend?: dxBarGaugeLegend; /** * @docid * @type object * @public */ loadingIndicator?: dxBarGaugeLoadingIndicator; /** * @docid * @default null * @type_function_param1 e:object * @type_function_param1_field1 component:dxBarGauge * @type_function_param1_field2 element:DxElement * @type_function_param1_field3 model:any * @type_function_param1_field4 target:object * @notUsedInTheme * @action * @public */ onTooltipHidden?: ((e: TooltipHiddenEvent) => void); /** * @docid * @default null * @type_function_param1 e:object * @type_function_param1_field1 component:dxBarGauge * @type_function_param1_field2 element:DxElement * @type_function_param1_field3 model:any * @type_function_param1_field4 target:object * @notUsedInTheme * @action * @public */ onTooltipShown?: ((e: TooltipShownEvent) => void); /** * @docid * @default "Material" * @type Array|Enums.VizPalette * @public */ palette?: Array | PaletteType; /** * @docid * @default 'blend' * @type Enums.VizPaletteExtensionMode * @public */ paletteExtensionMode?: PaletteExtensionModeType; /** * @docid * @default 0.3 * @public */ relativeInnerRadius?: number; /** * @docid * @type Enums.BarGaugeResolveLabelOverlapping * @default 'hide' * @public */ resolveLabelOverlapping?: 'hide' | 'none'; /** * @docid * @default 0 * @notUsedInTheme * @public */ startValue?: number; /** * @docid * @type object * @public */ tooltip?: dxBarGaugeTooltip; /** * @docid * @default [] * @notUsedInTheme * @fires BaseWidgetOptions.onOptionChanged * @public */ values?: Array; } /** @namespace DevExpress.viz */ export interface dxBarGaugeLegend extends BaseLegend { /** * @docid dxBarGaugeOptions.legend.customizeHint * @public */ customizeHint?: ((arg: { item?: BarGaugeBarInfo; text?: string }) => string); /** * @docid dxBarGaugeOptions.legend.customizeItems * @type_function_param1 items:Array * @type_function_return Array * @public */ customizeItems?: ((items: Array) => Array); /** * @docid dxBarGaugeOptions.legend.customizeText * @notUsedInTheme * @public */ customizeText?: ((arg: { item?: BarGaugeBarInfo; text?: string }) => string); /** * @docid dxBarGaugeOptions.legend.itemTextFormat * @default undefined * @public */ itemTextFormat?: format; /** * @docid dxBarGaugeOptions.legend.markerTemplate * @default undefined * @type_function_param1 legendItem:BarGaugeLegendItem * @type_function_return string|SVGElement|jQuery * @public */ markerTemplate?: template | ((legendItem: LegendItem, element: SVGGElement) => string | UserDefinedElement); /** * @docid dxBarGaugeOptions.legend.visible * @default false * @public */ visible?: boolean; } /** @namespace DevExpress.viz */ export interface dxBarGaugeLoadingIndicator extends BaseWidgetLoadingIndicator { /** * @docid dxBarGaugeOptions.loadingIndicator.enabled * @hidden */ enabled?: boolean; } /** @namespace DevExpress.viz */ export interface dxBarGaugeTooltip extends BaseWidgetTooltip { /** * @docid dxBarGaugeOptions.tooltip.contentTemplate * @type_function_return string|Element|jQuery * @default undefined * @public */ contentTemplate?: template | ((scaleValue: { value?: number; valueText?: string; index?: number }, element: DxElement) => string | UserDefinedElement); /** * @docid dxBarGaugeOptions.tooltip.customizeTooltip * @default undefined * @type_function_return object * @public */ customizeTooltip?: ((scaleValue: { value?: number; valueText?: string; index?: number }) => any); /** * @docid dxBarGaugeOptions.tooltip.interactive * @default false * @public */ interactive?: boolean; } /** * @docid * @inherits BaseWidget * @namespace DevExpress.viz * @public */ export default class dxBarGauge extends BaseWidget { constructor(element: UserDefinedElement, options?: dxBarGaugeOptions) /** * @docid * @publicName values() * @public */ values(): Array; /** * @docid * @publicName values(newValues) * @public */ values(values: Array): void; } /** @public */ export type Properties = dxBarGaugeOptions; /** @deprecated use Properties instead */ export type Options = dxBarGaugeOptions; /** @deprecated use Properties instead */ export type IOptions = dxBarGaugeOptions;