UNPKG

igniteui-react-charts

Version:

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

117 lines (116 loc) 3.82 kB
import { __extends } from "tslib"; import { IgrFinancialOverlay } from "./igr-financial-overlay"; import { PriceChannelOverlay } from "./PriceChannelOverlay"; import { toPoint } from "igniteui-react-core"; /** * Represents a IgxDataChartComponent Financial Price Channel Overlay series. * Default required members: High, Low * * You can use the `PriceChannelOverlay` to display price volatility. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * * <IgrCategoryXAxis name="xAxis" label="Date" /> * <IgrNumericYAxis name="yAxis" /> * <IgrPriceChannelOverlay * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * lowMemberPath="Low" * highMemberPath="High" * openMemberPath="Open" * closeMemberPath="Close" * volumeMemberPath="Volume" /> * </IgrDataChart> * ``` * * ```ts * let series = new IgrPriceChannelOverlay({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 IgrPriceChannelOverlay = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrPriceChannelOverlay, _super); function IgrPriceChannelOverlay(props) { return _super.call(this, props) || this; } IgrPriceChannelOverlay.prototype.createImplementation = function () { return new PriceChannelOverlay(); }; Object.defineProperty(IgrPriceChannelOverlay.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); Object.defineProperty(IgrPriceChannelOverlay.prototype, "period", { /** * Gets or sets the moving average period for the current PriceChannelOverlay object. * The typical, and initial, value for Bollinger band periods is 14. * * You can use the `Period` to set the moving average. * * ```ts * this.series.period = 14; * ``` * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * * <IgrCategoryXAxis name="xAxis" label="Date" /> * <IgrNumericYAxis name="yAxis" /> * <IgrPriceChannelOverlay * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * lowMemberPath="Low" * highMemberPath="High" * openMemberPath="Open" * closeMemberPath="Close" * volumeMemberPath="Volume" * period = {14} /> * </IgrDataChart> * ``` */ get: function () { return this.i.abd; }, set: function (v) { this.i.abd = +v; }, enumerable: false, configurable: true }); IgrPriceChannelOverlay.prototype.getSeriesValue = function (world, useInterpolation, skipUnknowns) { var iv = this.i.i6(toPoint(world), useInterpolation, skipUnknowns); return (iv); }; IgrPriceChannelOverlay.prototype.getNextOrExactIndex = function (world, skipUnknowns) { var iv = this.i.j9(toPoint(world), skipUnknowns); return (iv); }; IgrPriceChannelOverlay.prototype.getPreviousOrExactIndex = function (world, skipUnknowns) { var iv = this.i.kb(toPoint(world), skipUnknowns); return (iv); }; return IgrPriceChannelOverlay; }(IgrFinancialOverlay)); export { IgrPriceChannelOverlay };