UNPKG

igniteui-webcomponents-charts

Version:

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

231 lines (228 loc) 8.76 kB
import { delegateCombine, delegateRemove } from "igniteui-webcomponents-core"; import { AxisAngleLabelMode_$type } from "./AxisAngleLabelMode"; import { IgcCategoryAxisBaseComponent } from "./igc-category-axis-base-component"; import { CategoryAngleAxis } from "./CategoryAngleAxis"; import { getAllPropertyNames, toSpinal, ensureEnum, enumToString } from "igniteui-webcomponents-core"; import { RegisterElementHelper } from "igniteui-webcomponents-core"; let IgcCategoryAngleAxisComponent = /*@__PURE__*/ (() => { class IgcCategoryAngleAxisComponent extends IgcCategoryAxisBaseComponent { createImplementation() { return new CategoryAngleAxis(); } /** * @hidden */ get i() { return this._implementation; } constructor() { super(); this._actualIntervalChange = null; this._actualIntervalChange_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 (IgcCategoryAngleAxisComponent._observedAttributesIgcCategoryAngleAxisComponent == null) { let names = getAllPropertyNames(IgcCategoryAngleAxisComponent); for (let i = 0; i < names.length; i++) { names[i] = toSpinal(names[i]); } IgcCategoryAngleAxisComponent._observedAttributesIgcCategoryAngleAxisComponent = names; } return IgcCategoryAngleAxisComponent._observedAttributesIgcCategoryAngleAxisComponent; } static register() { if (!IgcCategoryAngleAxisComponent._isElementRegistered) { IgcCategoryAngleAxisComponent._isElementRegistered = true; RegisterElementHelper.registerElement(IgcCategoryAngleAxisComponent.htmlTagName, IgcCategoryAngleAxisComponent); } } /** * Checks if the axis is of angular type */ get isAngular() { return this.i.dc; } /** * Gets or sets interval of labels on the companion axis. */ get companionAxisInterval() { return this.i.rx; } set companionAxisInterval(v) { this.i.rx = +v; this._a("companionAxisInterval", this.i.rx); } /** * Gets or sets label angle on the companion axis. */ get companionAxisMinorInterval() { return this.i.ry; } set companionAxisMinorInterval(v) { this.i.ry = +v; this._a("companionAxisMinorInterval", this.i.ry); } /** * Gets or sets angle in degress that the chart's 0th angle should be offset for the companion axis */ get companionAxisStartAngleOffset() { return this.i.rz; } set companionAxisStartAngleOffset(v) { this.i.rz = +v; this._a("companionAxisStartAngleOffset", this.i.rz); } /** * Gets or sets the mode axis labels will operate for the companion axis. */ get companionAxisLabelMode() { return this.i.rc; } set companionAxisLabelMode(v) { this.i.rc = ensureEnum(AxisAngleLabelMode_$type, v); this._a("companionAxisLabelMode", enumToString(AxisAngleLabelMode_$type, this.i.rc)); } /** * Indicates the angle in degress that the chart's 0th angle should be offset. * * Indicates the angle in degress that the chart's 0th angle should be offset. */ get startAngleOffset() { return this.i.r9; } set startAngleOffset(v) { this.i.r9 = +v; this._a("startAngleOffset", this.i.r9); } /** * Indicates the mode axis labels will operate in. */ get labelMode() { return this.i.rd; } set labelMode(v) { this.i.rd = ensureEnum(AxisAngleLabelMode_$type, v); this._a("labelMode", enumToString(AxisAngleLabelMode_$type, this.i.rd)); } get areGroupSizesUneven() { return this.i.rn; } /** * 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. * * 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.r6; } set interval(v) { this.i.r6 = +v; this._a("interval", this.i.r6); } /** * Gets the effective value for the current Interval. * * Gets the effective value for the current Interval. */ get actualInterval() { return this.i.rv; } set actualInterval(v) { this.i.rv = +v; this._a("actualInterval", this.i.rv); } /** * Gets or sets the frequency of displayed minor lines. * The set value is a factor that determines how the minor lines will be displayed. * * 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.r7; } set minorInterval(v) { this.i.r7 = +v; this._a("minorInterval", this.i.r7); } /** * Gets the effective value for the current MinorInterval. * * Get the effective value for the current minorInterval. */ get actualMinorInterval() { return this.i.rw; } set actualMinorInterval(v) { this.i.rw = +v; this._a("actualMinorInterval", this.i.rw); } /** * Gets the scaled angle in radians from the raw axis value. * @param unscaledAngle * The raw axis value. */ getScaledAngle(unscaledAngle) { let iv = this.i.getScaledAngle(unscaledAngle); return (iv); } /** * Gets the raw axis value from the scaled angle in radians. */ getUnscaledAngle(scaledAngle) { let iv = this.i.getUnscaledAngle(scaledAngle); 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 == 'Rv') { if (this.beforeActualIntervalChange) { this.beforeActualIntervalChange(this, ext); } if (this._actualIntervalChange) { this._actualIntervalChange(this, ext); } } }; this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualIntervalChange_wrapped); } } IgcCategoryAngleAxisComponent._observedAttributesIgcCategoryAngleAxisComponent = null; IgcCategoryAngleAxisComponent.htmlTagName = "igc-category-angle-axis"; IgcCategoryAngleAxisComponent._isElementRegistered = false; return IgcCategoryAngleAxisComponent; })(); export { IgcCategoryAngleAxisComponent };