UNPKG

igniteui-angular-charts

Version:

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

168 lines (165 loc) 7.25 kB
import { __extends } from "tslib"; import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { IgxSeriesComponent } from "./igx-series-component"; import { IgxAnnotationLayerComponent } from "./igx-annotation-layer-component"; import { ItemToolTipLayer } from "./ItemToolTipLayer"; import { ensureBool } from "igniteui-angular-core"; import * as i0 from "@angular/core"; /** * Represents an annotation layer that displays tooltips for all target series individually. */ var IgxItemToolTipLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxItemToolTipLayerComponent, _super); function IgxItemToolTipLayerComponent() { return _super.call(this) || this; } IgxItemToolTipLayerComponent.prototype.createImplementation = function () { return new ItemToolTipLayer(); }; Object.defineProperty(IgxItemToolTipLayerComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxItemToolTipLayerComponent.prototype, "isAnnotationHoverLayer", { /** * Gets whether the series is an annotation layer displayed only when hovering over the chart. */ get: function () { return this.i.et; }, enumerable: false, configurable: true }); Object.defineProperty(IgxItemToolTipLayerComponent.prototype, "isDefaultTooltipBehaviorDisabled", { /** * Gets whether the default tooltip behaviors for the chart are disabled if this layer is present. */ get: function () { return this.i.e4; }, enumerable: false, configurable: true }); Object.defineProperty(IgxItemToolTipLayerComponent.prototype, "targetSeriesName", { /** * Gets or sets the name of the series series to target this annotation to. If null, this annotation targets all series simultaneously. */ get: function () { return this.i.aah; }, set: function (v) { this.i.aah = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxItemToolTipLayerComponent.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.aab; 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.aab = null : this.i.aab = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgxItemToolTipLayerComponent.prototype, "useInterpolation", { /** * Gets or sets whether to use value interpolation when drawing the tooltips. */ get: function () { return this.i.aae; }, set: function (v) { this.i.aae = ensureBool(v); }, enumerable: false, configurable: true }); Object.defineProperty(IgxItemToolTipLayerComponent.prototype, "skipUnknownValues", { /** * Gets or sets whether to skip past unknown values when searching for series values. */ get: function () { return this.i.aad; }, set: function (v) { this.i.aad = ensureBool(v); }, enumerable: false, configurable: true }); IgxItemToolTipLayerComponent.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; }; IgxItemToolTipLayerComponent.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; }; /** * Hides any tooltips presented by the layer, if any. */ IgxItemToolTipLayerComponent.prototype.hideToolTips = function () { this.i.p9(); }; /** * Hides any tooltips presented by the layer, if any. */ IgxItemToolTipLayerComponent.prototype.hideToolTipsImmediate = function () { this.i.qa(); }; IgxItemToolTipLayerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxItemToolTipLayerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxItemToolTipLayerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxItemToolTipLayerComponent, selector: "igx-item-tool-tip-layer", inputs: { targetSeriesName: "targetSeriesName", targetSeries: "targetSeries", useInterpolation: "useInterpolation", skipUnknownValues: "skipUnknownValues" }, providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxItemToolTipLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxItemToolTipLayerComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxItemToolTipLayerComponent; }(IgxAnnotationLayerComponent)); export { IgxItemToolTipLayerComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxItemToolTipLayerComponent, decorators: [{ type: Component, args: [{ selector: 'igx-item-tool-tip-layer', template: "", providers: [{ provide: IgxAnnotationLayerComponent, useExisting: forwardRef(function () { return IgxItemToolTipLayerComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxItemToolTipLayerComponent; }) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { targetSeriesName: [{ type: Input }], targetSeries: [{ type: Input }], useInterpolation: [{ type: Input }], skipUnknownValues: [{ type: Input }] } });