igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
107 lines (106 loc) • 4.28 kB
JavaScript
import { IgcFinancialOverlayComponent } from "./igc-financial-overlay-component";
import { BollingerBandsOverlay } from "./BollingerBandsOverlay";
import { getAllPropertyNames, toSpinal, toPoint } from "igniteui-webcomponents-core";
import { RegisterElementHelper } from "igniteui-webcomponents-core";
let IgcBollingerBandsOverlayComponent = /*@__PURE__*/ (() => {
class IgcBollingerBandsOverlayComponent extends IgcFinancialOverlayComponent {
createImplementation() {
return new BollingerBandsOverlay();
}
/**
* @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 (IgcBollingerBandsOverlayComponent._observedAttributesIgcBollingerBandsOverlayComponent == null) {
let names = getAllPropertyNames(IgcBollingerBandsOverlayComponent);
for (let i = 0; i < names.length; i++) {
names[i] = toSpinal(names[i]);
}
IgcBollingerBandsOverlayComponent._observedAttributesIgcBollingerBandsOverlayComponent = names;
}
return IgcBollingerBandsOverlayComponent._observedAttributesIgcBollingerBandsOverlayComponent;
}
static register() {
if (!IgcBollingerBandsOverlayComponent._isElementRegistered) {
IgcBollingerBandsOverlayComponent._isElementRegistered = true;
RegisterElementHelper.registerElement(IgcBollingerBandsOverlayComponent.htmlTagName, IgcBollingerBandsOverlayComponent);
}
}
/**
* Gets or sets the moving average period for the current BollingerBandOverlay object.
* The typical, and initial, value for Bollinger band periods is 14.
*
* You can use the `period` property for moving average of the current BollingerBandOverlay object.
*
* ```ts
* this.series.period = 7;
* ```
*/
get period() {
return this.i.abw;
}
set period(v) {
this.i.abw = +v;
this._a("period", this.i.abw);
}
/**
* Gets or sets the moving average period for the current BollingerBandOverlay object.
* The typical, and initial, value for Bollinger band multipliers is 2.
*
* You can use the `BollingerBandsOverlay`
*/
get multiplier() {
return this.i.abv;
}
set multiplier(v) {
this.i.abv = +v;
this._a("multiplier", this.i.abv);
}
getSeriesValue(world, useInterpolation, skipUnknowns) {
let iv = this.i.jd(toPoint(world), useInterpolation, skipUnknowns);
return (iv);
}
getPreviousOrExactIndex(world, skipUnknowns) {
let iv = this.i.kj(toPoint(world), skipUnknowns);
return (iv);
}
getNextOrExactIndex(world, skipUnknowns) {
let iv = this.i.kh(toPoint(world), skipUnknowns);
return (iv);
}
}
IgcBollingerBandsOverlayComponent._observedAttributesIgcBollingerBandsOverlayComponent = null;
IgcBollingerBandsOverlayComponent.htmlTagName = "igc-bollinger-bands-overlay";
IgcBollingerBandsOverlayComponent._isElementRegistered = false;
return IgcBollingerBandsOverlayComponent;
})();
export { IgcBollingerBandsOverlayComponent };