UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

183 lines (182 loc) 7.83 kB
import { __extends } from "tslib"; import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { IgxSeriesComponent } from "./igx-series-component"; import { TrendLineType_$type } from "igniteui-angular-core"; import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component"; import { TrendLineLayer } from "./TrendLineLayer"; import { ensureEnum } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents the class of the value overlay. The value overlay is a line or circle representing a value on an axis. */ var IgxTrendLineLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxTrendLineLayerComponent, _super); function IgxTrendLineLayerComponent() { return _super.call(this) || this; } IgxTrendLineLayerComponent.prototype.createImplementation = function () { return new TrendLineLayer(); }; Object.defineProperty(IgxTrendLineLayerComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxTrendLineLayerComponent.prototype, "isAnnotationLayer", { get: function () { return this.i.ev; }, enumerable: false, configurable: true }); Object.defineProperty(IgxTrendLineLayerComponent.prototype, "isLineOnly", { get: function () { return this.i.fn; }, enumerable: false, configurable: true }); Object.defineProperty(IgxTrendLineLayerComponent.prototype, "targetSeries", { /** * Gets or sets the series to target this annotation to. */ get: function () { var r = this.i.aat; if (r == null) { return null; } if (!r.externalObject) { var e = IgxSeriesComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.aat = null : this.i.aat = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxTrendLineLayerComponent.prototype, "actualTargetSeries", { /** * Gets the actual series being targeted by this annotation. */ get: function () { var r = this.i.aas; if (r == null) { return null; } if (!r.externalObject) { var e = IgxSeriesComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, set: function (v) { if (v != null && this._stylingContainer && v._styling) v._styling(this._stylingContainer, this, this); v == null ? this.i.aas = null : this.i.aas = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxTrendLineLayerComponent.prototype, "trendLineType", { /** * Gets or sets the trend type for the current series object. */ get: function () { return this.i.aav; }, set: function (v) { this.i.aav = ensureEnum(TrendLineType_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxTrendLineLayerComponent.prototype, "trendLinePeriod", { /** * Gets or sets the trend line period for the target series. * The typical, and initial, value for trend line period is 7. */ get: function () { return this.i.aaw; }, set: function (v) { this.i.aaw = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxTrendLineLayerComponent.prototype, "isUsableInLegend", { get: function () { return this.i.isUsableInLegend; }, enumerable: false, configurable: true }); IgxTrendLineLayerComponent.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) { return this.targetSeries; } if (this.actualTargetSeries && this.actualTargetSeries.name && this.actualTargetSeries.name == name) { return this.actualTargetSeries; } return null; }; IgxTrendLineLayerComponent.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, container, component, parent); this._inStyling = true; if (this.targetSeries && this.targetSeries._styling) { this.targetSeries._styling(container, component, this); } if (this.actualTargetSeries && this.actualTargetSeries._styling) { this.actualTargetSeries._styling(container, component, this); } this._inStyling = false; }; IgxTrendLineLayerComponent.prototype.onApplyTemplate = function () { this.i.ac(); }; IgxTrendLineLayerComponent.prototype.getManagerIdentifier = function () { var iv = this.i.aay(); return (iv); }; IgxTrendLineLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxTrendLineLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxTrendLineLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxTrendLineLayerComponent, selector: "igx-trend-line-layer", inputs: { targetSeries: "targetSeries", actualTargetSeries: "actualTargetSeries", trendLineType: "trendLineType", trendLinePeriod: "trendLinePeriod" }, providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxTrendLineLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxTrendLineLayerComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxTrendLineLayerComponent; }(IgxAnnotationLayerComponent)); export { IgxTrendLineLayerComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxTrendLineLayerComponent, decorators: [{ type: Component, args: [{ selector: 'igx-trend-line-layer', template: "", providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxTrendLineLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxTrendLineLayerComponent; }) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { targetSeries: [{ type: Input }], actualTargetSeries: [{ type: Input }], trendLineType: [{ type: Input }], trendLinePeriod: [{ type: Input }] } });