igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
160 lines (157 loc) • 6.19 kB
JavaScript
import { __extends } from "tslib";
import { AxisAngleLabelMode_$type } from "./AxisAngleLabelMode";
import { IgcNumericAxisBaseComponent } from "./igc-numeric-axis-base-component";
import { NumericAngleAxis } from "./NumericAngleAxis";
import { getAllPropertyNames, toSpinal, ensureEnum, enumToString } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent angle based axis for polar series.
*/
export var IgcNumericAngleAxisComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcNumericAngleAxisComponent, _super);
function IgcNumericAngleAxisComponent() {
return _super.call(this) || this;
}
IgcNumericAngleAxisComponent.prototype.createImplementation = function () {
return new NumericAngleAxis();
};
Object.defineProperty(IgcNumericAngleAxisComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcNumericAngleAxisComponent.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();
}
};
IgcNumericAngleAxisComponent.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(IgcNumericAngleAxisComponent, "observedAttributes", {
get: function () {
if (IgcNumericAngleAxisComponent._observedAttributesIgcNumericAngleAxisComponent == null) {
var names = getAllPropertyNames(IgcNumericAngleAxisComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcNumericAngleAxisComponent._observedAttributesIgcNumericAngleAxisComponent = names;
}
return IgcNumericAngleAxisComponent._observedAttributesIgcNumericAngleAxisComponent;
},
enumerable: false,
configurable: true
});
IgcNumericAngleAxisComponent.register = function () {
if (!IgcNumericAngleAxisComponent._isElementRegistered) {
IgcNumericAngleAxisComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcNumericAngleAxisComponent.htmlTagName, IgcNumericAngleAxisComponent);
}
};
Object.defineProperty(IgcNumericAngleAxisComponent.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.tj;
},
set: function (v) {
this.i.tj = +v;
this._a("companionAxisStartAngleOffset", this.i.tj);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcNumericAngleAxisComponent.prototype, "companionAxisLabelMode", {
/**
* Gets or sets the mode axis labels will operate for the companion axis.
*/
get: function () {
return this.i.s9;
},
set: function (v) {
this.i.s9 = ensureEnum(AxisAngleLabelMode_$type, v);
this._a("companionAxisLabelMode", enumToString(AxisAngleLabelMode_$type, this.i.s9));
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcNumericAngleAxisComponent.prototype, "isAngular", {
/**
* Gets if the current axis is of angular axis type
*/
get: function () {
return this.i.dc;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcNumericAngleAxisComponent.prototype, "startAngleOffset", {
/**
* Indicates the angle in degress that the chart's 0th angle should be offset.
*/
get: function () {
return this.i.tn;
},
set: function (v) {
this.i.tn = +v;
this._a("startAngleOffset", this.i.tn);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcNumericAngleAxisComponent.prototype, "labelMode", {
/**
* Indicates the mode axis labels will operate in.
*/
get: function () {
return this.i.ta;
},
set: function (v) {
this.i.ta = ensureEnum(AxisAngleLabelMode_$type, v);
this._a("labelMode", enumToString(AxisAngleLabelMode_$type, this.i.ta));
},
enumerable: false,
configurable: true
});
/**
* Gets the scaled angle value in radians based on the raw input.
* @param unscaledAngle * The unscaled angle.
*/
IgcNumericAngleAxisComponent.prototype.getScaledAngle = function (unscaledAngle) {
var iv = this.i.getScaledAngle(unscaledAngle);
return (iv);
};
/**
* Gets the raw axis value back from the angle that would be used on the chart.
* @param scaledAngle * The chart angle value.
*/
IgcNumericAngleAxisComponent.prototype.getUnscaledAngle = function (scaledAngle) {
var iv = this.i.getUnscaledAngle(scaledAngle);
return (iv);
};
IgcNumericAngleAxisComponent._observedAttributesIgcNumericAngleAxisComponent = null;
IgcNumericAngleAxisComponent.htmlTagName = "igc-numeric-angle-axis";
IgcNumericAngleAxisComponent._isElementRegistered = false;
return IgcNumericAngleAxisComponent;
}(IgcNumericAxisBaseComponent));