igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
107 lines (106 loc) • 4.38 kB
JavaScript
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 let IgcBollingerBandWidthIndicatorComponent = /*@__PURE__*/ (() => {
class IgcBollingerBandWidthIndicatorComponent extends IgcStrategyBasedIndicatorComponent {
createImplementation() {
return new BollingerBandWidthIndicator();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor() {
super();
}
connectedCallback() {
if (super["connectedCallback"]) {
super["connectedCallback"]();
}
if (this.i.connectedCallback) {
this.i.connectedCallback();
}
if (!this._attached) {
this._attached = true;
this._flushQueuedAttributes();
}
}
disconnectedCallback() {
if (super["disconnectedCallback"]) {
super["disconnectedCallback"]();
}
if (this.i.disconnectedCallback) {
this.i.disconnectedCallback();
}
if (this._attached) {
this._attached = false;
}
}
static get observedAttributes() {
if (IgcBollingerBandWidthIndicatorComponent._observedAttributesIgcBollingerBandWidthIndicatorComponent == null) {
let names = getAllPropertyNames(IgcBollingerBandWidthIndicatorComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcBollingerBandWidthIndicatorComponent._observedAttributesIgcBollingerBandWidthIndicatorComponent = names;
}
return IgcBollingerBandWidthIndicatorComponent._observedAttributesIgcBollingerBandWidthIndicatorComponent;
}
static register() {
if (!IgcBollingerBandWidthIndicatorComponent._isElementRegistered) {
IgcBollingerBandWidthIndicatorComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcBollingerBandWidthIndicatorComponent.htmlTagName, IgcBollingerBandWidthIndicatorComponent);
}
}
/**
* 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 period() {
return this.i.acm;
}
set period(v) {
this.i.acm = +v;
this._a("period", this.i.acm);
}
/**
* 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 multiplier() {
return this.i.acl;
}
set multiplier(v) {
this.i.acl = +v;
this._a("multiplier", this.i.acl);
}
}
IgcBollingerBandWidthIndicatorComponent._observedAttributesIgcBollingerBandWidthIndicatorComponent = null;
IgcBollingerBandWidthIndicatorComponent.htmlTagName = "igc-bollinger-band-width-indicator";
IgcBollingerBandWidthIndicatorComponent._isElementRegistered = false;
return IgcBollingerBandWidthIndicatorComponent;
})();