igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
99 lines (98 loc) • 4.37 kB
JavaScript
import { __extends } from "tslib";
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { AverageTrueRangeIndicator } from "./AverageTrueRangeIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Average True Range indicator series.
* Default required members: High, Low, Close
*
* You can use the `AverageTrueRangeIndicator` to measures a security's degree of price movement or volatility within a given period of time.
*/
export var IgcAverageTrueRangeIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcAverageTrueRangeIndicatorComponent, _super);
function IgcAverageTrueRangeIndicatorComponent() {
return _super.call(this) || this;
}
IgcAverageTrueRangeIndicatorComponent.prototype.createImplementation = function () {
return new AverageTrueRangeIndicator();
};
Object.defineProperty(IgcAverageTrueRangeIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcAverageTrueRangeIndicatorComponent.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();
}
};
IgcAverageTrueRangeIndicatorComponent.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(IgcAverageTrueRangeIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcAverageTrueRangeIndicatorComponent._observedAttributesIgcAverageTrueRangeIndicatorComponent == null) {
var names = getAllPropertyNames(IgcAverageTrueRangeIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcAverageTrueRangeIndicatorComponent._observedAttributesIgcAverageTrueRangeIndicatorComponent = names;
}
return IgcAverageTrueRangeIndicatorComponent._observedAttributesIgcAverageTrueRangeIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcAverageTrueRangeIndicatorComponent.register = function () {
if (!IgcAverageTrueRangeIndicatorComponent._isElementRegistered) {
IgcAverageTrueRangeIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcAverageTrueRangeIndicatorComponent.htmlTagName, IgcAverageTrueRangeIndicatorComponent);
}
};
Object.defineProperty(IgcAverageTrueRangeIndicatorComponent.prototype, "period", {
/**
* Gets or sets the moving average period for the current AverageTrueRangeSeries object.
* The typical, and initial, value for AverageTrueRange periods is 14.
*
* You can use the `Period` to set the moving average.
*
* ```ts
* this.series.period = 14;
* ```
*/
get: function () {
return this.i.ac1;
},
set: function (v) {
this.i.ac1 = +v;
this._a("period", this.i.ac1);
},
enumerable: false,
configurable: true
});
IgcAverageTrueRangeIndicatorComponent._observedAttributesIgcAverageTrueRangeIndicatorComponent = null;
IgcAverageTrueRangeIndicatorComponent.htmlTagName = "igc-average-true-range-indicator";
IgcAverageTrueRangeIndicatorComponent._isElementRegistered = false;
return IgcAverageTrueRangeIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));