UNPKG

igniteui-webcomponents-charts

Version:

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

341 lines (337 loc) 13.5 kB
import { __extends } from "tslib"; import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { IgcCategoryAxisBaseComponent } from "./igc-category-axis-base-component"; import { CategoryYAxis } from "./CategoryYAxis"; import { getAllPropertyNames, toSpinal, toPoint, fromRect } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; /** * Represents a IgxDataChartComponent category Y axis. */ export var IgcCategoryYAxisComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgcCategoryYAxisComponent, _super); function IgcCategoryYAxisComponent() { var _this = _super.call(this) || this; _this._actualIntervalChange = null; _this._actualIntervalChange_wrapped = null; _this._actualMinorIntervalChange = null; _this._actualMinorIntervalChange_wrapped = null; return _this; } IgcCategoryYAxisComponent.prototype.createImplementation = function () { return new CategoryYAxis(); }; Object.defineProperty(IgcCategoryYAxisComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); IgcCategoryYAxisComponent.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(); } }; IgcCategoryYAxisComponent.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(IgcCategoryYAxisComponent, "observedAttributes", { get: function () { if (IgcCategoryYAxisComponent._observedAttributesIgcCategoryYAxisComponent == null) { var names = getAllPropertyNames(IgcCategoryYAxisComponent); for (var i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcCategoryYAxisComponent._observedAttributesIgcCategoryYAxisComponent = names; } return IgcCategoryYAxisComponent._observedAttributesIgcCategoryYAxisComponent; }, enumerable: false, configurable: true }); IgcCategoryYAxisComponent.register = function () { if (!IgcCategoryYAxisComponent._isElementRegistered) { IgcCategoryYAxisComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcCategoryYAxisComponent.htmlTagName, IgcCategoryYAxisComponent); } }; Object.defineProperty(IgcCategoryYAxisComponent.prototype, "isVertical", { /** * Gets if the current axis is a vertical axis. */ get: function () { return this.i.dy; }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "interval", { /** * Gets or sets the frequency of displayed labels. * The set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. */ get: function () { return this.i.rm; }, set: function (v) { this.i.rm = +v; this._a("interval", this.i.rm); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "actualInterval", { /** * Gets the effective value for the current Interval. */ get: function () { return this.i.rh; }, set: function (v) { this.i.rh = +v; this._a("actualInterval", this.i.rh); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "minorInterval", { /** * Gets or sets the frequency of displayed minor lines. * The set value is a factor that determines how the minor lines will be displayed. */ get: function () { return this.i.rn; }, set: function (v) { this.i.rn = +v; this._a("minorInterval", this.i.rn); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "actualMinorInterval", { /** * Gets the effective value for the current MinorInterval. */ get: function () { return this.i.ri; }, set: function (v) { this.i.ri = +v; this._a("actualMinorInterval", this.i.ri); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "companionAxisInterval", { /** * Gets or sets interval of labels on the companion axis. */ get: function () { return this.i.rj; }, set: function (v) { this.i.rj = +v; this._a("companionAxisInterval", this.i.rj); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "companionAxisMinorInterval", { /** * Gets or sets label angle on the companion axis. */ get: function () { return this.i.rk; }, set: function (v) { this.i.rk = +v; this._a("companionAxisMinorInterval", this.i.rk); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "zoomMaximumCategoryRange", { /** * Gets or sets number of visible categories at maximum zooming level * This property is overridden by chart's WindowRectMinWidth property */ get: function () { return this.i.zoomMaximumCategoryRange; }, set: function (v) { this.i.zoomMaximumCategoryRange = +v; this._a("zoomMaximumCategoryRange", this.i.zoomMaximumCategoryRange); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "zoomMaximumItemSpan", { /** * Gets or sets maximum pixel span of series item that will be visible at maximum zooming level * This property ensures that series item does not get stretch above specified value. * This property is overridden by chart's WindowRectMinWidth property */ get: function () { return this.i.zoomMaximumItemSpan; }, set: function (v) { this.i.zoomMaximumItemSpan = +v; this._a("zoomMaximumItemSpan", this.i.zoomMaximumItemSpan); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "zoomToCategoryRange", { /** * Gets or sets range of categories that the chart will zoom in and fill plot area * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get: function () { return this.i.zoomToCategoryRange; }, set: function (v) { this.i.zoomToCategoryRange = +v; this._a("zoomToCategoryRange", this.i.zoomToCategoryRange); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "zoomToCategoryStart", { /** * Gets or sets starting category that chart will move its zoom window. Acceptable value is between 0 and number of data items * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get: function () { return this.i.zoomToCategoryStart; }, set: function (v) { this.i.zoomToCategoryStart = +v; this._a("zoomToCategoryStart", this.i.zoomToCategoryStart); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "zoomToItemSpan", { /** * Gets or sets pixel span of series item that will be used to zoom chart such that the item has desired span * Chart will automatically zoom in until series item has specified pixel span. * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get: function () { return this.i.zoomToItemSpan; }, set: function (v) { this.i.zoomToItemSpan = +v; this._a("zoomToItemSpan", this.i.zoomToItemSpan); }, enumerable: false, configurable: true }); IgcCategoryYAxisComponent.prototype.getCategoryBoundingBox = function (point, useInterpolation, singularWidth) { var iv = this.i.ra(toPoint(point), useInterpolation, singularWidth); return fromRect(iv); }; IgcCategoryYAxisComponent.prototype.scrollRangeIntoView = function (minimum, maximum) { this.i.r4(minimum, maximum); }; /** * Scrolls the specified item into view. * @param item * Data item to scroll into view */ IgcCategoryYAxisComponent.prototype.scrollIntoView = function (item) { this.i.r3(item); }; /** * Gets window zoom scale required to zoom to specified number of categories */ IgcCategoryYAxisComponent.prototype.getWindowZoomFromCategories = function (categoriesCount) { var iv = this.i.getWindowZoomFromCategories(categoriesCount); return (iv); }; /** * Gets window zoom scale required to zoom to specified span of series item */ IgcCategoryYAxisComponent.prototype.getWindowZoomFromItemSpan = function (pixels) { var iv = this.i.getWindowZoomFromItemSpan(pixels); return (iv); }; Object.defineProperty(IgcCategoryYAxisComponent.prototype, "actualIntervalChange", { get: function () { return this._actualIntervalChange; }, set: function (ev) { var _this = this; if (this._actualIntervalChange_wrapped !== null) { this.i.propertyChanged = delegateRemove(this.i.propertyChanged, this._actualIntervalChange_wrapped); this._actualIntervalChange_wrapped = null; this._actualIntervalChange = null; } this._actualIntervalChange = ev; this._actualIntervalChange_wrapped = function (o, e) { var ext = _this.actualInterval; if (e.propertyName == 'Rh') { if (_this.beforeActualIntervalChange) { _this.beforeActualIntervalChange(_this, ext); } if (_this._actualIntervalChange) { _this._actualIntervalChange(_this, ext); } } }; this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualIntervalChange_wrapped); }, enumerable: false, configurable: true }); Object.defineProperty(IgcCategoryYAxisComponent.prototype, "actualMinorIntervalChange", { get: function () { return this._actualMinorIntervalChange; }, set: function (ev) { var _this = this; if (this._actualMinorIntervalChange_wrapped !== null) { this.i.propertyChanged = delegateRemove(this.i.propertyChanged, this._actualMinorIntervalChange_wrapped); this._actualMinorIntervalChange_wrapped = null; this._actualMinorIntervalChange = null; } this._actualMinorIntervalChange = ev; this._actualMinorIntervalChange_wrapped = function (o, e) { var ext = _this.actualMinorInterval; if (e.propertyName == 'Ri') { if (_this.beforeActualMinorIntervalChange) { _this.beforeActualMinorIntervalChange(_this, ext); } if (_this._actualMinorIntervalChange) { _this._actualMinorIntervalChange(_this, ext); } } }; this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualMinorIntervalChange_wrapped); }, enumerable: false, configurable: true }); IgcCategoryYAxisComponent._observedAttributesIgcCategoryYAxisComponent = null; IgcCategoryYAxisComponent.htmlTagName = "igc-category-y-axis"; IgcCategoryYAxisComponent._isElementRegistered = false; return IgcCategoryYAxisComponent; }(IgcCategoryAxisBaseComponent));