igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
297 lines (294 loc) • 11.4 kB
JavaScript
import { __extends } from "tslib";
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";
/**
* Represents a IgxDataChartComponent category angle axis. Useful for displaying radial categories.
*
* `CategoryAngleAxis` represents a IgxDataChartComponent category angle axis. Useful for displaying radial categories
*/
export var IgcCategoryAngleAxisComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcCategoryAngleAxisComponent, _super);
function IgcCategoryAngleAxisComponent() {
var _this = _super.call(this) || this;
_this._actualIntervalChange = null;
_this._actualIntervalChange_wrapped = null;
return _this;
}
IgcCategoryAngleAxisComponent.prototype.createImplementation = function () {
return new CategoryAngleAxis();
};
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcCategoryAngleAxisComponent.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();
}
};
IgcCategoryAngleAxisComponent.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(IgcCategoryAngleAxisComponent, "observedAttributes", {
get: function () {
if (IgcCategoryAngleAxisComponent._observedAttributesIgcCategoryAngleAxisComponent == null) {
var names = getAllPropertyNames(IgcCategoryAngleAxisComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcCategoryAngleAxisComponent._observedAttributesIgcCategoryAngleAxisComponent = names;
}
return IgcCategoryAngleAxisComponent._observedAttributesIgcCategoryAngleAxisComponent;
},
enumerable: false,
configurable: true
});
IgcCategoryAngleAxisComponent.register = function () {
if (!IgcCategoryAngleAxisComponent._isElementRegistered) {
IgcCategoryAngleAxisComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcCategoryAngleAxisComponent.htmlTagName, IgcCategoryAngleAxisComponent);
}
};
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "isAngular", {
/**
* Checks if the axis is of angular type
*/
get: function () {
return this.i.dc;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "companionAxisInterval", {
/**
* Gets or sets interval of labels on the companion axis.
*/
get: function () {
return this.i.rx;
},
set: function (v) {
this.i.rx = +v;
this._a("companionAxisInterval", this.i.rx);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "companionAxisMinorInterval", {
/**
* Gets or sets label angle on the companion axis.
*/
get: function () {
return this.i.ry;
},
set: function (v) {
this.i.ry = +v;
this._a("companionAxisMinorInterval", this.i.ry);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "companionAxisStartAngleOffset", {
/**
* Gets or sets angle in degress that the chart's 0th angle should be offset for the companion axis
*/
get: function () {
return this.i.rz;
},
set: function (v) {
this.i.rz = +v;
this._a("companionAxisStartAngleOffset", this.i.rz);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "companionAxisLabelMode", {
/**
* Gets or sets the mode axis labels will operate for the companion axis.
*/
get: function () {
return this.i.rc;
},
set: function (v) {
this.i.rc = ensureEnum(AxisAngleLabelMode_$type, v);
this._a("companionAxisLabelMode", enumToString(AxisAngleLabelMode_$type, this.i.rc));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "startAngleOffset", {
/**
* 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: function () {
return this.i.r9;
},
set: function (v) {
this.i.r9 = +v;
this._a("startAngleOffset", this.i.r9);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "labelMode", {
/**
* Indicates the mode axis labels will operate in.
*/
get: function () {
return this.i.rd;
},
set: function (v) {
this.i.rd = ensureEnum(AxisAngleLabelMode_$type, v);
this._a("labelMode", enumToString(AxisAngleLabelMode_$type, this.i.rd));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "areGroupSizesUneven", {
get: function () {
return this.i.rn;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.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.
*
* 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.r6;
},
set: function (v) {
this.i.r6 = +v;
this._a("interval", this.i.r6);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "actualInterval", {
/**
* Gets the effective value for the current Interval.
*
* Gets the effective value for the current Interval.
*/
get: function () {
return this.i.rv;
},
set: function (v) {
this.i.rv = +v;
this._a("actualInterval", this.i.rv);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.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.
*
* 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.r7;
},
set: function (v) {
this.i.r7 = +v;
this._a("minorInterval", this.i.r7);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcCategoryAngleAxisComponent.prototype, "actualMinorInterval", {
/**
* Gets the effective value for the current MinorInterval.
*
* Get the effective value for the current minorInterval.
*/
get: function () {
return this.i.rw;
},
set: function (v) {
this.i.rw = +v;
this._a("actualMinorInterval", this.i.rw);
},
enumerable: false,
configurable: true
});
/**
* Gets the scaled angle in radians from the raw axis value.
* @param unscaledAngle * The raw axis value.
*/
IgcCategoryAngleAxisComponent.prototype.getScaledAngle = function (unscaledAngle) {
var iv = this.i.getScaledAngle(unscaledAngle);
return (iv);
};
/**
* Gets the raw axis value from the scaled angle in radians.
*/
IgcCategoryAngleAxisComponent.prototype.getUnscaledAngle = function (scaledAngle) {
var iv = this.i.getUnscaledAngle(scaledAngle);
return (iv);
};
Object.defineProperty(IgcCategoryAngleAxisComponent.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 == '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);
},
enumerable: false,
configurable: true
});
IgcCategoryAngleAxisComponent._observedAttributesIgcCategoryAngleAxisComponent = null;
IgcCategoryAngleAxisComponent.htmlTagName = "igc-category-angle-axis";
IgcCategoryAngleAxisComponent._isElementRegistered = false;
return IgcCategoryAngleAxisComponent;
}(IgcCategoryAxisBaseComponent));