igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
88 lines (87 loc) • 3.49 kB
JavaScript
/*
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 { List$1 } from "igniteui-react-core";
import { Point_$type, fromEnum, markType } from "igniteui-react-core";
import { TrendFitCalculator } from "./TrendFitCalculator";
import { TrendAverageCalculator } from "./TrendAverageCalculator";
import { isNaN_ } from "igniteui-react-core";
/**
* @hidden
*/
var ScatterTrendLineManager = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ScatterTrendLineManager, _super);
function ScatterTrendLineManager() {
return _super !== null && _super.apply(this, arguments) || this;
}
ScatterTrendLineManager.prototype.get_g$a = function () {
return 4;
};
Object.defineProperty(ScatterTrendLineManager.prototype, "g$a", {
get: function () {
return this.get_g$a();
},
enumerable: false,
configurable: true
});
ScatterTrendLineManager.prototype.j = 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);
var o = 0;
if (c != null) {
o = c.count;
}
if (d != null) {
o = Math.min(o, d.count);
}
if (!h.j.isEmpty && !h.i.isEmpty) {
if (b == 0) {
this.a = null;
this.i.clear();
}
else if (this.d(b)) {
this.i.clear();
this.a = TrendFitCalculator.a(n, b, h, this.a, o, function (p) { return c.item(p); }, function (p) { return d.item(p); }, f, g, l, m);
}
else if (this.c(b)) {
this.a = null;
this.i.clear();
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 p = _c.value;
var q = f(p.x);
var r = g(p.y);
if (!isNaN_(q) && !isNaN_(r)) {
n.add({ $type: Point_$type, x: q, y: r });
}
}
}
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;
}
}
}
this.g(n, h, a, i);
}
};
ScatterTrendLineManager.$t = markType(ScatterTrendLineManager, 'ScatterTrendLineManager', PointTrendLineManagerBase.$);
return ScatterTrendLineManager;
}(PointTrendLineManagerBase));
export { ScatterTrendLineManager };