devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
217 lines (192 loc) • 6.68 kB
TypeScript
/**
* DevExtreme (viz/linear_gauge.d.ts)
* Version: 24.2.7
* Build date: Mon Apr 28 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import {
EventInfo,
InitializedEventInfo,
ChangedOptionInfo,
} from '../common/core/events';
import {
FileSavingEventInfo,
ExportInfo,
IncidentInfo,
} from './core/base_widget';
import {
BaseGauge,
BaseGaugeOptions,
BaseGaugeRangeContainer,
BaseGaugeScale,
BaseGaugeScaleLabel,
GaugeIndicator,
TooltipInfo,
} from './gauges/base_gauge';
import {
HorizontalAlignment,
Orientation,
VerticalAlignment,
} from '../common';
export {
HorizontalAlignment,
Orientation,
VerticalAlignment,
};
/**
* The type of the disposing event handler's argument.
*/
export type DisposingEvent = EventInfo<dxLinearGauge>;
/**
* The type of the drawn event handler's argument.
*/
export type DrawnEvent = EventInfo<dxLinearGauge>;
/**
* The type of the exported event handler's argument.
*/
export type ExportedEvent = EventInfo<dxLinearGauge>;
/**
* The type of the exporting event handler's argument.
*/
export type ExportingEvent = EventInfo<dxLinearGauge> & ExportInfo;
/**
* The type of the fileSaving event handler's argument.
*/
export type FileSavingEvent = FileSavingEventInfo<dxLinearGauge>;
/**
* The type of the incidentOccurred event handler's argument.
*/
export type IncidentOccurredEvent = EventInfo<dxLinearGauge> & IncidentInfo;
/**
* The type of the initialized event handler's argument.
*/
export type InitializedEvent = InitializedEventInfo<dxLinearGauge>;
/**
* The type of the optionChanged event handler's argument.
*/
export type OptionChangedEvent = EventInfo<dxLinearGauge> & ChangedOptionInfo;
/**
* The type of the tooltipHidden event handler's argument.
*/
export type TooltipHiddenEvent = EventInfo<dxLinearGauge> & TooltipInfo;
/**
* The type of the tooltipShown event handler's argument.
*/
export type TooltipShownEvent = EventInfo<dxLinearGauge> & TooltipInfo;
/**
*
* @deprecated
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
*/
export interface dxLinearGaugeOptions extends BaseGaugeOptions<dxLinearGauge> {
/**
* Specifies the properties required to set the geometry of the LinearGauge UI component.
*/
geometry?: {
/**
* Indicates whether to display the LinearGauge UI component vertically or horizontally.
*/
orientation?: Orientation;
};
/**
* Specifies gauge range container properties.
*/
rangeContainer?: RangeContainer;
/**
* Specifies the gauge's scale properties.
*/
scale?: Scale;
/**
* Specifies the appearance properties of subvalue indicators.
*/
subvalueIndicator?: GaugeIndicator;
/**
* Specifies the appearance properties of the value indicator.
*/
valueIndicator?: GaugeIndicator;
}
/**
* Specifies gauge range container properties.
*/
export type RangeContainer = BaseGaugeRangeContainer & {
/**
* Specifies the orientation of the range container. Applies only if the geometry.orientation property is 'vertical'.
*/
horizontalOrientation?: HorizontalAlignment;
/**
* Specifies the orientation of the range container. Applies only if the geometry.orientation property is 'horizontal'.
*/
verticalOrientation?: VerticalAlignment;
/**
* Specifies the width of the range container's start and end boundaries in the LinearGauge UI component.
*/
width?: {
/**
* Specifies a start width of a range container.
*/
start?: number;
/**
* Specifies an end width of a range container.
*/
end?: number;
} | number;
};
/**
* Specifies the gauge's scale properties.
*/
export type Scale = BaseGaugeScale & {
/**
* Specifies the orientation of scale ticks. Applies only if the geometry.orientation property is 'vertical'.
*/
horizontalOrientation?: HorizontalAlignment;
/**
* Specifies common properties for scale labels.
*/
label?: ScaleLabel;
/**
* Specifies the minimum distance between two neighboring major ticks in pixels.
*/
scaleDivisionFactor?: number;
/**
* Specifies the orientation of scale ticks. Applies only if the geometry.orientation property is 'horizontal'.
*/
verticalOrientation?: VerticalAlignment;
};
/**
* Specifies common properties for scale labels.
*/
export type ScaleLabel = BaseGaugeScaleLabel & {
/**
* Specifies the spacing between scale labels and ticks.
*/
indentFromTick?: number;
};
/**
* The LinearGauge is a UI component that indicates values on a linear numeric scale.
*/
export default class dxLinearGauge extends BaseGauge<dxLinearGaugeOptions> { }
export type Properties = dxLinearGaugeOptions;
/**
* @deprecated use Properties instead
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
*/
export type Options = dxLinearGaugeOptions;
// #region deprecated in v23.1
/**
* @deprecated Use RangeContainer instead
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
*/
export type dxLinearGaugeRangeContainer = RangeContainer;
/**
* @deprecated Use Scale instead
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
*/
export type dxLinearGaugeScale = Scale;
/**
* @deprecated Use ScaleLabel instead
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
*/
export type dxLinearGaugeScaleLabel = ScaleLabel;
// #endregion