igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
98 lines (97 loc) • 5.25 kB
JavaScript
import { __extends } from "tslib";
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { SlowStochasticOscillatorIndicator } from "./SlowStochasticOscillatorIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Slow Stochastic Oscillator indicator series.
* Default required members: High, Low, Close
*
* `SlowStochasticOscillatorIndicator` (SSO) displays the closing price relative to the high-low range over a given period of time. There are three types of Stochastic Oscillators: Fast, Slow, and Full. The Stochastic Oscillator is a momentum indicator that shows the relation of the current close price relative to the high/low range over a given time period using a scale of 0 to 100. It is based on the premise that prices will close near 100 in a rising market and closer to 0 in a declining market.
*
* The Fast Stochastic Oscillator Indicator is used to identify buying or selling divergences. The Slow Stochastic Oscillator uses a 3-day SMA and the Full Stochastic Oscillator is the Slow Stochastic Oscillator with time period.
*
* Using this indicator requires setting both the `HighMemberPath`, `LowMemberPath` and `VolumeMemberPath`.
*/
var IgcSlowStochasticOscillatorIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcSlowStochasticOscillatorIndicatorComponent, _super);
function IgcSlowStochasticOscillatorIndicatorComponent() {
return _super.call(this) || this;
}
IgcSlowStochasticOscillatorIndicatorComponent.prototype.createImplementation = function () {
return new SlowStochasticOscillatorIndicator();
};
Object.defineProperty(IgcSlowStochasticOscillatorIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcSlowStochasticOscillatorIndicatorComponent.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();
}
};
IgcSlowStochasticOscillatorIndicatorComponent.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(IgcSlowStochasticOscillatorIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcSlowStochasticOscillatorIndicatorComponent._observedAttributesIgcSlowStochasticOscillatorIndicatorComponent == null) {
var names = getAllPropertyNames(IgcSlowStochasticOscillatorIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcSlowStochasticOscillatorIndicatorComponent._observedAttributesIgcSlowStochasticOscillatorIndicatorComponent = names;
}
return IgcSlowStochasticOscillatorIndicatorComponent._observedAttributesIgcSlowStochasticOscillatorIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcSlowStochasticOscillatorIndicatorComponent.register = function () {
if (!IgcSlowStochasticOscillatorIndicatorComponent._isElementRegistered) {
IgcSlowStochasticOscillatorIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcSlowStochasticOscillatorIndicatorComponent.htmlTagName, IgcSlowStochasticOscillatorIndicatorComponent);
}
};
Object.defineProperty(IgcSlowStochasticOscillatorIndicatorComponent.prototype, "period", {
/**
* Gets or sets the moving average period for the current SlowStochasticOscillatorIndicator object.
* The typical, and initial, value for SlowStochasticOscillatorIndicator periods is 14.
*/
get: function () {
return this.i.acl;
},
set: function (v) {
this.i.acl = +v;
this._a("period", this.i.acl);
},
enumerable: false,
configurable: true
});
IgcSlowStochasticOscillatorIndicatorComponent._observedAttributesIgcSlowStochasticOscillatorIndicatorComponent = null;
IgcSlowStochasticOscillatorIndicatorComponent.htmlTagName = "igc-slow-stochastic-oscillator-indicator";
IgcSlowStochasticOscillatorIndicatorComponent._isElementRegistered = false;
return IgcSlowStochasticOscillatorIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));
export { IgcSlowStochasticOscillatorIndicatorComponent };