UNPKG

igniteui-webcomponents-charts

Version:

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

205 lines (201 loc) 7.76 kB
import { __extends } from "tslib"; import { IgcCategoryAxisBaseComponent } from "./igc-category-axis-base-component"; import { IgcNumericAxisBaseComponent } from "./igc-numeric-axis-base-component"; import { IgcFragmentBaseComponent } from "./igc-fragment-base-component"; import { ColumnFragment } from "./ColumnFragment"; import { getAllPropertyNames, toSpinal, toPoint, fromRect } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents one part of a StackedColumnSeries. */ export var IgcColumnFragmentComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcColumnFragmentComponent, _super); function IgcColumnFragmentComponent() { return _super.call(this) || this; } IgcColumnFragmentComponent.prototype.createImplementation = function () { return new ColumnFragment(); }; Object.defineProperty(IgcColumnFragmentComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcColumnFragmentComponent.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(); } }; IgcColumnFragmentComponent.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(IgcColumnFragmentComponent, "observedAttributes", { get: function () { if (IgcColumnFragmentComponent._observedAttributesIgcColumnFragmentComponent == null) { var names = getAllPropertyNames(IgcColumnFragmentComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcColumnFragmentComponent._observedAttributesIgcColumnFragmentComponent = names; } return IgcColumnFragmentComponent._observedAttributesIgcColumnFragmentComponent; }, enumerable: false, configurable: true }); IgcColumnFragmentComponent.register = function () { if (!IgcColumnFragmentComponent._isElementRegistered) { IgcColumnFragmentComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcColumnFragmentComponent.htmlTagName, IgcColumnFragmentComponent); } }; Object.defineProperty(IgcColumnFragmentComponent.prototype, "isColumn", { /** * Gets whether the current series shows a column shape. */ get: function () { return this.i.e2; }, enumerable: false, configurable: true }); Object.defineProperty(IgcColumnFragmentComponent.prototype, "isMarkerlessDisplayPreferred", { /** * Overridden by derived series classes to indicate when marker-less display is preferred or not. */ get: function () { return this.i.fo; }, enumerable: false, configurable: true }); Object.defineProperty(IgcColumnFragmentComponent.prototype, "radiusX", { /** * Gets or sets the x-radius of the ellipse that is used to round the corners of the column. */ get: function () { return this.i.ady; }, set: function (v) { this.i.ady = +v; this._a("radiusX", this.i.ady); }, enumerable: false, configurable: true }); Object.defineProperty(IgcColumnFragmentComponent.prototype, "radiusY", { /** * Gets or sets the y-radius of the ellipse that is used to round the corners of the column. */ get: function () { return this.i.adz; }, set: function (v) { this.i.adz = +v; this._a("radiusY", this.i.adz); }, enumerable: false, configurable: true }); Object.defineProperty(IgcColumnFragmentComponent.prototype, "fragmentXAxis", { /** * Gets or sets the effective x-axis for this series. */ get: function () { var r = this.i.fragmentXAxis; if (r == null) { return null; } if (!r.externalObject) { var e = IgcCategoryAxisBaseComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, enumerable: false, configurable: true }); Object.defineProperty(IgcColumnFragmentComponent.prototype, "fragmentYAxis", { /** * Gets or sets the effective y-axis for this series. */ get: function () { var r = this.i.fragmentYAxis; if (r == null) { return null; } if (!r.externalObject) { var e = IgcNumericAxisBaseComponent._createFromInternal(r); if (e) { e._implementation = r; } r.externalObject = e; } return r.externalObject; }, enumerable: false, configurable: true }); IgcColumnFragmentComponent.prototype._styling = function (container, component, parent) { _super.prototype._styling.call(this, container, component, parent); this._inStyling = true; if (this.fragmentXAxis && this.fragmentXAxis._styling) { this.fragmentXAxis._styling(container, component, this); } if (this.fragmentYAxis && this.fragmentYAxis._styling) { this.fragmentYAxis._styling(container, component, this); } this._inStyling = false; }; /** * 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 */ IgcColumnFragmentComponent.prototype.getSeriesValueBoundingBox = function (world) { var iv = this.i.w8(toPoint(world)); return fromRect(iv); }; /** * Gets the item that is the best match for the specified world coordinates. * @param world * The world coordinates to use. */ IgcColumnFragmentComponent.prototype.getItem = function (world) { var iv = this.i.kw(toPoint(world)); return (iv); }; /** * Gets the index of the item that resides at the provided world coordinates. * @param world * The world coordinates of the requested item. */ IgcColumnFragmentComponent.prototype.getItemIndex = function (world) { var iv = this.i.kc(toPoint(world)); return (iv); }; IgcColumnFragmentComponent._observedAttributesIgcColumnFragmentComponent = null; IgcColumnFragmentComponent.htmlTagName = "igc-column-fragment"; IgcColumnFragmentComponent._isElementRegistered = false; return IgcColumnFragmentComponent; }(IgcFragmentBaseComponent));