UNPKG

igniteui-react-charts

Version:

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

57 lines (56 loc) 2.24 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 { IndicatorCalculationStrategy } from "./IndicatorCalculationStrategy"; import { String_$type, Number_$type, markType, getEnumerator } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; /** * @hidden */ export let MassIndexIndicatorStrategy = /*@__PURE__*/ (() => { class MassIndexIndicatorStrategy extends IndicatorCalculationStrategy { b(a, b) { let c = new List$1(String_$type, 0); c.add("HighColumn"); c.add("LowColumn"); c.o(b.a.c); return c; } c(a, b) { let c = new List$1(Number_$type, 0); for (let d = 0; d < (Math.min(a.count, b.count)); d++) { c.add(a.item(d) - b.item(d)); } return c; } a(a, b) { let c = 9; let d = a.highColumn; let e = a.lowColumn; let f = a.indicatorColumn; let g = getEnumerator(b.a.b(this.c(d, e), c)); let h = getEnumerator(b.a.b(b.a.b(this.c(d, e), c), c)); let i = new Array(c); for (let j = 0; j < c; j++) { i[j] = 0; } let k = 0; for (let l = 0; l < f.count; l++) { let m = l % c; k -= i[m]; g.moveNext(); h.moveNext(); let n = b.i(g.current / h.current); k += n; f.item(l, k); i[m] = n; } return true; } } MassIndexIndicatorStrategy.$t = /*@__PURE__*/ markType(MassIndexIndicatorStrategy, 'MassIndexIndicatorStrategy', IndicatorCalculationStrategy.$); return MassIndexIndicatorStrategy; })();