igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
79 lines (78 loc) • 2.22 kB
JavaScript
import { IgrStrategyBasedIndicator } from "./igr-strategy-based-indicator";
import { DetrendedPriceOscillatorIndicator } from "./DetrendedPriceOscillatorIndicator";
/**
* Represents a IgxDataChartComponent Detrended Price Oscillator indicator series.
* Default required members: Close
*
* The `DetrendedPriceOscillatorIndicator` class represents a IgxDataChartComponent Detrended Price Oscillator indicator series.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
* <IgrCategoryXAxis name="xAxis" label="Year" />
* <IgrNumericYAxis name="yAxis" />
*
* <IgrDetrendedPriceOscillatorIndicator
* name="series1"
* xAxisName="xAxis"
* yAxisName="yAxis"
* openMemberPath="Open"
* highMemberPath="High"
* lowMemberPath="Low"
* period= {30} />
* </IgrDataChart>
* ```
*/
export class IgrDetrendedPriceOscillatorIndicator extends IgrStrategyBasedIndicator {
createImplementation() {
return new DetrendedPriceOscillatorIndicator();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
/**
* Gets or sets the moving average period for the current DetrendedPriceOscillatorIndicator object.
* The typical, and initial, value for DPO periods is 20.
*
* You can use the `period` to set the current moving average period.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
* <IgrCategoryXAxis name="xAxis" label="Year" />
* <IgrNumericYAxis name="yAxis" />
*
* <IgrDetrendedPriceOscillatorIndicator
* name="series1"
* xAxisName="xAxis"
* yAxisName="yAxis"
* openMemberPath="Open"
* highMemberPath="High"
* lowMemberPath="Low"
* period=30 />
* </IgrDataChart>
* ```
*
* ```ts
* this.series.period = 30;
* ```
*/
get period() {
return this.i.acr;
}
set period(v) {
this.i.acr = +v;
}
}