igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
100 lines (99 loc) • 4.1 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 } from "tslib";
import { TrendLineManagerBase$1 } from "./TrendLineManagerBase$1";
import { Number_$type, Point_$type, markType } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { TrendFitCalculator } from "./TrendFitCalculator";
import { TrendAverageCalculator } from "./TrendAverageCalculator";
import { PolarLinePlanner } from "./PolarLinePlanner";
import { isNaN_ } from "igniteui-angular-core";
/**
* @hidden
*/
var RadialTrendLineManager = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(RadialTrendLineManager, _super);
function RadialTrendLineManager() {
var _this = _super.call(this, Number_$type) || this;
_this.i = 0;
_this.h = 0;
_this.j = null;
_this.k = null;
return _this;
}
RadialTrendLineManager.prototype.get_g$a = function () {
return 3;
};
Object.defineProperty(RadialTrendLineManager.prototype, "g$a", {
get: function () {
return this.get_g$a();
},
enumerable: false,
configurable: true
});
RadialTrendLineManager.prototype.l = function (a, b, c, d, e, f, g, h) {
var i = g.f * g.e;
var j = g.g * g.e;
var k = new List$1(Point_$type, 0);
if (!g.j.isEmpty && !g.i.isEmpty) {
if (b == 0) {
this.a = null;
this.d.clear();
return;
}
if (this.c(b)) {
this.d.clear();
this.a = TrendFitCalculator.a(k, b, g, this.a, c.count, function (l) { return (l + 1); }, function (l) { return c.item(l); }, function (l) { return e(l - 1); }, f, i + 1, j + 1);
}
if (this.b(b)) {
this.a = null;
TrendAverageCalculator.b(b, this.d, c, d);
for (var l = g.f; l <= g.g; l += 1) {
var m = (l % c.count) * g.e;
if (m >= 0 && m < this.d.count) {
var n = e(m);
var o = f(this.d._inner[m]);
if (!isNaN_(n) && !isNaN_(o)) {
k.add({ $type: Point_$type, x: n + g.a, y: o });
}
}
}
}
if (k.count > 0) {
this.f(k, g, a, h);
}
}
};
RadialTrendLineManager.prototype.e = function (a, b, c) {
this.f(a, b, c, null);
};
RadialTrendLineManager.prototype.f = 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.j(a.item(f).x, a.item(f).y); };
$ret.p = function (f) { return _this.k(a.item(f).x, a.item(f).y); };
$ret.f = true;
$ret.ad = b.i;
$ret.ac = b.h;
$ret.ae = b.j;
return $ret;
})());
e.x(null, null);
};
RadialTrendLineManager.$t = markType(RadialTrendLineManager, 'RadialTrendLineManager', TrendLineManagerBase$1.$.specialize(Number_$type));
return RadialTrendLineManager;
}(TrendLineManagerBase$1));
export { RadialTrendLineManager };