UNPKG

igniteui-webcomponents-charts

Version:

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

259 lines (258 loc) 10.6 kB
import { __extends } from "tslib"; import { IgcSeriesComponent } from "./igc-series-component"; import { CategoryItemHighlightType_$type } from "./CategoryItemHighlightType"; import { MarkerType_$type } from "./MarkerType"; import { IgcAnnotationLayerComponent } from "./igc-annotation-layer-component"; import { CategoryItemHighlightLayer } from "./CategoryItemHighlightLayer"; import { getAllPropertyNames, toSpinal, ensureBool, ensureEnum, enumToString, brushToString, stringToBrush } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents an annotation layer that highlights items in a series that use a category axis * either by drawing a banded shape at their position, or by rendering a marker at their position. * Depending on the type of series, the default highlight will be affected. To override * the type of highlight used, you can set the HighlightType property. */ export var IgcCategoryItemHighlightLayerComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcCategoryItemHighlightLayerComponent, _super); function IgcCategoryItemHighlightLayerComponent() { return _super.call(this) || this; } IgcCategoryItemHighlightLayerComponent.prototype.createImplementation = function () { return new CategoryItemHighlightLayer(); }; Object.defineProperty(IgcCategoryItemHighlightLayerComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcCategoryItemHighlightLayerComponent.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(); } }; IgcCategoryItemHighlightLayerComponent.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(IgcCategoryItemHighlightLayerComponent, "observedAttributes", { get: function () { if (IgcCategoryItemHighlightLayerComponent._observedAttributesIgcCategoryItemHighlightLayerComponent == null) { var names = getAllPropertyNames(IgcCategoryItemHighlightLayerComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcCategoryItemHighlightLayerComponent._observedAttributesIgcCategoryItemHighlightLayerComponent = names; } return IgcCategoryItemHighlightLayerComponent._observedAttributesIgcCategoryItemHighlightLayerComponent; }, enumerable: false, configurable: true }); IgcCategoryItemHighlightLayerComponent.register = function () { if (!IgcCategoryItemHighlightLayerComponent._isElementRegistered) { IgcCategoryItemHighlightLayerComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcCategoryItemHighlightLayerComponent.htmlTagName, IgcCategoryItemHighlightLayerComponent); } }; Object.defineProperty(IgcCategoryItemHighlightLayerComponent.prototype, "isAnnotationHoverLayer", { /** * Gets whether the series is an annotation layer displayed only when hovering over the chart. */ get: function () { return this.i.eu; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.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.aaw; if (r == null) { return null; } if (!r.externalObject) { var e = IgcSeriesComponent._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.aaw = null : this.i.aaw = v.i; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.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.aba; }, set: function (v) { this.i.aba = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.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.aa0; }, set: function (v) { this.i.aa0 = ensureBool(v); this._a("useInterpolation", this.i.aa0); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.prototype, "highlightType", { /** * Gets or sets which type of highlight shape to use when highlighting items. */ get: function () { return this.i.aat; }, set: function (v) { this.i.aat = ensureEnum(CategoryItemHighlightType_$type, v); this._a("highlightType", enumToString(CategoryItemHighlightType_$type, this.i.aat)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.prototype, "markerType", { /** * Gets or sets which type of marker to use when highlighting items, if appropriate. */ get: function () { return this.i.aav; }, set: function (v) { this.i.aav = ensureEnum(MarkerType_$type, v); this._a("markerType", enumToString(MarkerType_$type, this.i.aav)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.prototype, "markerBrush", { /** * Gets or sets which color to use for the marker when highlighting items, if appropriate. */ get: function () { return brushToString(this.i.abu); }, set: function (v) { this.i.abu = stringToBrush(v); this._a("markerBrush", brushToString(this.i.abu)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.prototype, "markerOutline", { /** * Gets or sets which outline color to use for the marker when highlighting items, if appropriate. */ get: function () { return brushToString(this.i.abv); }, set: function (v) { this.i.abv = stringToBrush(v); this._a("markerOutline", brushToString(this.i.abv)); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.prototype, "markerTemplate", { /** * Gets or sets the template to use for marker visuals for the current series object. */ get: function () { return this.i.abj; }, set: function (v) { this.i.abj = v; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.prototype, "bandHighlightWidth", { /** * Gets or sets the width to use for the highlight region if highlighting items in a grid aligned series (line, spline, etc), with a banded shape. */ get: function () { return this.i.aa2; }, set: function (v) { this.i.aa2 = +v; this._a("bandHighlightWidth", this.i.aa2); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryItemHighlightLayerComponent.prototype, "skipUnknownValues", { /** * Gets or sets whether to skip unknown values when searching for series values. */ get: function () { return this.i.aaz; }, set: function (v) { this.i.aaz = ensureBool(v); this._a("skipUnknownValues", this.i.aaz); }, enumerable: false, configurable: true }); IgcCategoryItemHighlightLayerComponent.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; }; IgcCategoryItemHighlightLayerComponent.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; }; IgcCategoryItemHighlightLayerComponent._observedAttributesIgcCategoryItemHighlightLayerComponent = null; IgcCategoryItemHighlightLayerComponent.htmlTagName = "igc-category-item-highlight-layer"; IgcCategoryItemHighlightLayerComponent._isElementRegistered = false; return IgcCategoryItemHighlightLayerComponent; }(IgcAnnotationLayerComponent));