igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
95 lines (94 loc) • 4.71 kB
JavaScript
import { __extends } from "tslib";
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { StandardDeviationIndicator } from "./StandardDeviationIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Standard Deviation indicator series.
* Default required members: High, Low, Close
*
* `StandardDeviationIndicator` (SDI) measures statistical variation in stock prices or volatility. The difference between an individual security’s closing price and the average security closing price is called the dispersion. The larger the dispersion is the higher the standard deviation will be and therefore the volatility. The smaller the dispersion is (the difference between an individual closing price and the average price), the smaller the standard deviation and the lower the price volatility.
*
* Using this indicator requires setting both the `HighMemberPath`, `LowMemberPath` and `CloseMemberPath`.
*/
export var IgcStandardDeviationIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcStandardDeviationIndicatorComponent, _super);
function IgcStandardDeviationIndicatorComponent() {
return _super.call(this) || this;
}
IgcStandardDeviationIndicatorComponent.prototype.createImplementation = function () {
return new StandardDeviationIndicator();
};
Object.defineProperty(IgcStandardDeviationIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcStandardDeviationIndicatorComponent.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();
}
};
IgcStandardDeviationIndicatorComponent.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(IgcStandardDeviationIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcStandardDeviationIndicatorComponent._observedAttributesIgcStandardDeviationIndicatorComponent == null) {
var names = getAllPropertyNames(IgcStandardDeviationIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcStandardDeviationIndicatorComponent._observedAttributesIgcStandardDeviationIndicatorComponent = names;
}
return IgcStandardDeviationIndicatorComponent._observedAttributesIgcStandardDeviationIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcStandardDeviationIndicatorComponent.register = function () {
if (!IgcStandardDeviationIndicatorComponent._isElementRegistered) {
IgcStandardDeviationIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcStandardDeviationIndicatorComponent.htmlTagName, IgcStandardDeviationIndicatorComponent);
}
};
Object.defineProperty(IgcStandardDeviationIndicatorComponent.prototype, "period", {
/**
* Gets or sets the moving average period for the current StandardDeviationIndicator object.
* The typical, and initial, value for STDEV periods is 20.
*/
get: function () {
return this.i.ac1;
},
set: function (v) {
this.i.ac1 = +v;
this._a("period", this.i.ac1);
},
enumerable: false,
configurable: true
});
IgcStandardDeviationIndicatorComponent._observedAttributesIgcStandardDeviationIndicatorComponent = null;
IgcStandardDeviationIndicatorComponent.htmlTagName = "igc-standard-deviation-indicator";
IgcStandardDeviationIndicatorComponent._isElementRegistered = false;
return IgcStandardDeviationIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));