UNPKG

igniteui-angular-charts

Version:

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

280 lines (279 loc) 12.1 kB
import { __extends } from "tslib"; import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { IgxSeriesComponent } from "./igx-series-component"; import { FinalValueSelectionMode_$type } from "./FinalValueSelectionMode"; import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component"; import { FinalValueLayer } from "./FinalValueLayer"; import { ensureEnum, brushToString, stringToBrush } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents an annotation layer that displays crosshair lines that cross through the closest value of the target series under the cursor. */ var IgxFinalValueLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxFinalValueLayerComponent, _super); function IgxFinalValueLayerComponent() { return _super.call(this) || this; } IgxFinalValueLayerComponent.prototype.createImplementation = function () { return new FinalValueLayer(); }; Object.defineProperty(IgxFinalValueLayerComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "isAnnotationFinalValue", { /** * Gets whether the series is final value annotation layer. */ get: function () { return this.i.et; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "targetSeriesName", { /** * Gets or sets the name of the series to target this annotation to. If null, this annotation targets all series simultaneously. */ get: function () { return this.i.abh; }, set: function (v) { this.i.abh = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "targetSeries", { /** * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously. */ get: function () { var r = this.i.aav; 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.aav = null : this.i.aav = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "finalValueSelectionMode", { /** * Gets or sets how to select the final value to annotate. */ get: function () { return this.i.aau; }, set: function (v) { this.i.aau = ensureEnum(FinalValueSelectionMode_$type, v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationTextColor", { /** * Gets or sets the color to use for the axis annotation text. Leave unset for an automatic value. */ get: function () { return brushToString(this.i.ab1); }, set: function (v) { this.i.ab1 = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationBackground", { /** * Gets or sets the color to use for the axis annotation backing. Leave unset for an automatic value. */ get: function () { return brushToString(this.i.abz); }, set: function (v) { this.i.abz = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationBackgroundCornerRadius", { /** * Gets or sets the corner radius to use for the axis annotation backing. Leave unset for an automatic value. */ get: function () { return this.i.aaz; }, set: function (v) { this.i.aaz = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationInterpolatedValuePrecision", { /** * Gets or sets the precision to use displaying values for interpolated crosshair positions. */ get: function () { return this.i.aa5; }, set: function (v) { this.i.aa5 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationOutline", { /** * Gets or sets the color to use for the axis annotation outline. Leave unset for an automatic value. */ get: function () { return brushToString(this.i.ab0); }, set: function (v) { this.i.ab0 = stringToBrush(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationPaddingLeft", { /** * Gets or sets the left padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins. */ get: function () { return this.i.aa1; }, set: function (v) { this.i.aa1 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationPaddingTop", { /** * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins. */ get: function () { return this.i.aa3; }, set: function (v) { this.i.aa3 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationPaddingRight", { /** * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins. */ get: function () { return this.i.aa2; }, set: function (v) { this.i.aa2 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationPaddingBottom", { /** * Gets or sets the padding to use withing the axis annotation callout. Leaving this NaN will use an automatic value related to the axis label margins. */ get: function () { return this.i.aa0; }, set: function (v) { this.i.aa0 = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxFinalValueLayerComponent.prototype, "axisAnnotationStrokeThickness", { /** * Gets or sets the stroke thickness for the axis annotation backing. Leave unset for an automatic value. */ get: function () { return this.i.aa4; }, set: function (v) { this.i.aa4 = +v; }, enumerable: false, configurable: true }); IgxFinalValueLayerComponent.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; } return null; }; IgxFinalValueLayerComponent.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); } this._inStyling = false; }; IgxFinalValueLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxFinalValueLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxFinalValueLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxFinalValueLayerComponent, selector: "igx-final-value-layer", inputs: { targetSeriesName: "targetSeriesName", targetSeries: "targetSeries", finalValueSelectionMode: "finalValueSelectionMode", axisAnnotationTextColor: "axisAnnotationTextColor", axisAnnotationBackground: "axisAnnotationBackground", axisAnnotationBackgroundCornerRadius: "axisAnnotationBackgroundCornerRadius", axisAnnotationInterpolatedValuePrecision: "axisAnnotationInterpolatedValuePrecision", axisAnnotationOutline: "axisAnnotationOutline", axisAnnotationPaddingLeft: "axisAnnotationPaddingLeft", axisAnnotationPaddingTop: "axisAnnotationPaddingTop", axisAnnotationPaddingRight: "axisAnnotationPaddingRight", axisAnnotationPaddingBottom: "axisAnnotationPaddingBottom", axisAnnotationStrokeThickness: "axisAnnotationStrokeThickness" }, providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxFinalValueLayerComponent; }(IgxAnnotationLayerComponent)); export { IgxFinalValueLayerComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxFinalValueLayerComponent, decorators: [{ type: Component, args: [{ selector: 'igx-final-value-layer', template: "", providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxFinalValueLayerComponent; }) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { targetSeriesName: [{ type: Input }], targetSeries: [{ type: Input }], finalValueSelectionMode: [{ type: Input }], axisAnnotationTextColor: [{ type: Input }], axisAnnotationBackground: [{ type: Input }], axisAnnotationBackgroundCornerRadius: [{ type: Input }], axisAnnotationInterpolatedValuePrecision: [{ type: Input }], axisAnnotationOutline: [{ type: Input }], axisAnnotationPaddingLeft: [{ type: Input }], axisAnnotationPaddingTop: [{ type: Input }], axisAnnotationPaddingRight: [{ type: Input }], axisAnnotationPaddingBottom: [{ type: Input }], axisAnnotationStrokeThickness: [{ type: Input }] } });