@progress/kendo-angular-gauges
Version:
Kendo UI Angular Gauges
92 lines (91 loc) • 4.81 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* 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 { LinearGauge } 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 LinearGauge component for Angular]({% slug overview_lineargauge_gauges %}).
*
* @example
* ```ts
* import { Component } from '@angular/core';
*
* _Component({
* selector: 'my-app',
* template: `
* <kendo-lineargauge [pointer]="{ value: value }">
* </kendo-lineargauge>
* `
* })
* class AppComponent {
* public value: number = 10;
* }
* ```
*
* @remarks
* Supported children components are: {@link LinearScaleComponent}, {@link LinearLabelsComponent}, {@link LinearGaugeAreaComponent}, {@link LinearPointersComponent}, {@link LinearRangesComponent}.
*/
export class LinearGaugeComponent extends GaugeComponent {
/**
* Configures the pointers of the LinearGauge.
*/
pointer;
/**
* Configures the scale of the LinearGauge.
*/
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 LinearGauge(element, options, theme, context);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LinearGaugeComponent, 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: "16.2.12", type: LinearGaugeComponent, isStandalone: true, selector: "kendo-lineargauge", inputs: { pointer: "pointer", scale: "scale" }, providers: [
ConfigurationService,
LocalizationService,
{
provide: L10N_PREFIX,
useValue: 'kendo.lineargauge'
}
], exportAs: ["kendoLinearGauge"], 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: "16.2.12", ngImport: i0, type: LinearGaugeComponent, decorators: [{
type: Component,
args: [{
changeDetection: ChangeDetectionStrategy.OnPush,
exportAs: 'kendoLinearGauge',
providers: [
ConfigurationService,
LocalizationService,
{
provide: L10N_PREFIX,
useValue: 'kendo.lineargauge'
}
],
selector: 'kendo-lineargauge',
template: `
<div #surface class='k-chart-surface'></div>
<kendo-resize-sensor (resize)="onResize()" [rateLimit]="resizeRateLimit"></kendo-resize-sensor>
`,
standalone: true,
imports: [ResizeSensorComponent]
}]
}], ctorParameters: function () { return [{ 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
}] } });