UNPKG

igniteui-webcomponents-charts

Version:

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

202 lines (201 loc) 7.97 kB
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"; let IgcCategoryItemHighlightLayerComponent = /*@__PURE__*/ (() => { class IgcCategoryItemHighlightLayerComponent extends IgcAnnotationLayerComponent { createImplementation() { return new CategoryItemHighlightLayer(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); } connectedCallback() { if (super["connectedCallback"]) { super["connectedCallback"](); } if (this.i.connectedCallback) { this.i.connectedCallback(); } if (!this._attached) { this._attached = true; this._flushQueuedAttributes(); } } disconnectedCallback() { if (super["disconnectedCallback"]) { super["disconnectedCallback"](); } if (this.i.disconnectedCallback) { this.i.disconnectedCallback(); } if (this._attached) { this._attached = false; } } static get observedAttributes() { if (IgcCategoryItemHighlightLayerComponent._observedAttributesIgcCategoryItemHighlightLayerComponent == null) { let names = getAllPropertyNames(IgcCategoryItemHighlightLayerComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcCategoryItemHighlightLayerComponent._observedAttributesIgcCategoryItemHighlightLayerComponent = names; } return IgcCategoryItemHighlightLayerComponent._observedAttributesIgcCategoryItemHighlightLayerComponent; } static register() { if (!IgcCategoryItemHighlightLayerComponent._isElementRegistered) { IgcCategoryItemHighlightLayerComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcCategoryItemHighlightLayerComponent.htmlTagName, IgcCategoryItemHighlightLayerComponent); } } /** * Gets whether the series is an annotation layer displayed only when hovering over the chart. */ get isAnnotationHoverLayer() { return this.i.eu; } /** * Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously. */ get targetSeries() { const r = this.i.aaw; if (r == null) { return null; } if (!r.externalObject) { let e = IgcSeriesComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; } set targetSeries(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; } /** * Gets or sets the name of the series to target this annotation to. If null, this annotation targets all series simultaneously. */ get targetSeriesName() { return this.i.aba; } set targetSeriesName(v) { this.i.aba = v; } /** * Gets or sets whether to use value interpolation when drawing a line through the best value for the pointer position. */ get useInterpolation() { return this.i.aa0; } set useInterpolation(v) { this.i.aa0 = ensureBool(v); this._a("useInterpolation", this.i.aa0); } /** * Gets or sets which type of highlight shape to use when highlighting items. */ get highlightType() { return this.i.aat; } set highlightType(v) { this.i.aat = ensureEnum(CategoryItemHighlightType_$type, v); this._a("highlightType", enumToString(CategoryItemHighlightType_$type, this.i.aat)); } /** * Gets or sets which type of marker to use when highlighting items, if appropriate. */ get markerType() { return this.i.aav; } set markerType(v) { this.i.aav = ensureEnum(MarkerType_$type, v); this._a("markerType", enumToString(MarkerType_$type, this.i.aav)); } /** * Gets or sets which color to use for the marker when highlighting items, if appropriate. */ get markerBrush() { return brushToString(this.i.abu); } set markerBrush(v) { this.i.abu = stringToBrush(v); this._a("markerBrush", brushToString(this.i.abu)); } /** * Gets or sets which outline color to use for the marker when highlighting items, if appropriate. */ get markerOutline() { return brushToString(this.i.abv); } set markerOutline(v) { this.i.abv = stringToBrush(v); this._a("markerOutline", brushToString(this.i.abv)); } /** * Gets or sets the template to use for marker visuals for the current series object. */ get markerTemplate() { return this.i.abj; } set markerTemplate(v) { this.i.abj = v; } /** * 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 bandHighlightWidth() { return this.i.aa2; } set bandHighlightWidth(v) { this.i.aa2 = +v; this._a("bandHighlightWidth", this.i.aa2); } /** * Gets or sets whether to skip unknown values when searching for series values. */ get skipUnknownValues() { return this.i.aaz; } set skipUnknownValues(v) { this.i.aaz = ensureBool(v); this._a("skipUnknownValues", this.i.aaz); } findByName(name) { var baseResult = super.findByName(name); if (baseResult) { return baseResult; } if (this.targetSeries && this.targetSeries.name && this.targetSeries.name == name) { return this.targetSeries; } return null; } _styling(container, component, parent) { super._styling(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; })(); export { IgcCategoryItemHighlightLayerComponent };