igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
130 lines (127 loc) • 4.93 kB
JavaScript
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";
let IgcNumericAngleAxisComponent = /*@__PURE__*/ (() => {
class IgcNumericAngleAxisComponent extends IgcNumericAxisBaseComponent {
createImplementation() {
return new NumericAngleAxis();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
}
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 (IgcNumericAngleAxisComponent._observedAttributesIgcNumericAngleAxisComponent == null) {
let names = getAllPropertyNames(IgcNumericAngleAxisComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcNumericAngleAxisComponent._observedAttributesIgcNumericAngleAxisComponent = names;
}
return IgcNumericAngleAxisComponent._observedAttributesIgcNumericAngleAxisComponent;
}
static register() {
if (!IgcNumericAngleAxisComponent._isElementRegistered) {
IgcNumericAngleAxisComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcNumericAngleAxisComponent.htmlTagName, IgcNumericAngleAxisComponent);
}
}
/**
* Gets or sets angle in degress that the chart's 0th angle should be offset for the companion axis
*/
get companionAxisStartAngleOffset() {
return this.i.tj;
}
set companionAxisStartAngleOffset(v) {
this.i.tj = +v;
this._a("companionAxisStartAngleOffset", this.i.tj);
}
/**
* Gets or sets the mode axis labels will operate for the companion axis.
*/
get companionAxisLabelMode() {
return this.i.s9;
}
set companionAxisLabelMode(v) {
this.i.s9 = ensureEnum(AxisAngleLabelMode_$type, v);
this._a("companionAxisLabelMode", enumToString(AxisAngleLabelMode_$type, this.i.s9));
}
/**
* Gets if the current axis is of angular axis type
*/
get isAngular() {
return this.i.dc;
}
/**
* Indicates the angle in degress that the chart's 0th angle should be offset.
*/
get startAngleOffset() {
return this.i.tn;
}
set startAngleOffset(v) {
this.i.tn = +v;
this._a("startAngleOffset", this.i.tn);
}
/**
* Indicates the mode axis labels will operate in.
*/
get labelMode() {
return this.i.ta;
}
set labelMode(v) {
this.i.ta = ensureEnum(AxisAngleLabelMode_$type, v);
this._a("labelMode", enumToString(AxisAngleLabelMode_$type, this.i.ta));
}
/**
* Gets the scaled angle value in radians based on the raw input.
* @param unscaledAngle * The unscaled angle.
*/
getScaledAngle(unscaledAngle) {
let 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.
*/
getUnscaledAngle(scaledAngle) {
let iv = this.i.getUnscaledAngle(scaledAngle);
return (iv);
}
}
IgcNumericAngleAxisComponent._observedAttributesIgcNumericAngleAxisComponent = null;
IgcNumericAngleAxisComponent.htmlTagName = "igc-numeric-angle-axis";
IgcNumericAngleAxisComponent._isElementRegistered = false;
return IgcNumericAngleAxisComponent;
})();
export { IgcNumericAngleAxisComponent };