igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
184 lines (183 loc) • 5.33 kB
JavaScript
import { IgrStrategyBasedIndicator } from "./igr-strategy-based-indicator";
import { FullStochasticOscillatorIndicator } from "./FullStochasticOscillatorIndicator";
/**
* Represents a IgxDataChartComponent Full Stochastic Oscillator indicator series.
* Default required members: High, Low, Close
*
* The `FullStochasticOscillatorIndicator` class represents a IgxDataChartComponent Full Stochastic Oscillator indicator series.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
*
* <IgrCategoryXAxis name="xAxis" label="Date" />
* <IgrNumericYAxis name="yAxis" />
*
*
* <IgrFullStochasticOscillatorIndicator
* name="series2"
* xAxisName="xAxis"
* yAxisName="yAxis"
* displayType="Candlestick"
* lowMemberPath="Low"
* highMemberPath="High"
* openMemberPath="Open"
* closeMemberPath="Close"
* volumeMemberPath="Volume" />
* </IgrDataChart>
* ```
*
* ```ts
* this.series = new IgrFullStochasticOscillatorIndicator({name: "series"});
* this.series.dataSource = this.financialData;
* this.series.xAxis = this.timeXAxis;
* this.series.yAxis = this.numericYAxis;
* this.series.xAxisName = "timeXAxis";
* this.series.yAxisName = "numericYAxis";
* this.series.highMemberPath="High"
* this.series.lowMemberPath="Low"
* this.series.closeMemberPath="Close"
* this.series.openMemberPath="Open"
* this.series.volumeMemberPath="Volume"
* ```
*/
export class IgrFullStochasticOscillatorIndicator extends IgrStrategyBasedIndicator {
createImplementation() {
return new FullStochasticOscillatorIndicator();
}
/**
* @hidden
*/
get i() {
return this._implementation;
}
constructor(props) {
super(props);
}
/**
* Gets or sets the moving average period for the current FullStochasticOscillatorIndicator object.
* The typical, and initial, value for FullStochasticOscillatorIndicator periods is 14.
*
* You can use the `period` property for the moving average period of the current FullStochasticOscillatorIndicator object.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
*
* <IgrCategoryXAxis name="xAxis" label="Date" />
* <IgrNumericYAxis name="yAxis" />
*
*
* <IgrFullStochasticOscillatorIndicator
* name="series2"
* xAxisName="xAxis"
* yAxisName="yAxis"
* displayType="Candlestick"
* lowMemberPath="Low"
* highMemberPath="High"
* openMemberPath="Open"
* closeMemberPath="Close"
* volumeMemberPath="Volume"
* period={30} />
* </IgrDataChart>
* ```
*
* ```ts
* this.series.period = 30;
* ```
*/
get period() {
return this.i.acl;
}
set period(v) {
this.i.acl = +v;
}
/**
* Gets or sets the moving average SmoothingPeriod for the current FullStochasticOscillatorIndicator object.
* The typical, and initial, value for FullStochasticOscillatorIndicator SmoothingPeriod is 3.
*
* The `SmoothingPeriod` property to fets/sets the moving average SmoothingPeriod for the current FullStochasticOscillatorIndicator object.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
*
* <IgrCategoryXAxis name="xAxis" label="Date" />
* <IgrNumericYAxis name="yAxis" />
*
*
* <IgrFullStochasticOscillatorIndicator
* name="series2"
* xAxisName="xAxis"
* yAxisName="yAxis"
* displayType="Candlestick"
* lowMemberPath="Low"
* highMemberPath="High"
* openMemberPath="Open"
* closeMemberPath="Close"
* volumeMemberPath="Volume"
* smoothingPeriod={30} />
* </IgrDataChart>
* ```
*
* ```ts
* series.smoothingPeriod=30;
* ```
*/
get smoothingPeriod() {
return this.i.smoothingPeriod;
}
set smoothingPeriod(v) {
this.i.smoothingPeriod = +v;
}
/**
* Gets or sets the moving average TriggerPeriod for the current FullStochasticOscillatorIndicator object.
* The typical, and initial, value for FullStochasticOscillatorIndicator TriggerPeriod is 3.
*
* 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="Date" />
* <IgrNumericYAxis name="yAxis" />
*
*
* <IgrFullStochasticOscillatorIndicator
* name="series2"
* xAxisName="xAxis"
* yAxisName="yAxis"
* displayType="Candlestick"
* lowMemberPath="Low"
* highMemberPath="High"
* openMemberPath="Open"
* closeMemberPath="Close"
* volumeMemberPath="Volume"
* triggerPeriod={30} />
* </IgrDataChart>
* ```
*
* ```ts
* this.series.triggerPeriod = 30;
* ```
*/
get triggerPeriod() {
return this.i.acn;
}
set triggerPeriod(v) {
this.i.acn = +v;
}
}