igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
107 lines (106 loc) • 5.13 kB
JavaScript
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 { StochRSIIndicator } from "./StochRSIIndicator";
import * as i0 from "@angular/core";
/**
* Represents a IgxDataChartComponent StochRSI indicator series.
* Default required members: Close
*
* `StochRSIIndicator` or Stochastic Relative Strength IndexI Indicator (SRSI) measures when a security is overbought or oversold within a specified period of time. The values range from 0 to 1. The StochRSI Indicator is calculated by applying the Stochastic Oscillator formula to RelativeStrengthIndexIndicator (RSI) data.
*
* Using this indicator requires setting the `CloseMemberPath`.
*
* ```html
* <igx-data-chart
* width=500px
* height=500px
* [dataSource]="data" >
* <igx-ordinal-time-x-axis
* dateTimeMemberPath="TimeStamp"
* #xAxis>
* </igx-ordinal-time-x-axis>
* <igx-numeric-y-axis
* #yAxis></igx-numeric-y-axis>
* <igx-stoch-rsi-indicator
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* closeMemberPath="Close">
* </igx-stoch-rsi-indicator>
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxStochRSIIndicatorComponent();
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.closeMemberPath = "close";
* this.chart.series.add(series);
* ```
*/
export let IgxStochRSIIndicatorComponent = /*@__PURE__*/ (() => {
class IgxStochRSIIndicatorComponent extends IgxStrategyBasedIndicatorComponent {
constructor() {
super();
}
createImplementation() {
return new StochRSIIndicator();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
/**
* Gets or sets the moving average period for the current StochRSIIndicator object.
* The typical, and initial, value for StochRSI periods is 14.
*
* ```html
* <igx-data-chart
* width=500px
* height=500px
* [dataSource]="data" >
* <igx-ordinal-time-x-axis
* dateTimeMemberPath="TimeStamp"
* #xAxis>
* </igx-ordinal-time-x-axis>
* <igx-numeric-y-axis
* #yAxis></igx-numeric-y-axis>
* <igx-stoch-rsi-indicator
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* closeMemberPath="Close"
* period=10>
* </igx-stoch-rsi-indicator>
* </igx-data-chart>
* ```
*
* ```ts
* this.series.period = 10;
* ```
*/
get period() {
return this.i.ac0;
}
set period(v) {
this.i.ac0 = +v;
}
}
IgxStochRSIIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxStochRSIIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxStochRSIIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxStochRSIIndicatorComponent, selector: "igx-stoch-rsi-indicator", inputs: { period: "period" }, providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxStochRSIIndicatorComponent) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(() => IgxStochRSIIndicatorComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxStochRSIIndicatorComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxStochRSIIndicatorComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
return IgxStochRSIIndicatorComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxStochRSIIndicatorComponent, decorators: [{
type: Component,
args: [{
selector: 'igx-stoch-rsi-indicator',
template: ``,
providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxStochRSIIndicatorComponent) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(() => IgxStochRSIIndicatorComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxStochRSIIndicatorComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxStochRSIIndicatorComponent) }],
changeDetection: ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; }, propDecorators: { period: [{
type: Input
}] } });