UNPKG

igniteui-webcomponents-charts

Version:

Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.

162 lines (160 loc) 6.54 kB
import { __extends } from "tslib"; import { IgcAxisComponent } from "./igc-axis-component"; import { IgcAnnotationLayerComponent } from "./igc-annotation-layer-component"; import { CategoryToolTipLayer } from "./CategoryToolTipLayer"; import { getAllPropertyNames, toSpinal, ensureBool } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents an annotation layer that displays grouped tooltips for series that use a category axis. */ var IgcCategoryToolTipLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcCategoryToolTipLayerComponent, _super); function IgcCategoryToolTipLayerComponent() { return _super.call(this) || this; } IgcCategoryToolTipLayerComponent.prototype.createImplementation = function () { return new CategoryToolTipLayer(); }; Object.defineProperty(IgcCategoryToolTipLayerComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcCategoryToolTipLayerComponent.prototype.connectedCallback = function () { if (_super.prototype["connectedCallback"]) { _super.prototype["connectedCallback"].call(this); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } }; IgcCategoryToolTipLayerComponent.prototype.disconnectedCallback = function () { if (_super.prototype["disconnectedCallback"]) { _super.prototype["disconnectedCallback"].call(this); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } }; Object.defineProperty(IgcCategoryToolTipLayerComponent, "observedAttributes", { get: function () { if (IgcCategoryToolTipLayerComponent._observedAttributesIgcCategoryToolTipLayerComponent == null) { var names = getAllPropertyNames(IgcCategoryToolTipLayerComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcCategoryToolTipLayerComponent._observedAttributesIgcCategoryToolTipLayerComponent = names; } return IgcCategoryToolTipLayerComponent._observedAttributesIgcCategoryToolTipLayerComponent; }, enumerable: false, configurable: true }); IgcCategoryToolTipLayerComponent.register = function () { if (!IgcCategoryToolTipLayerComponent._isElementRegistered) { IgcCategoryToolTipLayerComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcCategoryToolTipLayerComponent.htmlTagName, IgcCategoryToolTipLayerComponent); } }; Object.defineProperty(IgcCategoryToolTipLayerComponent.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(IgcCategoryToolTipLayerComponent.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(IgcCategoryToolTipLayerComponent.prototype, "targetAxis", { /** * Gets or sets the Axis to target this annotation to. If null, this annotation layer will not render content. */ get: function () { var r = this.i.aaa; if (r == null) { return null; } if (!r.externalObject) { var e = IgcAxisComponent._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.aaa = null : this.i.aaa = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryToolTipLayerComponent.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); this._a("useInterpolation", this.i.aae); }, enumerable: false, configurable: true }); IgcCategoryToolTipLayerComponent.prototype.findByName = function (name) { var baseResult = _super.prototype.findByName.call(this, name); if (baseResult) { return baseResult; } if (this.targetAxis && this.targetAxis.name && this.targetAxis.name == name) { return this.targetAxis; } return null; }; IgcCategoryToolTipLayerComponent.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, container, component, parent); this._inStyling = true; if (this.targetAxis && this.targetAxis._styling) { this.targetAxis._styling(container, component, this); } this._inStyling = false; }; /** * Hides any tooltips presented by the layer, if any. */ IgcCategoryToolTipLayerComponent.prototype.hideToolTips = function () { this.i.p9(); }; IgcCategoryToolTipLayerComponent._observedAttributesIgcCategoryToolTipLayerComponent = null; IgcCategoryToolTipLayerComponent.htmlTagName = "igc-category-tool-tip-layer"; IgcCategoryToolTipLayerComponent._isElementRegistered = false; return IgcCategoryToolTipLayerComponent; }(IgcAnnotationLayerComponent)); export { IgcCategoryToolTipLayerComponent };