igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
102 lines (101 loc) • 4.57 kB
JavaScript
import { __extends } from "tslib";
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { ChaikinVolatilityIndicator } from "./ChaikinVolatilityIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Chaikin Volatility indicator series.
* The ChaikinVolatility indicator attempts to show volatility by displaying the spread between
* the high and low values.
* Default required members: High, Low
*
* `ChaikinVolatilityIndicator` class specify the series as Chaikin Volitility Indicator series.
*/
var IgcChaikinVolatilityIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcChaikinVolatilityIndicatorComponent, _super);
function IgcChaikinVolatilityIndicatorComponent() {
return _super.call(this) || this;
}
IgcChaikinVolatilityIndicatorComponent.prototype.createImplementation = function () {
return new ChaikinVolatilityIndicator();
};
Object.defineProperty(IgcChaikinVolatilityIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcChaikinVolatilityIndicatorComponent.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();
}
};
IgcChaikinVolatilityIndicatorComponent.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(IgcChaikinVolatilityIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcChaikinVolatilityIndicatorComponent._observedAttributesIgcChaikinVolatilityIndicatorComponent == null) {
var names = getAllPropertyNames(IgcChaikinVolatilityIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcChaikinVolatilityIndicatorComponent._observedAttributesIgcChaikinVolatilityIndicatorComponent = names;
}
return IgcChaikinVolatilityIndicatorComponent._observedAttributesIgcChaikinVolatilityIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcChaikinVolatilityIndicatorComponent.register = function () {
if (!IgcChaikinVolatilityIndicatorComponent._isElementRegistered) {
IgcChaikinVolatilityIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcChaikinVolatilityIndicatorComponent.htmlTagName, IgcChaikinVolatilityIndicatorComponent);
}
};
Object.defineProperty(IgcChaikinVolatilityIndicatorComponent.prototype, "period", {
/**
* Gets or sets the moving average period for the current ChaikinVolatilityIndicator object.
* The typical, and initial, value for ChaikinVolatilityIndicator periods is 10.
*
* Set the `Period` property if you wish to change the moving average period for the indicator.
*
* ```ts
* this.series.longPeriod = 30;
* ```
*/
get: function () {
return this.i.acl;
},
set: function (v) {
this.i.acl = +v;
this._a("period", this.i.acl);
},
enumerable: false,
configurable: true
});
IgcChaikinVolatilityIndicatorComponent._observedAttributesIgcChaikinVolatilityIndicatorComponent = null;
IgcChaikinVolatilityIndicatorComponent.htmlTagName = "igc-chaikin-volatility-indicator";
IgcChaikinVolatilityIndicatorComponent._isElementRegistered = false;
return IgcChaikinVolatilityIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));
export { IgcChaikinVolatilityIndicatorComponent };