UNPKG

igniteui-react-charts

Version:

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

123 lines (122 loc) 4.6 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, __values } from "tslib"; import { PointTrendLineManagerBase } from "./PointTrendLineManagerBase"; import { Point_$type, fromEnum, markType } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { TrendFitCalculator } from "./TrendFitCalculator"; import { TrendAverageCalculator } from "./TrendAverageCalculator"; import { PolarLinePlanner } from "./PolarLinePlanner"; import { isNaN_ } from "igniteui-react-core"; /** * @hidden */ var PolarTrendLineManager = /** @class */ /*@__PURE__*/ (function (_super) { __extends(PolarTrendLineManager, _super); function PolarTrendLineManager() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.k = false; _this.j = 0; _this.m = 0; _this.l = 0; _this.n = null; _this.o = null; return _this; } PolarTrendLineManager.prototype.get_g$a = function () { return 2; }; Object.defineProperty(PolarTrendLineManager.prototype, "g$a", { get: function () { return this.get_g$a(); }, enumerable: false, configurable: true }); PolarTrendLineManager.prototype.p = function (a, b, c, d, e, f, g, h, i, j, k) { var e_1, _a; var l = j; var m = k; var n = new List$1(Point_$type, 0); if (!h.j.isEmpty && !h.i.isEmpty) { var o_1 = c; var p_1 = d; var q = 0; if (o_1 != null) { q = o_1.count; } if (p_1 != null) { q = Math.min(q, p_1.count); } if (b == 0) { this.a = null; this.i.clear(); return; } if (this.d(b)) { this.i.clear(); this.a = TrendFitCalculator.a(n, b, h, this.a, q, function (r) { return o_1.item(r); }, function (r) { return p_1.item(r); }, f, g, l, m); } if (this.c(b)) { this.a = null; TrendAverageCalculator.c(b, this.i, c, d, e); try { for (var _b = __values(fromEnum(this.i)), _c = _b.next(); !_c.done; _c = _b.next()) { var r = _c.value; var s = f(r.x); var t = g(r.y); if (!isNaN_(s) && !isNaN_(t)) { n.add({ $type: Point_$type, x: s, y: t }); } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } } if (n.count > 0) { this.g(n, h, a, i); } } }; PolarTrendLineManager.prototype.g = function (a, b, c, d) { var _this = this; if (d != null) { d.i = c; } var e = ((function () { var $ret = new PolarLinePlanner(); $ret.m = function (f) { return a.item(f).x; }; $ret.n = function (f) { return a.item(f).y; }; $ret.a = d; $ret.q = a.count; $ret.l = b.d; $ret.o = function (f) { return _this.n(a.item(f).x, a.item(f).y); }; $ret.p = function (f) { return _this.o(a.item(f).x, a.item(f).y); }; $ret.f = _this.k; $ret.b = _this.j; $ret.ad = b.i; $ret.ac = b.h; $ret.ae = b.j; return $ret; })()); e.x(null, null); }; PolarTrendLineManager.$t = markType(PolarTrendLineManager, 'PolarTrendLineManager', PointTrendLineManagerBase.$); return PolarTrendLineManager; }(PointTrendLineManagerBase)); export { PolarTrendLineManager };