igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
123 lines (122 loc) • 5.27 kB
JavaScript
import { __extends } from "tslib";
import { IgcStrategyBasedIndicatorComponent } from "./igc-strategy-based-indicator-component";
import { BollingerBandWidthIndicator } from "./BollingerBandWidthIndicator";
import { getAllPropertyNames, toSpinal } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
/**
* Represents a IgxDataChartComponent Bollinger Bandwidth indicator series.
* Represents the normalized width of the Bollinger bands for each provided value.
* For more info see:
* BollingerBandsOverlay
* Default required members: High, Low, Close
*
* You can use the `BollingerBandWidthIndicator` to represents a IgxDataChartComponent Bollinger Bandwidth indicator series.
*/
export var IgcBollingerBandWidthIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgcBollingerBandWidthIndicatorComponent, _super);
function IgcBollingerBandWidthIndicatorComponent() {
return _super.call(this) || this;
}
IgcBollingerBandWidthIndicatorComponent.prototype.createImplementation = function () {
return new BollingerBandWidthIndicator();
};
Object.defineProperty(IgcBollingerBandWidthIndicatorComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
IgcBollingerBandWidthIndicatorComponent.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();
}
};
IgcBollingerBandWidthIndicatorComponent.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(IgcBollingerBandWidthIndicatorComponent, "observedAttributes", {
get: function () {
if (IgcBollingerBandWidthIndicatorComponent._observedAttributesIgcBollingerBandWidthIndicatorComponent == null) {
var names = getAllPropertyNames(IgcBollingerBandWidthIndicatorComponent);
for (var i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcBollingerBandWidthIndicatorComponent._observedAttributesIgcBollingerBandWidthIndicatorComponent = names;
}
return IgcBollingerBandWidthIndicatorComponent._observedAttributesIgcBollingerBandWidthIndicatorComponent;
},
enumerable: false,
configurable: true
});
IgcBollingerBandWidthIndicatorComponent.register = function () {
if (!IgcBollingerBandWidthIndicatorComponent._isElementRegistered) {
IgcBollingerBandWidthIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcBollingerBandWidthIndicatorComponent.htmlTagName, IgcBollingerBandWidthIndicatorComponent);
}
};
Object.defineProperty(IgcBollingerBandWidthIndicatorComponent.prototype, "period", {
/**
* Gets or sets the moving average period for the Bollinger Band Width Indicator.
* The typical, and initial, value for CCI periods is 20.
*
* You can use the `Period` to set the moving average.
*
* ```ts
* this.series.period = 14;
* ```
*/
get: function () {
return this.i.ac2;
},
set: function (v) {
this.i.ac2 = +v;
this._a("period", this.i.ac2);
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgcBollingerBandWidthIndicatorComponent.prototype, "multiplier", {
/**
* Gets or sets the multiplier for the Bollinger Band width.
* The typical, and initial, value for Bollinger Band width multiplier is 2.
*
* Use the `Multiplier` property for the Bollinger Band width. The typical, and initial, value for Bollinger Band width multiplier is 2.
*
* ```ts
* this.series.multiplier = 14;
* ```
*/
get: function () {
return this.i.ac1;
},
set: function (v) {
this.i.ac1 = +v;
this._a("multiplier", this.i.ac1);
},
enumerable: false,
configurable: true
});
IgcBollingerBandWidthIndicatorComponent._observedAttributesIgcBollingerBandWidthIndicatorComponent = null;
IgcBollingerBandWidthIndicatorComponent.htmlTagName = "igc-bollinger-band-width-indicator";
IgcBollingerBandWidthIndicatorComponent._isElementRegistered = false;
return IgcBollingerBandWidthIndicatorComponent;
}(IgcStrategyBasedIndicatorComponent));