UNPKG

igniteui-react-charts

Version:

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

65 lines (64 loc) 2.35 kB
import { __extends } from "tslib"; import { IgrItemwiseStrategyBasedIndicator } from "./igr-itemwise-strategy-based-indicator"; import { WeightedCloseIndicator } from "./WeightedCloseIndicator"; /** * Represents a IgxDataChartComponent Weigted Close indicator series. * The weighted close indicator shows an average of the high low and close * for a day but with the closing price counted twice in the average. * Default required members: High, Low, Close * * The `WeightedCloseIndicator` is similar to the `TypicalPriceIndicator` in that it represents an average of the high price, low price, and closing price for a day. * However, with the `WeightedCloseIndicator`, more emphasis is placed on the closing price and it is included twice when calculating the arithmetic average. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * * <IgrCategoryXAxis name="xAxis" label="Year" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrWeightedCloseIndicator * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * openMemberPath="Open" * closeMemberPath="close" * highMemberPath="High" * lowMemberPath="Low" /> * </IgrDataChart> * ``` * * ```ts * let series = new IgrWeightedCloseIndicator({name:"series"}); * series.xAxis = this.xAxis; * series.yAxis = this.yAxis; * series.openMemberPath = "open"; * series.highMemberPath = "high"; * series.lowMemberPath = "low"; * series.closeMemberPath = "close"; * this.chart.series.add(series); * ``` */ var IgrWeightedCloseIndicator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(IgrWeightedCloseIndicator, _super); function IgrWeightedCloseIndicator(props) { return _super.call(this, props) || this; } IgrWeightedCloseIndicator.prototype.createImplementation = function () { return new WeightedCloseIndicator(); }; Object.defineProperty(IgrWeightedCloseIndicator.prototype, "i", { /** * @hidden */ get: function () { return this._implementation; }, enumerable: false, configurable: true }); return IgrWeightedCloseIndicator; }(IgrItemwiseStrategyBasedIndicator)); export { IgrWeightedCloseIndicator };