UNPKG

igniteui-angular-charts

Version:

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

120 lines (119 loc) 5.61 kB
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 { RelativeStrengthIndexIndicator } from "./RelativeStrengthIndexIndicator"; import * as i0 from "@angular/core"; /** * Represents a IgxDataChartComponent Relative Strength Index indicator series. * Default required members: Close * * The `RelativeStrengthIndexIndicator` class represents Relative Strength Index indicator series for the IgxDataChartComponent . * * ```html * <igx-data-chart * [dataSource]="data"> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-relative-strength-index-indicator * #series * [xAxis]="xAxis" * [yAxis]="yAxis" * highMemberPath="high" * lowMemberPath="low" * volumeMemberPath="volume"> * </igx-relative-strength-index-indicator> * </igx-data-chart> * ``` * * ```ts * let series = new IgxRelativeStrengthIndexIndicatorComponent(); * 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); * ``` */ export let IgxRelativeStrengthIndexIndicatorComponent = /*@__PURE__*/ (() => { class IgxRelativeStrengthIndexIndicatorComponent extends IgxStrategyBasedIndicatorComponent { constructor() { super(); } createImplementation() { return new RelativeStrengthIndexIndicator(); } /** * @hidden */ get i() { return this._implementation; } /** * Gets default display type for the current Financial Indicator */ get defaultDisplayType() { return this.i.abm; } /** * Gets or sets the moving average period for the current RelativeStrengthIndexIndicator object. * The typical, and initial, value for RSI periods is 14. * * You can use the `period` property for the current RelativeStrengthIndexIndicator object. * * ```html * <igx-data-chart * [dataSource]="data"> * <igx-category-x-axis * label="label" * #xAxis> * </igx-category-x-axis> * <igx-numeric-y-axis * #yAxis> * </igx-numeric-y-axis> * <igx-relative-strength-index-indicator * #series * [xAxis]="xAxis" * [yAxis]="yAxis" * highMemberPath="high" * lowMemberPath="low" * volumeMemberPath="volume" * period=30> * </igx-relative-strength-index-indicator> * </igx-data-chart> * ``` * * ```ts * this.series.period = 30; * ``` */ get period() { return this.i.ac0; } set period(v) { this.i.ac0 = +v; } } IgxRelativeStrengthIndexIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxRelativeStrengthIndexIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); IgxRelativeStrengthIndexIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxRelativeStrengthIndexIndicatorComponent, selector: "igx-relative-strength-index-indicator", inputs: { period: "period" }, providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxRelativeStrengthIndexIndicatorComponent) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(() => IgxRelativeStrengthIndexIndicatorComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxRelativeStrengthIndexIndicatorComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxRelativeStrengthIndexIndicatorComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); return IgxRelativeStrengthIndexIndicatorComponent; })(); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxRelativeStrengthIndexIndicatorComponent, decorators: [{ type: Component, args: [{ selector: 'igx-relative-strength-index-indicator', template: ``, providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxRelativeStrengthIndexIndicatorComponent) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(() => IgxRelativeStrengthIndexIndicatorComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxRelativeStrengthIndexIndicatorComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxRelativeStrengthIndexIndicatorComponent) }], changeDetection: ChangeDetectionStrategy.OnPush }] }], ctorParameters: function () { return []; }, propDecorators: { period: [{ type: Input }] } });