UNPKG

igniteui-angular-charts

Version:

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

96 lines (95 loc) 3.67 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 { Base, Point_$type, markType } from "igniteui-angular-core"; import { LeastSquaresFit } from "igniteui-angular-core"; import { NotImplementedException } from "igniteui-angular-core"; import { isNaN_, isInfinity } from "igniteui-angular-core"; /** * @hidden */ var BarTrendFitCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(BarTrendFitCalculator, _super); function BarTrendFitCalculator() { return _super !== null && _super.apply(this, arguments) || this; } BarTrendFitCalculator.a = function (a, b, c, d, e, f, g, h, i, j, k) { if (d == null) { switch (b) { case 1: d = LeastSquaresFit.k(e, g, f); break; case 2: d = LeastSquaresFit.o(e, g, f); break; case 3: d = LeastSquaresFit.i(e, g, f); break; case 4: d = LeastSquaresFit.p(e, g, f); break; case 5: d = LeastSquaresFit.q(e, g, f); break; case 7: d = LeastSquaresFit.j(e, g, f); break; case 6: d = LeastSquaresFit.l(e, g, f); break; case 8: d = LeastSquaresFit.n(e, g, f); break; default: throw new NotImplementedException(0); } } if (d == null) { return null; } for (var l = 0; l < c.i.height; l += 2) { var m = l / (c.i.height - 1); var n = j + m * (k - j); var o = NaN; switch (b) { case 1: o = LeastSquaresFit.ad(d, n); break; case 2: o = LeastSquaresFit.ah(d, n); break; case 3: o = LeastSquaresFit.ab(d, n); break; case 4: o = LeastSquaresFit.ai(d, n); break; case 5: o = LeastSquaresFit.aj(d, n); break; case 7: o = LeastSquaresFit.ac(d, n); break; case 6: o = LeastSquaresFit.ae(d, n); break; case 8: o = LeastSquaresFit.ag(d, n); break; default: throw new NotImplementedException(0); } o = h(o); n = i(n); if (!isNaN_(o) && !isInfinity(o)) { a.add({ $type: Point_$type, x: o, y: n + c.a }); } } return d; }; BarTrendFitCalculator.$t = markType(BarTrendFitCalculator, 'BarTrendFitCalculator'); return BarTrendFitCalculator; }(Base)); export { BarTrendFitCalculator };