UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

95 lines (94 loc) 2.51 kB
import { IgrStrategyBasedIndicator } from "./igr-strategy-based-indicator"; import { MoneyFlowIndexIndicator } from "./MoneyFlowIndexIndicator"; /** * Represents a IgxDataChartComponent Money Flow Index indicator series. * Default required members: Close, Low, High, Volume * * Represents a Ignite UIDataChart Money Flow Index indicator series. * * Example: * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} > * * <IgrCategoryXAxis name="xAxis" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrMoneyFlowIndexIndicator * name="series1" * openMemberPath="open" * volumeMemberPath="Volume" * highMemberPath="High" * lowMemberPath="Low" * closeMemberPath="close"/> * </IgrDataChart> * ``` * * ```ts * this.series = new IgrrMoneyFlowIndexIndicator ({ name: "Series1" }); * this.series.dataSource = this.data; * this.series.xAxis = this.categoryXAxis; * this.series.yAxis = this.numericYAxis; * this.series.volumeMemberPath="Volume" ; * this.series.highMemberPath= "High" ; * this.series.lowMemberPath="Low" ; * this.series.closeMemberPath="close" * ``` */ export class IgrMoneyFlowIndexIndicator extends IgrStrategyBasedIndicator { createImplementation() { return new MoneyFlowIndexIndicator(); } /** * @hidden */ get i() { return this._implementation; } constructor(props) { super(props); } /** * Gets default display type for the current Financial Indicator */ get defaultDisplayType() { return this.i.aa7; } /** * Gets or sets the moving average period for the current MoneyFlowIndexIndicator object. * The typical, and initial, value for MoneyFlowIndexIndicator periods is 14. * * Gets or sets the moving average period for the current MoneyFlowIndexIndicator object. * * Example: * * ```ts * this.series.period = 14; * ``` * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} > * * <IgrCategoryXAxis name="xAxis" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrMoneyFlowIndexIndicator * name="series1" * openMemberPath="open" * volumeMemberPath="Volume" * highMemberPath="High" * lowMemberPath="Low" * closeMemberPath="close" * period="14"/> * </IgrDataChart> * ``` */ get period() { return this.i.acl; } set period(v) { this.i.acl = +v; } }