UNPKG

igniteui-react-charts

Version:

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

188 lines (187 loc) 5.98 kB
import { __extends } from "tslib"; import { IgrFinancialOverlay } from "./igr-financial-overlay"; import { BollingerBandsOverlay } from "./BollingerBandsOverlay"; import { toPoint } from "igniteui-react-core"; /** * Represents a IgxDataChartComponent Bollinger Bands financial overlay series. * Default required members: High, Low, Close * * You can use the `BollingerBandsOverlay` class represents a IgxDataChartComponent Bollinger Bands financial overlay series. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * * * <IgrCategoryXAxis name="xAxis" label="Date" /> * <IgrNumericYAxis name="yAxis" /> * * * <IgrFinancialPriceSeries * name="series2" * xAxisName="xAxis" * yAxisName="yAxis" * displayType="Candlestick" * lowMemberPath="Low" * highMemberPath="High" * openMemberPath="Open" * closeMemberPath="Close" * volumeMemberPath="Volume" /> * * <IgrBollingerBandsOverlay * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * lowMemberPath="Low" * highMemberPath="High" * openMemberPath="Open" * closeMemberPath="Close" * volumeMemberPath="Volume" /> * </IgrDataChart> * ``` * * ```ts * const s = new IgrBollingerBandsOverlay({ name: "", xAxisName: "" }); * ``` */ var IgrBollingerBandsOverlay = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrBollingerBandsOverlay, _super); function IgrBollingerBandsOverlay(props) { return _super.call(this, props) || this; } IgrBollingerBandsOverlay.prototype.createImplementation = function () { return new BollingerBandsOverlay(); }; Object.defineProperty(IgrBollingerBandsOverlay.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrBollingerBandsOverlay.prototype, "period", { /** * Gets or sets the moving average period for the current BollingerBandOverlay object. * The typical, and initial, value for Bollinger band periods is 14. * * You can use the `period` property for moving average of the current BollingerBandOverlay object. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * * * <IgrCategoryXAxis name="xAxis" label="Date" /> * <IgrNumericYAxis name="yAxis" /> * * * <IgrFinancialPriceSeries * name="series2" * xAxisName="xAxis" * yAxisName="yAxis" * displayType="Candlestick" * lowMemberPath="Low" * highMemberPath="High" * openMemberPath="Open" * closeMemberPath="Close" * volumeMemberPath="Volume" /> * * <IgrBollingerBandsOverlay * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * lowMemberPath="Low" * highMemberPath="High" * openMemberPath="Open" * closeMemberPath="Close" * volumeMemberPath="Volume" * period={7} /> * </IgrDataChart> * ``` * * ```ts * this.series.period = 7; * ``` */ get: function () { return this.i.abm; }, set: function (v) { this.i.abm = +v; }, enumerable: false, configurable: true }); Object.defineProperty(IgrBollingerBandsOverlay.prototype, "multiplier", { /** * Gets or sets the moving average period for the current BollingerBandOverlay object. * The typical, and initial, value for Bollinger band multipliers is 2. * * You can use the `BollingerBandsOverlay` * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * * * <IgrCategoryXAxis name="xAxis" label="Date" /> * <IgrNumericYAxis name="yAxis" /> * * * <IgrFinancialPriceSeries * name="series2" * xAxisName="xAxis" * yAxisName="yAxis" * displayType="Candlestick" * lowMemberPath="Low" * highMemberPath="High" * openMemberPath="Open" * closeMemberPath="Close" * volumeMemberPath="Volume" /> * * <IgrBollingerBandsOverlay * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * lowMemberPath="Low" * highMemberPath="High" * openMemberPath="Open" * closeMemberPath="Close" * volumeMemberPath="Volume" * multiplier= {2} /> * </IgrDataChart> * ``` */ get: function () { return this.i.abl; }, set: function (v) { this.i.abl = +v; }, enumerable: false, configurable: true }); IgrBollingerBandsOverlay.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) { var iv = this.i.i8(toPoint(world), useInterpolation, skipUnknowns); return (iv); }; IgrBollingerBandsOverlay.prototype.getPreviousOrExactIndex = function (world, skipUnknowns) { var iv = this.i.ke(toPoint(world), skipUnknowns); return (iv); }; IgrBollingerBandsOverlay.prototype.getNextOrExactIndex = function (world, skipUnknowns) { var iv = this.i.kc(toPoint(world), skipUnknowns); return (iv); }; return IgrBollingerBandsOverlay; }(IgrFinancialOverlay)); export { IgrBollingerBandsOverlay };