igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
142 lines (141 loc) • 4.78 kB
JavaScript
import { __extends } from "tslib";
import { IgrStrategyBasedIndicator } from "./igr-strategy-based-indicator";
import { PercentagePriceOscillatorIndicator } from "./PercentagePriceOscillatorIndicator";
/**
* Represents a IgxDataChartComponent percentage price oscillator series.
* Default required members: High, Low, Volume
*
* You can use the `PercentagePriceOscillatorIndicator` to show the difference between two moving averages.
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
* <IgrCategoryXAxis name="xAxis" label="Date" />
* <IgrNumericYAxis name="yAxis" />
* <IgrPercentagePriceOscillatorIndicator
* name="series"
* xAxisName="xAxis"
* yAxisName="yAxis"
* lowMemberPath="Low"
* highMemberPath="High"
* openMemberPath="Open"
* closeMemberPath="Close"/>
* </IgrDataChart>
* ```
*
* ```ts
* let series = new IgrPercentagePriceOscillatorIndicator({name:"series1"});
* series.xAxisName = this.xAxis;
* series.yAxisName = this.yAxis;
* series.xAxis = this.categoryXAxis;
* series.yAxis = this.numericYAxis;
* series.openMemberPath = "open";
* series.highMemberPath = "high";
* series.lowMemberPath = "low";
* series.closeMemberPath = "close";
* ```
*/
var IgrPercentagePriceOscillatorIndicator = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(IgrPercentagePriceOscillatorIndicator, _super);
function IgrPercentagePriceOscillatorIndicator(props) {
return _super.call(this, props) || this;
}
IgrPercentagePriceOscillatorIndicator.prototype.createImplementation = function () {
return new PercentagePriceOscillatorIndicator();
};
Object.defineProperty(IgrPercentagePriceOscillatorIndicator.prototype, "i", {
/**
* @hidden
*/
get: function () {
return this._implementation;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPercentagePriceOscillatorIndicator.prototype, "shortPeriod", {
/**
* Gets or sets the short moving average period for the current PercentagePriceOscillatorIndicator object.
* The typical, and initial, value for short PPO periods is 10.
*
* You can use the `ShortPeriod` to set the short moving average period.
*
* ```ts
* this.series.shortPeriod = 10;
* ```
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
* <IgrCategoryXAxis name="xAxis" label="Date" />
* <IgrNumericYAxis name="yAxis" />
* <IgrPercentagePriceOscillatorIndicator
* name="series"
* xAxisName="xAxis"
* yAxisName="yAxis"
* lowMemberPath="Low"
* highMemberPath="High"
* openMemberPath="Open"
* closeMemberPath="Close"
* shortPeriod = {10}/>
* </IgrDataChart>
* ```
*/
get: function () {
return this.i.shortPeriod;
},
set: function (v) {
this.i.shortPeriod = +v;
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgrPercentagePriceOscillatorIndicator.prototype, "longPeriod", {
/**
* Gets or sets the long moving average period for the current PercentagePriceOscillatorIndicator object.
* The typical, and initial, value for long PVO periods is 30.
*
* You can use the `LongPeriod` to set the long moving average period.
*
* ```ts
* this.series.longPeriod = 30;
* ```
*
* ```ts
* <IgrDataChart
* dataSource={this.state.dataSource}
* width="700px"
* height="500px">
*
* <IgrCategoryXAxis name="xAxis" label="Date" />
* <IgrNumericYAxis name="yAxis" />
* <IgrPercentagePriceOscillatorIndicator
* name="series"
* xAxisName="xAxis"
* yAxisName="yAxis"
* lowMemberPath="Low"
* highMemberPath="High"
* openMemberPath="Open"
* closeMemberPath="Close"
* longPeriod = {30} />
* </IgrDataChart>
* ```
*/
get: function () {
return this.i.longPeriod;
},
set: function (v) {
this.i.longPeriod = +v;
},
enumerable: false,
configurable: true
});
return IgrPercentagePriceOscillatorIndicator;
}(IgrStrategyBasedIndicator));
export { IgrPercentagePriceOscillatorIndicator };