UNPKG

igniteui-webcomponents-charts

Version:

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

162 lines (161 loc) 7.05 kB
import { __extends } from "tslib"; import { IgcCategoryAxisBaseComponent } from "./igc-category-axis-base-component"; import { IgcAnnotationLayerComponent } from "./igc-annotation-layer-component"; import { CategoryHighlightLayer } from "./CategoryHighlightLayer"; import { getAllPropertyNames, toSpinal, ensureBool } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents an annotation layer that targets a category axis, or all category axes in the chart. * If the axis contains any series that are aligned between major gridlines of the axis (column, waterfall, etc) this will render a shape that fills the current category. * Otherwise it will render a band with an adjustable thickness at the closest gridline to the pointer position. * Setting UseIterpolation to true will cause the x position in the latter case to become affixed to the x position of the pointer. */ var IgcCategoryHighlightLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcCategoryHighlightLayerComponent, _super); function IgcCategoryHighlightLayerComponent() { return _super.call(this) || this; } IgcCategoryHighlightLayerComponent.prototype.createImplementation = function () { return new CategoryHighlightLayer(); }; Object.defineProperty(IgcCategoryHighlightLayerComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcCategoryHighlightLayerComponent.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(); } }; IgcCategoryHighlightLayerComponent.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(IgcCategoryHighlightLayerComponent, "observedAttributes", { get: function () { if (IgcCategoryHighlightLayerComponent._observedAttributesIgcCategoryHighlightLayerComponent == null) { var names = getAllPropertyNames(IgcCategoryHighlightLayerComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcCategoryHighlightLayerComponent._observedAttributesIgcCategoryHighlightLayerComponent = names; } return IgcCategoryHighlightLayerComponent._observedAttributesIgcCategoryHighlightLayerComponent; }, enumerable: false, configurable: true }); IgcCategoryHighlightLayerComponent.register = function () { if (!IgcCategoryHighlightLayerComponent._isElementRegistered) { IgcCategoryHighlightLayerComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcCategoryHighlightLayerComponent.htmlTagName, IgcCategoryHighlightLayerComponent); } }; Object.defineProperty(IgcCategoryHighlightLayerComponent.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(IgcCategoryHighlightLayerComponent.prototype, "targetAxis", { /** * Gets or sets the axis to target this annotation to. If null, this annotation targets all category axes simultaneously. */ get: function () { var r = this.i.aaa; if (r == null) { return null; } if (!r.externalObject) { var e = IgcCategoryAxisBaseComponent._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(IgcCategoryHighlightLayerComponent.prototype, "useInterpolation", { /** * Gets or sets whether to use value interpolation when drawing a line through the best value for the pointer position. */ get: function () { return this.i.aad; }, set: function (v) { this.i.aad = ensureBool(v); this._a("useInterpolation", this.i.aad); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryHighlightLayerComponent.prototype, "bandHighlightWidth", { /** * Gets or sets the width to use for the highlight region if drawing a band rather than filling a category. */ get: function () { return this.i.aae; }, set: function (v) { this.i.aae = +v; this._a("bandHighlightWidth", this.i.aae); }, enumerable: false, configurable: true }); IgcCategoryHighlightLayerComponent.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; }; IgcCategoryHighlightLayerComponent.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; }; IgcCategoryHighlightLayerComponent._observedAttributesIgcCategoryHighlightLayerComponent = null; IgcCategoryHighlightLayerComponent.htmlTagName = "igc-category-highlight-layer"; IgcCategoryHighlightLayerComponent._isElementRegistered = false; return IgcCategoryHighlightLayerComponent; }(IgcAnnotationLayerComponent)); export { IgcCategoryHighlightLayerComponent };