UNPKG

igniteui-webcomponents-charts

Version:

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

130 lines (127 loc) 5.16 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"; /** * Represents a IgxDataChartComponent column series. * Compare values across categories by using vertical rectangles. * Use it when the order of categories is not important or for displaying * item counts such as a histogram. */ export 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.e1; } /** * Overridden by derived series classes to indicate when marker-less display is preferred or not. */ get isMarkerlessDisplayPreferred() { return this.i.fm; } /** * Gets or sets the x-radius of the ellipse that is used to round the corners of the column. */ get radiusX() { return this.i.ac7; } set radiusX(v) { this.i.ac7 = +v; this._a("radiusX", this.i.ac7); } /** * Gets or sets the y-radius of the ellipse that is used to round the corners of the column. */ get radiusY() { return this.i.ac8; } set radiusY(v) { this.i.ac8 = +v; this._a("radiusY", this.i.ac8); } /** * The positioning logic to use for columns which have been consolidated into a single visual element. */ get consolidatedColumnVerticalPosition() { return this.i.ac5; } set consolidatedColumnVerticalPosition(v) { this.i.ac5 = ensureEnum(ConsolidatedItemsPosition_$type, v); this._a("consolidatedColumnVerticalPosition", enumToString(ConsolidatedItemsPosition_$type, this.i.ac5)); } /** * 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.ws(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.ix(); return (iv); } } IgcColumnSeriesComponent._observedAttributesIgcColumnSeriesComponent = null; IgcColumnSeriesComponent.htmlTagName = "igc-column-series"; IgcColumnSeriesComponent._isElementRegistered = false; return IgcColumnSeriesComponent; })();