UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

39 lines (38 loc) 1.81 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-angular-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.b2.dn.count - 1); if (b <= c && b >= 0 && c >= 0) { let d = this.a.b2.x1.item(b); let e = Number.NEGATIVE_INFINITY; let f = Number.POSITIVE_INFINITY; let g = this.a.b2.xy.item(c); for (let h = b; h <= c; ++h) { e = Math.max(e, this.a.b2.xz.item(h)); f = Math.min(f, this.a.b2.x0.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; })();