UNPKG

igniteui-webcomponents-charts

Version:

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

125 lines (122 loc) 4.96 kB
import { ConsolidatedItemsPosition_$type } from "./ConsolidatedItemsPosition"; import { IgcHorizontalAnchoredCategorySeriesComponent } from "./igc-horizontal-anchored-category-series-component"; import { ColumnSeries } from "./ColumnSeries"; import { getAllPropertyNames, toSpinal, ensureEnum, enumToString, toPoint, fromRect } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; let IgcColumnSeriesComponent = /*@__PURE__*/ (() => { class IgcColumnSeriesComponent extends IgcHorizontalAnchoredCategorySeriesComponent { createImplementation() { return new ColumnSeries(); } /** * @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 (IgcColumnSeriesComponent._observedAttributesIgcColumnSeriesComponent == null) { let names = getAllPropertyNames(IgcColumnSeriesComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcColumnSeriesComponent._observedAttributesIgcColumnSeriesComponent = names; } return IgcColumnSeriesComponent._observedAttributesIgcColumnSeriesComponent; } static register() { if (!IgcColumnSeriesComponent._isElementRegistered) { IgcColumnSeriesComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcColumnSeriesComponent.htmlTagName, IgcColumnSeriesComponent); } } /** * Gets whether the current series shows a column shape. */ get isColumn() { return this.i.e2; } /** * Overridden by derived series classes to indicate when marker-less display is preferred or not. */ get isMarkerlessDisplayPreferred() { return this.i.fo; } /** * Gets or sets the x-radius of the ellipse that is used to round the corners of the column. */ get radiusX() { return this.i.adn; } set radiusX(v) { this.i.adn = +v; this._a("radiusX", this.i.adn); } /** * Gets or sets the y-radius of the ellipse that is used to round the corners of the column. */ get radiusY() { return this.i.ado; } set radiusY(v) { this.i.ado = +v; this._a("radiusY", this.i.ado); } /** * The positioning logic to use for columns which have been consolidated into a single visual element. */ get consolidatedColumnVerticalPosition() { return this.i.adl; } set consolidatedColumnVerticalPosition(v) { this.i.adl = ensureEnum(ConsolidatedItemsPosition_$type, v); this._a("consolidatedColumnVerticalPosition", enumToString(ConsolidatedItemsPosition_$type, this.i.adl)); } /** * If possible, will return the best available value bounding box within the series that has the best value match for the world position provided. * @param world * The world coordinate for which to get a value bounding box for */ getSeriesValueBoundingBox(world) { let iv = this.i.w8(toPoint(world)); return fromRect(iv); } /** * For a category plotted series, returns the current width of the items within the categories. This only returns a value if the items have some form of width (e.g. columns, bars, etc.) otherwise 0 is returned. */ getItemSpan() { let iv = this.i.i3(); return (iv); } } IgcColumnSeriesComponent._observedAttributesIgcColumnSeriesComponent = null; IgcColumnSeriesComponent.htmlTagName = "igc-column-series"; IgcColumnSeriesComponent._isElementRegistered = false; return IgcColumnSeriesComponent; })(); export { IgcColumnSeriesComponent };