UNPKG

igniteui-react-charts

Version:

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

80 lines (79 loc) 2.27 kB
import { IgrStrategyBasedIndicator } from "./igr-strategy-based-indicator"; import { ChaikinVolatilityIndicator } from "./ChaikinVolatilityIndicator"; /** * Represents a IgxDataChartComponent Chaikin Volatility indicator series. * The ChaikinVolatility indicator attempts to show volatility by displaying the spread between * the high and low values. * Default required members: High, Low * * `ChaikinVolatilityIndicator` class specify the series as Chaikin Volitility Indicator series. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} > * * <IgrCategoryXAxis name="xAxis" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrChaikinVolatilityIndicator * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * openMemberPath="open" * highMemberPath="high" * lowMemberPath="low" * closeMemberPath="close" * volumeMemberPath="volume" /> * </IgrDataChart> * ``` */ export class IgrChaikinVolatilityIndicator extends IgrStrategyBasedIndicator { createImplementation() { return new ChaikinVolatilityIndicator(); } /** * @hidden */ get i() { return this._implementation; } constructor(props) { super(props); } /** * Gets or sets the moving average period for the current ChaikinVolatilityIndicator object. * The typical, and initial, value for ChaikinVolatilityIndicator periods is 10. * * Set the `Period` property if you wish to change the moving average period for the indicator. * * ```ts * this.series.longPeriod = 30; * ``` * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} > * * <IgrCategoryXAxis name="xAxis" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrChaikinVolatilityIndicator * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * openMemberPath="open" * highMemberPath="high" * lowMemberPath="low" * closeMemberPath="close" * volumeMemberPath="volume" * period={30} /> * </IgrDataChart> * ``` */ get period() { return this.i.acr; } set period(v) { this.i.acr = +v; } }