igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
155 lines (154 loc) • 6.77 kB
JavaScript
import { __extends } from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxFinancialOverlayComponent } from "./igx-financial-overlay-component";
import { IgxFinancialSeriesComponent } from "./igx-financial-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { BollingerBandsOverlay } from "./BollingerBandsOverlay";
import { toPoint } from "igniteui-angular-core";
import * as i0 from "@angular/core";
/**
* Represents a IgxDataChartComponent Bollinger Bands financial overlay series.
* Default required members: High, Low, Close
*
* You can use the `BollingerBandsOverlay` class represents a IgxDataChartComponent Bollinger Bands financial overlay series.
*
* ```html
* <igx-data-chart
* #chart
* [dataSource]="data" >
* <igx-category-x-axis
* label="label"
* #xAxis>
* </igx-category-x-axis>
* <igx-numeric-y-axis
* #yAxis>
* </igx-numeric-y-axis>
* <igx-bollinger-band-overlay
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* openMemberPath="open"
* highMemberPath="high"
* lowMemberPath="low"
* closeMemberPath="close">
* </igx-bollinger-band-overlay>
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxBollingerBandOverlayComponent();
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.openMemberPath = "open";
* series.highMemberPath = "high";
* series.lowMemberPath = "low";
* series.closeMemberPath = "close";
* this.chart.series.add(series);
* ```
*/
var IgxBollingerBandsOverlayComponent = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgxBollingerBandsOverlayComponent, _super);
function IgxBollingerBandsOverlayComponent() {
return _super.call(this) || this;
}
IgxBollingerBandsOverlayComponent.prototype.createImplementation = function () {
return new BollingerBandsOverlay();
};
Object.defineProperty(IgxBollingerBandsOverlayComponent.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxBollingerBandsOverlayComponent.prototype, "period", {
/**
* 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.
*
* ```html
* <igx-data-chart
* #chart
* [dataSource]="data" >
* <igx-category-x-axis
* label="label"
* #xAxis>
* </igx-category-x-axis>
* <igx-numeric-y-axis
* #yAxis>
* </igx-numeric-y-axis>
* <igx-bollinger-band-overlay
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* openMemberPath="open"
* highMemberPath="high"
* lowMemberPath="low"
* closeMemberPath="close"
* period="7">
* </igx-bollinger-band-overlay>
* </igx-data-chart>
* ```
*
* ```ts
* this.series.period = 7;
* ```
*/
get: function () {
return this.i.abg;
},
set: function (v) {
this.i.abg = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxBollingerBandsOverlayComponent.prototype, "multiplier", {
/**
* 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: function () {
return this.i.abf;
},
set: function (v) {
this.i.abf = +v;
},
enumerable: false,
configurable: true
});
IgxBollingerBandsOverlayComponent.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) {
var iv = this.i.i6(toPoint(world), useInterpolation, skipUnknowns);
return (iv);
};
IgxBollingerBandsOverlayComponent.prototype.getPreviousOrExactIndex = function (world, skipUnknowns) {
var iv = this.i.kb(toPoint(world), skipUnknowns);
return (iv);
};
IgxBollingerBandsOverlayComponent.prototype.getNextOrExactIndex = function (world, skipUnknowns) {
var iv = this.i.j9(toPoint(world), skipUnknowns);
return (iv);
};
IgxBollingerBandsOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxBollingerBandsOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxBollingerBandsOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxBollingerBandsOverlayComponent, selector: "igx-bollinger-bands-overlay", inputs: { period: "period", multiplier: "multiplier" }, providers: [{ provide: IgxFinancialOverlayComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
return IgxBollingerBandsOverlayComponent;
}(IgxFinancialOverlayComponent));
export { IgxBollingerBandsOverlayComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxBollingerBandsOverlayComponent, decorators: [{
type: Component,
args: [{
selector: 'igx-bollinger-bands-overlay',
template: "",
providers: [{ provide: IgxFinancialOverlayComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandsOverlayComponent; }) }],
changeDetection: ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; }, propDecorators: { period: [{
type: Input
}], multiplier: [{
type: Input
}] } });