igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
114 lines (113 loc) • 5.63 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 { WilliamsPercentRIndicator } from "./WilliamsPercentRIndicator";
import * as i0 from "@angular/core";
/**
* Represents a IgxDataChartComponent Williams %R indicator series.
* Default required members: High, Low, Close
*
* The `WilliamsPercentRIndicator` scale ranges from 0 to -100. It is useful for identifying overbought and oversold securities.
* The `WilliamsPercentRIndicator` is calculated by dividing the difference between the highest high for the period and the current close by the highest high minus the lowest low for the period.
*
* ```html
* <igx-data-chart
* [dataSource]="data" >
* <igx-category-x-axis #xAxis
* label="label">
* </igx-category-x-axis>
* <igx-numeric-y-axis #yAxis>
* </igx-numeric-y-axis>
* <igx-williams-percent-r-indicator
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* openMemberPath="open"
* highMemberPath="high"
* lowMemberPath="low"
* closeMemberPath="close">
* </igx-williams-percent-r-indicator>
* </igx-data-chart>
* ```
*
* ```ts
* let series = new IgxWilliamsPercentRIndicatorComponent();
* 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 IgxWilliamsPercentRIndicatorComponent = /*@__PURE__*/ (() => {
class IgxWilliamsPercentRIndicatorComponent extends IgxStrategyBasedIndicatorComponent {
constructor() {
super();
}
createImplementation() {
return new WilliamsPercentRIndicator();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
/**
* Gets or sets the moving average period for the current StandardDeviationIndicator object.
* The typical, and initial, value for Williams %R periods is 14.
*
* Gets or sets the `Period` for the moving average period.
*
* The typical, and initial, value for Williams %R periods is 14.
*
* ```html
* <igx-data-chart
* [dataSource]="data" >
* <igx-category-x-axis #xAxis
* label="label">
* </igx-category-x-axis>
* <igx-numeric-y-axis #yAxis>
* </igx-numeric-y-axis>
* <igx-williams-percent-r-indicator
* #series
* [xAxis]="xAxis"
* [yAxis]="yAxis"
* openMemberPath="open"
* highMemberPath="high"
* lowMemberPath="low"
* closeMemberPath="close"
* period="30">
* </igx-williams-percent-r-indicator>
* </igx-data-chart>
* ```
*
* ```ts
* this.series.period = 30;
* ```
*/
get period() {
return this.i.ac0;
}
set period(v) {
this.i.ac0 = +v;
}
}
IgxWilliamsPercentRIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxWilliamsPercentRIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
IgxWilliamsPercentRIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxWilliamsPercentRIndicatorComponent, selector: "igx-williams-percent-r-indicator", inputs: { period: "period" }, providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxWilliamsPercentRIndicatorComponent) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(() => IgxWilliamsPercentRIndicatorComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxWilliamsPercentRIndicatorComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxWilliamsPercentRIndicatorComponent) }], usesInheritance: true, ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
return IgxWilliamsPercentRIndicatorComponent;
})();
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxWilliamsPercentRIndicatorComponent, decorators: [{
type: Component,
args: [{
selector: 'igx-williams-percent-r-indicator',
template: ``,
providers: [{ provide: IgxStrategyBasedIndicatorComponent, useExisting: forwardRef(() => IgxWilliamsPercentRIndicatorComponent) }, { provide: IgxFinancialIndicatorComponent, useExisting: forwardRef(() => IgxWilliamsPercentRIndicatorComponent) }, { provide: IgxFinancialSeriesComponent, useExisting: forwardRef(() => IgxWilliamsPercentRIndicatorComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxWilliamsPercentRIndicatorComponent) }],
changeDetection: ChangeDetectionStrategy.OnPush
}]
}], ctorParameters: function () { return []; }, propDecorators: { period: [{
type: Input
}] } });