UNPKG

igniteui-react-charts

Version:

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

40 lines (39 loc) 1.89 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends } from "tslib"; import { FinancialBucketCalculator } from "./FinancialBucketCalculator"; import { markType } from "igniteui-react-core"; /** * @hidden */ var FinancialPriceBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(FinancialPriceBucketCalculator, _super); function FinancialPriceBucketCalculator(a) { return _super.call(this, a) || this; } FinancialPriceBucketCalculator.prototype.getBucket = function (a) { var b = a * this.b; var c = Math.min(b + this.b - 1, this.a.cf.dp.count - 1); if (b <= c && b >= 0 && c >= 0) { var d = this.a.cf.yd.item(b); var e = Number.NEGATIVE_INFINITY; var f = Number.POSITIVE_INFINITY; var g = this.a.cf.ya.item(c); for (var h = b; h <= c; ++h) { e = Math.max(e, this.a.cf.yb.item(h)); f = Math.min(f, this.a.cf.yc.item(h)); } f = Math.min(d, f); e = Math.max(g, e); return [0.5 * (b + c), d, e, f, g]; } return [NaN, NaN, NaN, NaN, NaN]; }; FinancialPriceBucketCalculator.$t = markType(FinancialPriceBucketCalculator, 'FinancialPriceBucketCalculator', FinancialBucketCalculator.$); return FinancialPriceBucketCalculator; }(FinancialBucketCalculator)); export { FinancialPriceBucketCalculator };