igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
257 lines (256 loc) • 9.47 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 { Frame } from "./Frame";
import { Rect } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { Array_$type, Number_$type, Point_$type, typeCast, markType } from "igniteui-angular-core";
/**
* @hidden
*/
export let CategoryFrame = /*@__PURE__*/ (() => {
class CategoryFrame extends Frame {
constructor(a) {
super();
this.aa = null;
this.f = new List$1(Array_$type, 0);
this.m = null;
this.k = new List$1(Number_$type, 0);
this.l = new List$1(Number_$type, 0);
this.n = new List$1(Point_$type, 0);
this.o = new List$1(Number_$type, 0);
this.q = new List$1(Point_$type, 0);
this.r = new List$1(Number_$type, 0);
this.i = new List$1(Point_$type, 0);
this.j = new List$1(Number_$type, 0);
this.h = new List$1(Number_$type, 0);
this.g = new List$1(Number_$type, 0);
this.p = new List$1(Number_$type, 0);
this.u = 0;
this.t = 0;
this.ab = null;
this.aa = new Rect(0, 0, 0, 1, 1);
this.t = a;
this.x();
}
c(a, b, c) {
this.x();
let d = typeCast(CategoryFrame.$, b);
let e = typeCast(CategoryFrame.$, c);
let f = d.f.count;
let g = e.f.count;
let h = Math.max(f, g);
let i = Math.max(d.n.count, e.n.count);
let j = Math.max(d.q.count, e.q.count);
let k = Math.max(d.k.count, e.k.count);
let l = Math.max(d.i.count, e.i.count);
let m = d.p.count > 0;
if (m) {
this.y(this.p, a, d.p, e.p, h);
}
let n = d.o.count > 0;
if (n) {
this.y(this.o, a, d.o, e.o, i);
}
let o = d.r.count > 0;
if (o) {
this.y(this.r, a, d.r, e.r, j);
}
let p = d.l.count > 0;
if (p) {
this.y(this.l, a, d.l, e.l, k);
}
let q = d.j.count > 0;
if (q) {
this.y(this.j, a, d.j, e.j, l);
}
if (this.f.count < h) {
while (this.f.count < h) {
this.f.add(new Array(this.t));
}
}
if (this.f.count > h) {
this.f.v(h, this.f.count - h);
}
if (m) {
let r = 0;
for (let s = 0; s < Math.min(f, g); ++s) {
let t = this.f._inner[s];
r = a * this.p._inner[s];
r = r > 1 ? 1 : r;
for (let u = 0; u < this.t; ++u) {
t[u] = d.f._inner[s][u] + r * (e.f._inner[s][u] - d.f._inner[s][u]);
}
}
}
else {
for (let v = 0; v < Math.min(f, g); ++v) {
let w = this.f._inner[v];
for (let x = 0; x < this.t; ++x) {
w[x] = d.f._inner[v][x] + a * (e.f._inner[v][x] - d.f._inner[v][x]);
}
}
}
if (f < g) {
let y = new Array(this.t);
for (let z = this.t - 1; z >= 0; --z) {
y[z] = d.f.count > 0 ? d.f._inner[d.f.count - 1][z] : 0;
}
if (m) {
let aa = 0;
for (let ab = f; ab < g; ++ab) {
let ac = this.f._inner[ab];
aa = a * this.p._inner[ab];
aa = aa > 1 ? 1 : aa;
for (let ad = this.t - 1; ad >= 0; --ad) {
ac[ad] = y[ad] + aa * (e.f._inner[ab][ad] - y[ad]);
}
}
}
else {
for (let ae = f; ae < g; ++ae) {
let af = this.f._inner[ae];
for (let ag = this.t - 1; ag >= 0; --ag) {
af[ag] = y[ag] + a * (e.f._inner[ae][ag] - y[ag]);
}
}
}
}
if (f > g) {
let ah = new Array(this.t);
for (let ai = this.t - 1; ai >= 0; --ai) {
ah[ai] = e.f.count > 0 ? e.f._inner[e.f.count - 1][ai] : 0;
}
if (m) {
let aj = 0;
for (let ak = g; ak < f; ++ak) {
let al = this.f._inner[ak];
aj = a * this.p._inner[ak];
aj = aj > 1 ? 1 : aj;
for (let am = this.t - 1; am >= 0; --am) {
al[am] = d.f._inner[ak][am] + aj * (ah[am] - d.f._inner[ak][am]);
}
}
}
else {
for (let an = g; an < f; ++an) {
let ao = this.f._inner[an];
for (let ap = this.t - 1; ap >= 0; --ap) {
ao[ap] = d.f._inner[an][ap] + a * (ah[ap] - d.f._inner[an][ap]);
}
}
}
}
if (n) {
Frame.d(this.n, a, d.n, e.n, this.o);
}
else {
Frame.a(this.n, a, d.n, e.n);
}
if (o) {
Frame.d(this.q, a, d.q, e.q, this.r);
}
else {
Frame.a(this.q, a, d.q, e.q);
}
if (p) {
Frame.d(this.i, a, d.i, e.i, this.l);
}
else {
Frame.a(this.i, a, d.i, e.i);
}
if (q) {
Frame.e(this.h, a, d.h, e.h, this.j);
Frame.e(this.g, a, d.g, e.g, this.j);
}
else {
Frame.b(this.h, a, d.h, e.h);
Frame.b(this.g, a, d.g, e.g);
}
if (d.m != null || e.m != null) {
if (this.m == null) {
this.m = new List$1(Number_$type, 0);
}
if (d.m == null) {
d.m = new List$1(Number_$type, 0);
}
if (e.m == null) {
e.m = new List$1(Number_$type, 0);
}
if (m) {
Frame.e(this.m, a, d.m, e.m, this.p);
Frame.e(this.m, a, d.m, e.m, this.p);
}
else {
Frame.b(this.m, a, d.m, e.m);
Frame.b(this.m, a, d.m, e.m);
}
}
let aq = d.ab;
let ar = e.ab;
if (Rect.l_op_Equality(aq, null)) {
aq = this.aa;
}
if (Rect.l_op_Equality(ar, null)) {
ar = this.aa;
}
let as = aq.left + (ar.left - aq.left) * a;
let at = aq.top + (ar.top - aq.top) * a;
let au = Math.max(0, aq.width + (ar.width - aq.width) * a);
let av = Math.max(0, aq.height + (ar.height - aq.height) * a);
this.ab = new Rect(0, as, at, au, av);
}
y(a, b, c, d, e) {
if (d.count == 0) {
for (let f = 0; f < c.count; f++) {
d.add(c._inner[f]);
}
}
else {
Frame.b(a, b, c, d);
}
if (a.count < e) {
let g = a.count;
for (let h = 0; h < e - g; h++) {
a.add(1);
}
}
}
w() {
this.p.clear();
this.r.clear();
this.o.clear();
this.l.clear();
this.j.clear();
}
v() {
this.x();
this.w();
this.ab = this.aa;
}
z() {
this.v();
this.f.clear();
this.i.clear();
this.k.clear();
this.n.clear();
this.q.clear();
if (this.m != null) {
this.m.clear();
}
}
x() {
CategoryFrame.s++;
if (CategoryFrame.s >= (0x7FFFFFFF - 1)) {
CategoryFrame.s = 0;
}
this.u = CategoryFrame.s;
}
}
CategoryFrame.$t = markType(CategoryFrame, 'CategoryFrame', Frame.$);
CategoryFrame.s = 0;
return CategoryFrame;
})();