UNPKG

@progress/kendo-angular-gauges

Version:
94 lines (93 loc) 4.94 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Component, NgZone, Input, ChangeDetectionStrategy, ElementRef, Renderer2 } from '@angular/core'; import { ConfigurationService, ThemeService } from '../services'; import { IntlService } from '@progress/kendo-angular-intl'; import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n'; import { GaugeComponent } from '../base-components'; import { RadialGauge } from '@progress/kendo-charts'; import { ResizeSensorComponent } from '@progress/kendo-angular-common'; import * as i0 from "@angular/core"; import * as i1 from "../services"; import * as i2 from "@progress/kendo-angular-intl"; import * as i3 from "@progress/kendo-angular-l10n"; /** * Represents the [Kendo UI RadialGauge component for Angular]({% slug overview_radialgauge_gauges %}). * * @example * ```ts * import { Component } from '@angular/core'; * * @Component({ * selector: 'my-app', * template: ` * <kendo-radialgauge [pointer]="{ value: value }"> * </kendo-radialgauge> * ` * }) * export class AppComponent { * public value: number = 10; * } * ``` * * @remarks * Supported children components are: {@link RadialGaugeAreaComponent}, {@link RadialLabelsComponent}, {@link RadialPointersComponent}, {@link RadialRangesComponent}, {@link RadialScaleComponent}. */ export class RadialGaugeComponent extends GaugeComponent { /** * Sets the configuration of the pointers. * You can configure single or multiple pointers for the RadialGauge. */ pointer; /** * Sets the configuration of the scale. * The scale defines the range, appearance, and behavior of the gauge. */ scale; constructor(configurationService, themeService, intlService, localizationService, element, renderer, ngZone) { super(configurationService, themeService, intlService, localizationService, element, renderer, ngZone); } createInstance(element, options, theme, context) { this.instance = new RadialGauge(element, options, theme, context); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RadialGaugeComponent, deps: [{ token: i1.ConfigurationService }, { token: i1.ThemeService }, { token: i2.IntlService }, { token: i3.LocalizationService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: RadialGaugeComponent, isStandalone: true, selector: "kendo-radialgauge", inputs: { pointer: "pointer", scale: "scale" }, providers: [ ConfigurationService, LocalizationService, { provide: L10N_PREFIX, useValue: 'kendo.radialgauge' } ], exportAs: ["kendoRadialGauge"], usesInheritance: true, ngImport: i0, template: ` <div #surface class='k-chart-surface'></div> <kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor> `, isInline: true, dependencies: [{ kind: "component", type: ResizeSensorComponent, selector: "kendo-resize-sensor", inputs: ["rateLimit"], outputs: ["resize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RadialGaugeComponent, decorators: [{ type: Component, args: [{ changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'kendoRadialGauge', providers: [ ConfigurationService, LocalizationService, { provide: L10N_PREFIX, useValue: 'kendo.radialgauge' } ], selector: 'kendo-radialgauge', template: ` <div #surface class='k-chart-surface'></div> <kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor> `, standalone: true, imports: [ResizeSensorComponent] }] }], ctorParameters: () => [{ type: i1.ConfigurationService }, { type: i1.ThemeService }, { type: i2.IntlService }, { type: i3.LocalizationService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { pointer: [{ type: Input }], scale: [{ type: Input }] } });