igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
402 lines (401 loc) • 15.9 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 { Series } from "./Series";
import { DependencyProperty } from "igniteui-angular-core";
import { IEnumerable_$type, runOn, delegateCombine, delegateRemove, typeCast, Point_$type, markType, markDep } from "igniteui-angular-core";
import { NumericXAxis } from "./NumericXAxis";
import { NumericYAxis } from "./NumericYAxis";
import { IFastItemsSource_$type } from "igniteui-angular-core";
import { Triangulator } from "igniteui-angular-core";
import { TriangulationStatusEventArgs } from "igniteui-angular-core";
import { FastItemsSource } from "igniteui-angular-core";
import { SeriesViewer } from "./SeriesViewer";
import { Axis } from "./Axis";
import { AxisRange } from "./AxisRange";
import { DataLegendSeriesValueInfo } from "igniteui-angular-core";
import { DataLegendSeriesContext } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
/**
* @hidden
*/
export let ScatterTriangulationSeries = /*@__PURE__*/ (() => {
class ScatterTriangulationSeries extends Series {
constructor() {
super(...arguments);
this.w4 = null;
this.w5 = null;
this.xd = false;
this.w0 = null;
this.triangulationStatusChanged = null;
this.xg = null;
this.w1 = null;
this.w2 = null;
this.w3 = null;
}
o1() {
super.o1();
this.wx = null;
this.wy = null;
}
kp(a, b) {
let c = this.nc(b);
if (c == ScatterTriangulationSeries.$$p[8]) {
return this.kq(a, b, this.xz);
}
if (c == ScatterTriangulationSeries.$$p[12]) {
return this.kq(a, b, this.x7);
}
return super.kp(a, b);
}
mc(a) {
let b = this.nc(a);
if (b == ScatterTriangulationSeries.$$p[8]) {
return this.xz;
}
if (b == ScatterTriangulationSeries.$$p[12]) {
return this.x7;
}
return super.mc(a);
}
get xa() {
return this.w4;
}
set xa(a) {
let b = this.xa != a;
if (b) {
let c = this.xa;
this.w4 = a;
this.raisePropertyChanged("XColumn", c, this.xa);
}
}
get xb() {
return this.w5;
}
set xb(a) {
let b = this.xb != a;
if (b) {
let c = this.xb;
this.w5 = a;
this.raisePropertyChanged("YColumn", c, this.xb);
}
}
rr(a) {
let b = this.dn != null && this.xc == null && this.xg == null && this.xa != null && this.xb != null && this.xa.count >= 3 && this.xb.count >= 3 && !this.xd;
if (b) {
this.yb();
this.xd = true;
}
}
yb() {
this.w0 = new Triangulator(this.dn.count, this.xa, this.xb);
let a = this.w0;
a.triangulationStatusChanged = delegateCombine(a.triangulationStatusChanged, runOn(this, this.yc));
this.w0.y();
}
x9() {
if (this.w0 == null) {
return;
}
this.w0.r();
let a = this.w0;
a.triangulationStatusChanged = delegateRemove(a.triangulationStatusChanged, runOn(this, this.yc));
this.w0 = null;
}
yc(a, b) {
if (this.triangulationStatusChanged != null) {
this.triangulationStatusChanged(this, new TriangulationStatusEventArgs(b.currentStatus));
}
if (b.currentStatus >= 100) {
if (this.w0 == null) {
return;
}
let c = this.w0;
c.triangulationStatusChanged = delegateRemove(c.triangulationStatusChanged, runOn(this, this.yc));
this.xg = this.w0.n();
this.w0 = null;
let d = ((() => {
let $ret = new FastItemsSource();
$ret.e = this.xg;
return $ret;
})());
this.w7 = this.w6(d, "v1");
this.w8 = this.w6(d, "v2");
this.w9 = this.w6(d, "v3");
this.rq(false);
}
}
w6(a, b) {
if (b == null) {
return a.registerColumnInt(null, null, false);
}
let c = null;
let d = SeriesViewer.cu(b, this.coercionMethods);
c = d.a;
return a.registerColumnInt(b, c, this.expectFunctions);
}
q8(a, b, c, d) {
super.q8(a, b, c, d);
switch (b) {
case ScatterTriangulationSeries.$$p[6]:
case ScatterTriangulationSeries.$$p[10]:
case ScatterTriangulationSeries.$$p[7]:
case ScatterTriangulationSeries.$$p[11]:
this.qe();
break;
case "FastItemsSource":
let e = typeCast(IFastItemsSource_$type, c);
if (e != null) {
e.deregisterColumn(this.xa);
e.deregisterColumn(this.xb);
this.xa = null;
this.xb = null;
}
this.ya();
let f = typeCast(IFastItemsSource_$type, d);
if (f != null) {
this.xa = this.dk(this.xz);
this.xb = this.dk(this.x7);
}
this.rq(this.gf && c != null);
break;
case ScatterTriangulationSeries.$$p[8]:
if (this.dn != null) {
this.dn.deregisterColumn(this.xa);
this.xa = this.dk(this.xz);
}
this.ya();
this.rq(false);
this.qk();
break;
case ScatterTriangulationSeries.$$p[12]:
if (this.dn != null) {
this.dn.deregisterColumn(this.xb);
this.xb = this.dk(this.x7);
}
this.ya();
this.rq(false);
this.qk();
break;
case ScatterTriangulationSeries.$$p[5]:
if (c != null) {
(typeCast(Axis.$, c)).b0(this);
}
if (d != null) {
(typeCast(Axis.$, d)).ct(this);
}
if ((this.wx != null && !this.wx.c1()) || (d == null && c != null)) {
this.rq(false);
}
this.qk();
break;
case ScatterTriangulationSeries.$$p[9]:
if (c != null) {
(typeCast(Axis.$, c)).b0(this);
}
if (d != null) {
(typeCast(Axis.$, d)).ct(this);
}
if ((this.wy != null && !this.wy.c1()) || (d == null && c != null)) {
this.rq(false);
}
this.qk();
break;
case ScatterTriangulationSeries.$$p[4]:
if (this.trianglesSource != null) {
this.x9();
this.xc = ((() => {
let $ret = new FastItemsSource();
$ret.e = this.trianglesSource;
return $ret;
})());
}
else {
this.xc = null;
}
break;
case ScatterTriangulationSeries.$$p[0]:
let g = typeCast(IFastItemsSource_$type, c);
if (g != null) {
g.deregisterColumn(this.w7);
g.deregisterColumn(this.w8);
g.deregisterColumn(this.w9);
this.w7 = null;
this.w8 = null;
this.w9 = null;
}
let h = typeCast(IFastItemsSource_$type, d);
if (h != null) {
this.w7 = this.w6(h, this.xn);
this.w8 = this.w6(h, this.xp);
this.w9 = this.w6(h, this.xr);
}
this.rq(false);
this.qk();
break;
case ScatterTriangulationSeries.$$p[1]:
if (this.xc != null) {
this.xc.deregisterColumn(this.w7);
this.w7 = this.w6(this.xc, this.xn);
}
this.rq(false);
this.qk();
break;
case ScatterTriangulationSeries.$$p[2]:
if (this.xc != null) {
this.xc.deregisterColumn(this.w8);
this.w8 = this.w6(this.xc, this.xp);
}
this.rq(false);
this.qk();
break;
case ScatterTriangulationSeries.$$p[3]:
if (this.xc != null) {
this.xc.deregisterColumn(this.w9);
this.w9 = this.w6(this.xc, this.xr);
}
this.rq(false);
this.qk();
break;
case "XColumn":
if (this.wx != null) {
this.wx.c1();
}
break;
case "YColumn":
if (this.wy != null) {
this.wy.c1();
}
break;
}
}
xf(a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
}
xe(a) {
if (typeCast(NumericXAxis.$, a) !== null) {
return true;
}
return false;
}
hd(a, b, c) {
return super.hd(a, b, c) && this.dn != null && this.wx != null && this.wy != null && this.wx.bi != null && this.wy.bi != null && a.width > 0 && a.height > 0 && this.w7 != null && this.w7.count > 0 && this.w8 != null && this.w8.count > 0 && this.w9 != null && this.w9.count > 0 && this.xa != null && this.xa.count > 0 && this.xb != null && this.xb.count > 0;
}
ya() {
if (this.trianglesSource == null) {
this.xg = null;
this.w7 = null;
this.w8 = null;
this.w9 = null;
this.xd = false;
}
}
qa() {
super.qa();
if (this.wx != null) {
this.wx.ia();
}
if (this.wy != null) {
this.wy.ia();
}
}
pa(a, b, c, d) {
super.pa(a, b, c, d);
this.ya();
this.rq(false);
}
ay(a) {
if (a != null && a == this.wx && this.xa != null) {
return new AxisRange(this.xa.minimum, this.xa.maximum);
}
if (a != null && a == this.wy && this.xb != null) {
return new AxisRange(this.xb.minimum, this.xb.maximum);
}
return null;
}
sq(a, b) {
this.rq(false);
}
sp(a, b) {
this.rq(false);
}
get w7() {
return this.w1;
}
set w7(a) {
let b = this.w7 != a;
if (b) {
let c = this.w7;
this.w1 = a;
this.raisePropertyChanged("TriangleVertexColumn1", c, this.w7);
}
}
get w8() {
return this.w2;
}
set w8(a) {
let b = this.w8 != a;
if (b) {
let c = this.w8;
this.w2 = a;
this.raisePropertyChanged("TriangleVertexColumn2", c, this.w8);
}
}
get w9() {
return this.w3;
}
set w9(a) {
let b = this.w9 != a;
if (b) {
let c = this.w9;
this.w3 = a;
this.raisePropertyChanged("TriangleVertexColumn3", c, this.w9);
}
}
get_fw() {
return true;
}
get_fk() {
return true;
}
getDataLegendSeriesContextAt(a, b) {
let c = { $type: Point_$type, x: a, y: b };
let d = this.km(c);
let e = d == null ? NaN : this.iw(d, "XMemberPath");
let f = d == null ? NaN : this.iw(d, "YMemberPath");
let g = new DataLegendSeriesValueInfo();
g.l = e;
g.a = 13;
g.q = "X";
g.r = this.xz != null ? this.xz : "X";
g.s = this.xv != null ? this.xv : "X:";
g.t = this.xx != null ? this.xx : "";
let h = new DataLegendSeriesValueInfo();
h.l = f;
h.a = 14;
h.q = "Y";
h.r = this.x7 != null ? this.x7 : "Y";
h.s = this.x3 != null ? this.x3 : "Y:";
h.t = this.x5 != null ? this.x5 : "";
let i = new DataLegendSeriesContext();
i.e = ((() => {
let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
$ret.add(g);
$ret.add(h);
return $ret;
})());
i.h = this.mb();
return i;
}
}
ScatterTriangulationSeries.$t = markType(ScatterTriangulationSeries, 'ScatterTriangulationSeries', Series.$);
ScatterTriangulationSeries.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterTriangulationSeries, 'raisePropertyChanged', ['FastTrianglesSource:xc:yd', [IFastItemsSource_$type, null], 'TriangleVertexMemberPath1:xn:yf', [2, null], 'TriangleVertexMemberPath2:xp:yg', [2, null], 'TriangleVertexMemberPath3:xr:yh', [2, null], 'TrianglesSource::ye', [IEnumerable_$type, null], 'XAxis:wx:yi', [NumericXAxis.$, null], 'XMemberAsLegendLabel:xv:yj', [2, null], 'XMemberAsLegendUnit:xx:yk', [2, null], 'XMemberPath:xz:yl', [2, null], 'YAxis:wy:ym', [NumericYAxis.$, null], 'YMemberAsLegendLabel:x3:yn', [2, null], 'YMemberAsLegendUnit:x5:yo', [2, null], 'YMemberPath:x7:yp', [2, null]]);
return ScatterTriangulationSeries;
})();