UNPKG

igniteui-webcomponents-charts

Version:

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

152 lines (148 loc) 5.8 kB
import { __extends } from "tslib"; 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. */ var IgcBarSeriesComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcBarSeriesComponent, _super); function IgcBarSeriesComponent() { return _super.call(this) || this; } IgcBarSeriesComponent.prototype.createImplementation = function () { return new BarSeries(); }; Object.defineProperty(IgcBarSeriesComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcBarSeriesComponent.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(); } }; IgcBarSeriesComponent.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(IgcBarSeriesComponent, "observedAttributes", { get: function () { if (IgcBarSeriesComponent._observedAttributesIgcBarSeriesComponent == null) { var names = getAllPropertyNames(IgcBarSeriesComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcBarSeriesComponent._observedAttributesIgcBarSeriesComponent = names; } return IgcBarSeriesComponent._observedAttributesIgcBarSeriesComponent; }, enumerable: false, configurable: true }); IgcBarSeriesComponent.register = function () { if (!IgcBarSeriesComponent._isElementRegistered) { IgcBarSeriesComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcBarSeriesComponent.htmlTagName, IgcBarSeriesComponent); } }; Object.defineProperty(IgcBarSeriesComponent.prototype, "isBar", { /** * Gets whether the current series shows a bar shape. */ get: function () { return this.i.ez; }, enumerable: false, configurable: true }); Object.defineProperty(IgcBarSeriesComponent.prototype, "isMarkerlessDisplayPreferred", { /** * Overridden by derived series classes to indicate when marker-less display is preferred or not. */ get: function () { return this.i.fm; }, enumerable: false, configurable: true }); Object.defineProperty(IgcBarSeriesComponent.prototype, "radiusX", { /** * Gets or sets the x-radius of the ellipse that is used to round the corners of the bar. */ get: function () { return this.i.acw; }, set: function (v) { this.i.acw = +v; this._a("radiusX", this.i.acw); }, enumerable: false, configurable: true }); Object.defineProperty(IgcBarSeriesComponent.prototype, "radiusY", { /** * Gets or sets the y-radius of the ellipse that is used to round the corners of the bar. */ get: function () { return this.i.acx; }, set: function (v) { this.i.acx = +v; this._a("radiusY", this.i.acx); }, enumerable: false, configurable: true }); /** * 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 */ IgcBarSeriesComponent.prototype.getSeriesValueBoundingBox = function (world) { var 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. */ IgcBarSeriesComponent.prototype.scrollIntoView = function (item) { var 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. */ IgcBarSeriesComponent.prototype.getItemSpan = function () { var iv = this.i.ix(); return (iv); }; IgcBarSeriesComponent._observedAttributesIgcBarSeriesComponent = null; IgcBarSeriesComponent.htmlTagName = "igc-bar-series"; IgcBarSeriesComponent._isElementRegistered = false; return IgcBarSeriesComponent; }(IgcVerticalAnchoredCategorySeriesComponent)); export { IgcBarSeriesComponent };