UNPKG

igniteui-react-charts

Version:

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

39 lines (38 loc) 1.79 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 { FinancialBucketCalculator } from "./FinancialBucketCalculator"; import { markType } from "igniteui-react-core"; /** * @hidden */ export let FinancialPriceBucketCalculator = /*@__PURE__*/ (() => { class FinancialPriceBucketCalculator extends FinancialBucketCalculator { constructor(a) { super(a); } getBucket(a) { let b = a * this.b; let c = Math.min(b + this.b - 1, this.a.cf.dp.count - 1); if (b <= c && b >= 0 && c >= 0) { let d = this.a.cf.yd.item(b); let e = Number.NEGATIVE_INFINITY; let f = Number.POSITIVE_INFINITY; let g = this.a.cf.ya.item(c); for (let 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 = /*@__PURE__*/ markType(FinancialPriceBucketCalculator, 'FinancialPriceBucketCalculator', FinancialBucketCalculator.$); return FinancialPriceBucketCalculator; })();