igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
110 lines (109 loc) • 4.91 kB
JavaScript
import { __extends } from "tslib";
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { RelativeStrengthIndexIndicator } from "./RelativeStrengthIndexIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Relative Strength Index indicator series.
* Default required members: Close
*
* The `RelativeStrengthIndexIndicator` class represents Relative Strength Index indicator series for the IgxDataChartComponent .
*/
var IgcRelativeStrengthIndexIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcRelativeStrengthIndexIndicatorComponent, _super);
function IgcRelativeStrengthIndexIndicatorComponent() {
return _super.call(this) || this;
}
IgcRelativeStrengthIndexIndicatorComponent.prototype.createImplementation = function () {
return new RelativeStrengthIndexIndicator();
};
Object.defineProperty(IgcRelativeStrengthIndexIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcRelativeStrengthIndexIndicatorComponent.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();
}
};
IgcRelativeStrengthIndexIndicatorComponent.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(IgcRelativeStrengthIndexIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcRelativeStrengthIndexIndicatorComponent._observedAttributesIgcRelativeStrengthIndexIndicatorComponent == null) {
var names = getAllPropertyNames(IgcRelativeStrengthIndexIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcRelativeStrengthIndexIndicatorComponent._observedAttributesIgcRelativeStrengthIndexIndicatorComponent = names;
}
return IgcRelativeStrengthIndexIndicatorComponent._observedAttributesIgcRelativeStrengthIndexIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcRelativeStrengthIndexIndicatorComponent.register = function () {
if (!IgcRelativeStrengthIndexIndicatorComponent._isElementRegistered) {
IgcRelativeStrengthIndexIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcRelativeStrengthIndexIndicatorComponent.htmlTagName, IgcRelativeStrengthIndexIndicatorComponent);
}
};
Object.defineProperty(IgcRelativeStrengthIndexIndicatorComponent.prototype, "defaultDisplayType", {
/**
* Gets default display type for the current Financial Indicator
*/
get: function () {
return this.i.aa7;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcRelativeStrengthIndexIndicatorComponent.prototype, "period", {
/**
* Gets or sets the moving average period for the current RelativeStrengthIndexIndicator object.
* The typical, and initial, value for RSI periods is 14.
*
* You can use the `period` property for the current RelativeStrengthIndexIndicator object.
*
* ```ts
* this.series.period = 30;
* ```
*/
get: function () {
return this.i.acl;
},
set: function (v) {
this.i.acl = +v;
this._a("period", this.i.acl);
},
enumerable: false,
configurable: true
});
IgcRelativeStrengthIndexIndicatorComponent._observedAttributesIgcRelativeStrengthIndexIndicatorComponent = null;
IgcRelativeStrengthIndexIndicatorComponent.htmlTagName = "igc-relative-strength-index-indicator";
IgcRelativeStrengthIndexIndicatorComponent._isElementRegistered = false;
return IgcRelativeStrengthIndexIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));
export { IgcRelativeStrengthIndexIndicatorComponent };