igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
52 lines (51 loc) • 2.36 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 { CategoryTrendLineManagerBase } from "./CategoryTrendLineManagerBase";
import { List$1 } from "igniteui-react-core";
import { Point_$type, markType } from "igniteui-react-core";
import { TrendFitCalculator } from "./TrendFitCalculator";
import { TrendAverageCalculator } from "./TrendAverageCalculator";
/**
* @hidden
*/
var CategoryTrendLineManager = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(CategoryTrendLineManager, _super);
function CategoryTrendLineManager() {
return _super !== null && _super.apply(this, arguments) || this;
}
CategoryTrendLineManager.prototype.prepareLineCore = function (a, b, c, d, e, f, g) {
var h = g.f * g.e;
var i = g.g * g.e;
var j = new List$1(Point_$type, 0);
if (b == 0) {
this.a = null;
this.i.clear();
return;
}
if (this.d(b)) {
this.i.clear();
this.a = TrendFitCalculator.a(j, b, g, this.a, c.count, function (k) { return (k + 1); }, function (k) { return c.item(k); }, function (k) { return e(k - 1); }, f, h + 1, i + 1);
}
if (this.c(b)) {
this.a = null;
TrendAverageCalculator.b(b, this.i, c, d);
for (var k = g.f; k <= g.g; k += 1) {
var l = k * g.e;
if (l >= 0 && l < this.i.count) {
var m = e(l);
var n = f(this.i._inner[l]);
j.add({ $type: Point_$type, x: m + g.a, y: n });
}
}
}
this.f(j, g, a);
};
CategoryTrendLineManager.$t = markType(CategoryTrendLineManager, 'CategoryTrendLineManager', CategoryTrendLineManagerBase.$);
return CategoryTrendLineManager;
}(CategoryTrendLineManagerBase));
export { CategoryTrendLineManager };