UNPKG

igniteui-webcomponents-charts

Version:

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

201 lines (200 loc) 8.36 kB
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { TimeAxisDisplayType_$type } from "./TimeAxisDisplayType"; import { IgcTimeAxisBaseComponent } from "./igc-time-axis-base-component"; import { CategoryDateTimeXAxis } from "./CategoryDateTimeXAxis"; import { getAllPropertyNames, toSpinal, ensureBool, ensureEnum, enumToString } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; let IgcCategoryDateTimeXAxisComponent = /*@__PURE__*/ (() => { class IgcCategoryDateTimeXAxisComponent extends IgcTimeAxisBaseComponent { createImplementation() { return new CategoryDateTimeXAxis(); } /** * @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 (IgcCategoryDateTimeXAxisComponent._observedAttributesIgcCategoryDateTimeXAxisComponent == null) { let names = getAllPropertyNames(IgcCategoryDateTimeXAxisComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcCategoryDateTimeXAxisComponent._observedAttributesIgcCategoryDateTimeXAxisComponent = names; } return IgcCategoryDateTimeXAxisComponent._observedAttributesIgcCategoryDateTimeXAxisComponent; } static register() { if (!IgcCategoryDateTimeXAxisComponent._isElementRegistered) { IgcCategoryDateTimeXAxisComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcCategoryDateTimeXAxisComponent.htmlTagName, IgcCategoryDateTimeXAxisComponent); } } /** * Gets if the current axis is a continuous rather than a discrete scale */ get isContinuous() { return this.i.di; } /** * Gets or sets whether the axis labels can be unevenly spaced */ get unevenlySpacedLabels() { return this.i.sn; } set unevenlySpacedLabels(v) { this.i.sn = ensureBool(v); this._a("unevenlySpacedLabels", this.i.sn); } /** * Gets or sets the axis display type. * Continuous display type divides the axis into even intervals, where labels will not necessarily be aligned with data points. * Discrete display type will not use a constant interval, but will align each label with its data point. * * `displayType` property is used for axis display type. * * Continuous display type divides the axis into even intervals, where labels will not necessarily be aligned with data points. Discrete display type will not use a constant interval, but will align each label with its data point. */ get displayType() { return this.i.sk; } set displayType(v) { this.i.sk = ensureEnum(TimeAxisDisplayType_$type, v); this._a("displayType", enumToString(TimeAxisDisplayType_$type, this.i.sk)); } /** * Gets or sets the X axis time interval. * * `Interval` property is used to get/sets the frequency of displayed labels. */ get interval() { return this.i.sw; } set interval(v) { this.i.sw = +v; this._a("interval", this.i.sw); } /** * Gets the effective value for the current Interval. */ get actualInterval() { return this.i.st; } set actualInterval(v) { this.i.st = +v; this._a("actualInterval", this.i.st); } /** * 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.sx; } set minorInterval(v) { this.i.sx = +v; this._a("minorInterval", this.i.sx); } /** * Gets the effective value for the current MinorInterval. */ get actualMinorInterval() { return this.i.su; } set actualMinorInterval(v) { this.i.su = +v; this._a("actualMinorInterval", this.i.su); } /** * Gets if the current axis is of category date time axis type */ get isCategoryDateTime() { return this.i.dg; } scrollDateRangeIntoView(minimum, maximum) { this.i.s4(minimum, maximum); } 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 == 'St') { 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 == 'Su') { if (this.beforeActualMinorIntervalChange) { this.beforeActualMinorIntervalChange(this, ext); } if (this._actualMinorIntervalChange) { this._actualMinorIntervalChange(this, ext); } } }; this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualMinorIntervalChange_wrapped); } } IgcCategoryDateTimeXAxisComponent._observedAttributesIgcCategoryDateTimeXAxisComponent = null; IgcCategoryDateTimeXAxisComponent.htmlTagName = "igc-category-date-time-x-axis"; IgcCategoryDateTimeXAxisComponent._isElementRegistered = false; return IgcCategoryDateTimeXAxisComponent; })(); export { IgcCategoryDateTimeXAxisComponent };