@progress/kendo-angular-gauges
Version:
Kendo UI Angular Gauges
73 lines (72 loc) • 3.16 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, ContentChildren, QueryList } from '@angular/core';
import { CollectionComponent } from '../base-components';
import { ColorComponent } from './color.component';
import { CollectionChangesService, ConfigurationService } from '../services';
import * as i0 from "@angular/core";
import * as i1 from "../services";
/**
* A collection of one or more ArcGauge colors
* ([more information and example]({% slug colorranges_arcgauge %})).
*
* @example
* ```ts
* import { Component } from '@angular/core';
*
* _@Component({
* selector: 'my-app',
* template: `
* <kendo-arcgauge [value]="value">
* <kendo-arcgauge-colors>
* <kendo-arcgauge-color *ngFor="let item of colors"
* [from]="item.from" [to]="item.to" [color]="item.color">
* </kendo-arcgauge-color>
* </kendo-arcgauge-colors>
* </kendo-arcgauge>
* `
* })
* export class AppComponent {
* public value: number = 10;
*
* public colors: any[] = [{
* to: 25,
* color: '#0058e9'
* }, {
* from: 25,
* to: 50,
* color: '#37b400'
* }, {
* from: 50,
* to: 75,
* color: '#ffc000'
* }, {
* from: 75,
* color: '#f31700'
* }];
* }
*
* ```
*/
export class ColorsComponent extends CollectionComponent {
children;
constructor(configurationService, collectionChangesService) {
super('colors', configurationService, collectionChangesService);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorsComponent, deps: [{ token: i1.ConfigurationService }, { token: i1.CollectionChangesService }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ColorsComponent, isStandalone: true, selector: "kendo-arcgauge-colors", providers: [CollectionChangesService], queries: [{ propertyName: "children", predicate: ColorComponent }], usesInheritance: true, ngImport: i0, template: '', isInline: true });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ColorsComponent, decorators: [{
type: Component,
args: [{
providers: [CollectionChangesService],
selector: 'kendo-arcgauge-colors',
template: '',
standalone: true
}]
}], ctorParameters: function () { return [{ type: i1.ConfigurationService }, { type: i1.CollectionChangesService }]; }, propDecorators: { children: [{
type: ContentChildren,
args: [ColorComponent]
}] } });