UNPKG

igniteui-webcomponents-charts

Version:

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

127 lines (123 loc) 4.74 kB
import { IgcVerticalAnchoredCategorySeriesComponent } from "./igc-vertical-anchored-category-series-component"; import { BarSeries } from "./BarSeries"; import { getAllPropertyNames, toSpinal, toPoint, fromRect } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents a IgxDataChartComponent bar series. */ export let IgcBarSeriesComponent = /*@__PURE__*/ (() => { class IgcBarSeriesComponent extends IgcVerticalAnchoredCategorySeriesComponent { createImplementation() { return new BarSeries(); } /** * @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 (IgcBarSeriesComponent._observedAttributesIgcBarSeriesComponent == null) { let names = getAllPropertyNames(IgcBarSeriesComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcBarSeriesComponent._observedAttributesIgcBarSeriesComponent = names; } return IgcBarSeriesComponent._observedAttributesIgcBarSeriesComponent; } static register() { if (!IgcBarSeriesComponent._isElementRegistered) { IgcBarSeriesComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcBarSeriesComponent.htmlTagName, IgcBarSeriesComponent); } } /** * Gets whether the current series shows a bar shape. */ get isBar() { return this.i.ez; } /** * 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 bar. */ get radiusX() { return this.i.acw; } set radiusX(v) { this.i.acw = +v; this._a("radiusX", this.i.acw); } /** * Gets or sets the y-radius of the ellipse that is used to round the corners of the bar. */ get radiusY() { return this.i.acx; } set radiusY(v) { this.i.acx = +v; this._a("radiusY", this.i.acx); } /** * 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); } /** * Scrolls the series to display the item for the specified data item. * The series is scrolled by the minimum amount required to place the specified data item within * the central 80% of the visible axis. * @param item * The data item (item) to scroll to. */ scrollIntoView(item) { let iv = this.i.ge(item); return (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); } } IgcBarSeriesComponent._observedAttributesIgcBarSeriesComponent = null; IgcBarSeriesComponent.htmlTagName = "igc-bar-series"; IgcBarSeriesComponent._isElementRegistered = false; return IgcBarSeriesComponent; })();