UNPKG

@progress/kendo-angular-gauges

Version:
76 lines (75 loc) 3.56 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, ContentChildren, QueryList } from '@angular/core'; import { CollectionComponent } from '../base-components'; import { LinearRangeComponent } from './range.component'; import { CollectionChangesService, ConfigurationService } from '../services'; import * as i0 from "@angular/core"; import * as i1 from "../services"; /** * Represents a collection of one or more LinearGauge scale ranges * ([more information and example]({% slug scaleranghes_lineargauge %})). * * You can use this component to define multiple ranges on your LinearGauge scale. Each range displays a colored segment * that highlights specific value intervals on the LinearGauge. * * @example * ```ts * import { Component } from '@angular/core'; * * @Component({ * selector: 'my-app', * template: ` * <kendo-lineargauge> * <kendo-lineargauge-scale> * <kendo-lineargauge-scale-ranges> * <kendo-lineargauge-scale-range *ngFor="let range of ranges" * [from]="range.from" [to]="range.to" [color]="range.color"> * </kendo-lineargauge-scale-range> * </kendo-lineargauge-scale-ranges> * </kendo-lineargauge-scale> * </kendo-lineargauge> * ` * }) * export class AppComponent { * public ranges: any[] = [{ * from: 0, * to: 15, * color: '#ffd246' * }, { * from: 15, * to: 30, * color: '#28b4c8' * }, { * from: 30, * to: 50, * color: '#78d237' * }]; * } * ``` * * @remarks * Supported children components are: {@link LinearRangeComponent} */ export class LinearRangesComponent extends CollectionComponent { children; constructor(configurationService, collectionChangesService) { super('scale.ranges', configurationService, collectionChangesService); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LinearRangesComponent, deps: [{ token: i1.ConfigurationService }, { token: i1.CollectionChangesService }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: LinearRangesComponent, isStandalone: true, selector: "kendo-lineargauge-scale-ranges", providers: [CollectionChangesService], queries: [{ propertyName: "children", predicate: LinearRangeComponent }], usesInheritance: true, ngImport: i0, template: '', isInline: true }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LinearRangesComponent, decorators: [{ type: Component, args: [{ providers: [CollectionChangesService], selector: 'kendo-lineargauge-scale-ranges', template: '', standalone: true }] }], ctorParameters: function () { return [{ type: i1.ConfigurationService }, { type: i1.CollectionChangesService }]; }, propDecorators: { children: [{ type: ContentChildren, args: [LinearRangeComponent] }] } });