UNPKG

igniteui-webcomponents-charts

Version:

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

272 lines (268 loc) 10.9 kB
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"; let IgcCategoryYAxisComponent = /*@__PURE__*/ (() => { class IgcCategoryYAxisComponent extends IgcCategoryAxisBaseComponent { createImplementation() { return new CategoryYAxis(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); this._actualIntervalChange = null; this._actualIntervalChange_wrapped = null; this._actualMinorIntervalChange = null; this._actualMinorIntervalChange_wrapped = null; } 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 (IgcCategoryYAxisComponent._observedAttributesIgcCategoryYAxisComponent == null) { let names = getAllPropertyNames(IgcCategoryYAxisComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcCategoryYAxisComponent._observedAttributesIgcCategoryYAxisComponent = names; } return IgcCategoryYAxisComponent._observedAttributesIgcCategoryYAxisComponent; } static register() { if (!IgcCategoryYAxisComponent._isElementRegistered) { IgcCategoryYAxisComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcCategoryYAxisComponent.htmlTagName, IgcCategoryYAxisComponent); } } /** * Gets if the current axis is a vertical axis. */ get isVertical() { return this.i.dy; } /** * 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 interval() { return this.i.rm; } set interval(v) { this.i.rm = +v; this._a("interval", this.i.rm); } /** * Gets the effective value for the current Interval. */ get actualInterval() { return this.i.rh; } set actualInterval(v) { this.i.rh = +v; this._a("actualInterval", this.i.rh); } /** * 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 minorInterval() { return this.i.rn; } set minorInterval(v) { this.i.rn = +v; this._a("minorInterval", this.i.rn); } /** * Gets the effective value for the current MinorInterval. */ get actualMinorInterval() { return this.i.ri; } set actualMinorInterval(v) { this.i.ri = +v; this._a("actualMinorInterval", this.i.ri); } /** * Gets or sets interval of labels on the companion axis. */ get companionAxisInterval() { return this.i.rj; } set companionAxisInterval(v) { this.i.rj = +v; this._a("companionAxisInterval", this.i.rj); } /** * Gets or sets label angle on the companion axis. */ get companionAxisMinorInterval() { return this.i.rk; } set companionAxisMinorInterval(v) { this.i.rk = +v; this._a("companionAxisMinorInterval", this.i.rk); } /** * Gets or sets number of visible categories at maximum zooming level * This property is overridden by chart's WindowRectMinWidth property */ get zoomMaximumCategoryRange() { return this.i.zoomMaximumCategoryRange; } set zoomMaximumCategoryRange(v) { this.i.zoomMaximumCategoryRange = +v; this._a("zoomMaximumCategoryRange", this.i.zoomMaximumCategoryRange); } /** * 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 zoomMaximumItemSpan() { return this.i.zoomMaximumItemSpan; } set zoomMaximumItemSpan(v) { this.i.zoomMaximumItemSpan = +v; this._a("zoomMaximumItemSpan", this.i.zoomMaximumItemSpan); } /** * 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 zoomToCategoryRange() { return this.i.zoomToCategoryRange; } set zoomToCategoryRange(v) { this.i.zoomToCategoryRange = +v; this._a("zoomToCategoryRange", this.i.zoomToCategoryRange); } /** * 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 zoomToCategoryStart() { return this.i.zoomToCategoryStart; } set zoomToCategoryStart(v) { this.i.zoomToCategoryStart = +v; this._a("zoomToCategoryStart", this.i.zoomToCategoryStart); } /** * 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 zoomToItemSpan() { return this.i.zoomToItemSpan; } set zoomToItemSpan(v) { this.i.zoomToItemSpan = +v; this._a("zoomToItemSpan", this.i.zoomToItemSpan); } getCategoryBoundingBox(point, useInterpolation, singularWidth) { let iv = this.i.ra(toPoint(point), useInterpolation, singularWidth); return fromRect(iv); } scrollRangeIntoView(minimum, maximum) { this.i.r4(minimum, maximum); } /** * Scrolls the specified item into view. * @param item * Data item to scroll into view */ scrollIntoView(item) { this.i.r3(item); } /** * Gets window zoom scale required to zoom to specified number of categories */ getWindowZoomFromCategories(categoriesCount) { let iv = this.i.getWindowZoomFromCategories(categoriesCount); return (iv); } /** * Gets window zoom scale required to zoom to specified span of series item */ getWindowZoomFromItemSpan(pixels) { let iv = this.i.getWindowZoomFromItemSpan(pixels); return (iv); } get actualIntervalChange() { return this._actualIntervalChange; } set actualIntervalChange(ev) { 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 = (o, e) => { let 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); } get actualMinorIntervalChange() { return this._actualMinorIntervalChange; } set actualMinorIntervalChange(ev) { 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 = (o, e) => { let 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); } } IgcCategoryYAxisComponent._observedAttributesIgcCategoryYAxisComponent = null; IgcCategoryYAxisComponent.htmlTagName = "igc-category-y-axis"; IgcCategoryYAxisComponent._isElementRegistered = false; return IgcCategoryYAxisComponent; })(); export { IgcCategoryYAxisComponent };