igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
48 lines (47 loc) • 2.21 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 { CategoryTrendLineManagerBase } from "./CategoryTrendLineManagerBase";
import { List$1 } from "igniteui-angular-core";
import { Point_$type, markType } from "igniteui-angular-core";
import { TrendFitCalculator } from "./TrendFitCalculator";
import { TrendAverageCalculator } from "./TrendAverageCalculator";
/**
* @hidden
*/
export let CategoryTrendLineManager = /*@__PURE__*/ (() => {
class CategoryTrendLineManager extends CategoryTrendLineManagerBase {
prepareLineCore(a, b, c, d, e, f, g) {
let h = g.f * g.e;
let i = g.g * g.e;
let j = new List$1(Point_$type, 0);
if (b == 0) {
this.a = null;
this.d.clear();
return;
}
if (this.c(b)) {
this.d.clear();
this.a = TrendFitCalculator.a(j, b, g, this.a, c.count, (k) => (k + 1), (k) => c.item(k), (k) => e(k - 1), f, h + 1, i + 1);
}
if (this.b(b)) {
this.a = null;
TrendAverageCalculator.b(b, this.d, c, d);
for (let k = g.f; k <= g.g; k += 1) {
let l = k * g.e;
if (l >= 0 && l < this.d.count) {
let m = e(l);
let n = f(this.d._inner[l]);
j.add({ $type: Point_$type, x: m + g.a, y: n });
}
}
}
this.e(j, g, a);
}
}
CategoryTrendLineManager.$t = markType(CategoryTrendLineManager, 'CategoryTrendLineManager', CategoryTrendLineManagerBase.$);
return CategoryTrendLineManager;
})();