UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

150 lines (149 loc) 6.91 kB
import { __extends } from "tslib"; import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core'; import { IgxStrategyBasedIndicatorComponent } from "./igx-strategy-based-indicator-component"; import { IgxFinancialIndicatorComponent } from "./igx-financial-indicator-component"; import { IgxFinancialSeriesComponent } from "./igx-financial-series-component"; import { IgxSeriesComponent } from "./igx-series-component"; import { BollingerBandWidthIndicator } from "./BollingerBandWidthIndicator"; import * as i0 from "@angular/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. * * ```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-width-indicator * [xAxis]="xAxis" * [yAxis]="yAxis" * openMemberPath="open" * highMemberPath="high" * lowMemberPath="low" * closeMemberPath="close"> * </igx-bollinger-band-width-indicator> * </igx-data-chart> * ``` * * ```ts * let series = new IgxBollingerBandWidthIndicatorComponent(); * 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 IgxBollingerBandWidthIndicatorComponent = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgxBollingerBandWidthIndicatorComponent, _super); function IgxBollingerBandWidthIndicatorComponent() { return _super.call(this) || this; } IgxBollingerBandWidthIndicatorComponent.prototype.createImplementation = function () { return new BollingerBandWidthIndicator(); }; Object.defineProperty(IgxBollingerBandWidthIndicatorComponent.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgxBollingerBandWidthIndicatorComponent.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. * * ```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-width-indicator * [xAxis]="xAxis" * [yAxis]="yAxis" * openMemberPath="open" * highMemberPath="high" * lowMemberPath="low" * closeMemberPath="close" * period="14"> * </igx-bollinger-band-width-indicator> * </igx-data-chart> * ``` * * ```ts * this.series.period = 14; * ``` */ get: function () { return this.i.acg; }, set: function (v) { this.i.acg = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgxBollingerBandWidthIndicatorComponent.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.acf; }, set: function (v) { this.i.acf = +v; }, enumerable: false, configurable: true }); IgxBollingerBandWidthIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxBollingerBandWidthIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxBollingerBandWidthIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxBollingerBandWidthIndicatorComponent, selector: "igx-bollinger-band-width-indicator", inputs: { period: "period", multiplier: "multiplier" }, providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(function () { return IgxBollingerBandWidthIndicatorComponent; }) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(function () { return IgxBollingerBandWidthIndicatorComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandWidthIndicatorComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandWidthIndicatorComponent; }) }], usesInheritance: true, ngImport: i0, template: "", isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxBollingerBandWidthIndicatorComponent; }(IgxStrategyBasedIndicatorComponent)); export { IgxBollingerBandWidthIndicatorComponent }; i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxBollingerBandWidthIndicatorComponent, decorators: [{ type: Component, args: [{ selector: 'igx-bollinger-band-width-indicator', template: "", providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(function () { return IgxBollingerBandWidthIndicatorComponent; }) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(function () { return IgxBollingerBandWidthIndicatorComponent; }) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandWidthIndicatorComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxBollingerBandWidthIndicatorComponent; }) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { period: [{ type: Input }], multiplier: [{ type: Input }] } });