UNPKG

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
/* 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.xp = null; this.xq = null; this.xy = false; this.xl = null; this.triangulationStatusChanged = null; this.x1 = null; this.xm = null; this.xn = null; this.xo = null; } pe() { super.pe(); this.xi = null; this.xj = null; } kz(a, b) { let c = this.no(b); if (c == ScatterTriangulationSeries.$$p[8]) { return this.k0(a, b, this.yk); } if (c == ScatterTriangulationSeries.$$p[12]) { return this.k0(a, b, this.ys); } return super.kz(a, b); } mo(a) { let b = this.no(a); if (b == ScatterTriangulationSeries.$$p[8]) { return this.yk; } if (b == ScatterTriangulationSeries.$$p[12]) { return this.ys; } return super.mo(a); } get xv() { return this.xp; } set xv(a) { let b = this.xv != a; if (b) { let c = this.xv; this.xp = a; this.raisePropertyChanged("XColumn", c, this.xv); } } get xw() { return this.xq; } set xw(a) { let b = this.xw != a; if (b) { let c = this.xw; this.xq = a; this.raisePropertyChanged("YColumn", c, this.xw); } } r8(a) { let b = this.dp != null && this.xx == null && this.x1 == null && this.xv != null && this.xw != null && this.xv.count >= 3 && this.xw.count >= 3 && !this.xy; if (b) { this.yw(); this.xy = true; } } yw() { this.xl = new Triangulator(this.dp.count, this.xv, this.xw); let a = this.xl; a.triangulationStatusChanged = delegateCombine(a.triangulationStatusChanged, runOn(this, this.yx)); this.xl.y(); } yu() { if (this.xl == null) { return; } this.xl.r(); let a = this.xl; a.triangulationStatusChanged = delegateRemove(a.triangulationStatusChanged, runOn(this, this.yx)); this.xl = null; } yx(a, b) { if (this.triangulationStatusChanged != null) { this.triangulationStatusChanged(this, new TriangulationStatusEventArgs(b.currentStatus)); } if (b.currentStatus >= 100) { if (this.xl == null) { return; } let c = this.xl; c.triangulationStatusChanged = delegateRemove(c.triangulationStatusChanged, runOn(this, this.yx)); this.x1 = this.xl.n(); this.xl = null; let d = ((() => { let $ret = new FastItemsSource(); $ret.e = this.x1; return $ret; })()); this.xs = this.xr(d, "v1"); this.xt = this.xr(d, "v2"); this.xu = this.xr(d, "v3"); this.r7(false); } } xr(a, b) { if (b == null) { return a.registerColumnInt(null, null, false); } let c = null; let d = SeriesViewer.de(b, this.coercionMethods); c = d.a; return a.registerColumnInt(b, c, this.expectFunctions); } rp(a, b, c, d) { super.rp(a, b, c, d); switch (b) { case ScatterTriangulationSeries.$$p[6]: case ScatterTriangulationSeries.$$p[10]: case ScatterTriangulationSeries.$$p[7]: case ScatterTriangulationSeries.$$p[11]: this.qt(); break; case "FastItemsSource": let e = typeCast(IFastItemsSource_$type, c); if (e != null) { e.deregisterColumn(this.xv); e.deregisterColumn(this.xw); this.xv = null; this.xw = null; } this.yv(); let f = typeCast(IFastItemsSource_$type, d); if (f != null) { this.xv = this.dl(this.yk); this.xw = this.dl(this.ys); } this.r7(this.gm && c != null); break; case ScatterTriangulationSeries.$$p[8]: if (this.dp != null) { this.dp.deregisterColumn(this.xv); this.xv = this.dl(this.yk); } this.yv(); this.r7(false); this.qz(); break; case ScatterTriangulationSeries.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.xw); this.xw = this.dl(this.ys); } this.yv(); this.r7(false); this.qz(); break; case ScatterTriangulationSeries.$$p[5]: if (c != null) { (typeCast(Axis.$, c)).cx(this); } if (d != null) { (typeCast(Axis.$, d)).d3(this); } if ((this.xi != null && !this.xi.ec()) || (d == null && c != null)) { this.r7(false); } this.qz(); break; case ScatterTriangulationSeries.$$p[9]: if (c != null) { (typeCast(Axis.$, c)).cx(this); } if (d != null) { (typeCast(Axis.$, d)).d3(this); } if ((this.xj != null && !this.xj.ec()) || (d == null && c != null)) { this.r7(false); } this.qz(); break; case ScatterTriangulationSeries.$$p[4]: if (this.trianglesSource != null) { this.yu(); this.xx = ((() => { let $ret = new FastItemsSource(); $ret.e = this.trianglesSource; return $ret; })()); } else { this.xx = null; } break; case ScatterTriangulationSeries.$$p[0]: let g = typeCast(IFastItemsSource_$type, c); if (g != null) { g.deregisterColumn(this.xs); g.deregisterColumn(this.xt); g.deregisterColumn(this.xu); this.xs = null; this.xt = null; this.xu = null; } let h = typeCast(IFastItemsSource_$type, d); if (h != null) { this.xs = this.xr(h, this.x8); this.xt = this.xr(h, this.ya); this.xu = this.xr(h, this.yc); } this.r7(false); this.qz(); break; case ScatterTriangulationSeries.$$p[1]: if (this.xx != null) { this.xx.deregisterColumn(this.xs); this.xs = this.xr(this.xx, this.x8); } this.r7(false); this.qz(); break; case ScatterTriangulationSeries.$$p[2]: if (this.xx != null) { this.xx.deregisterColumn(this.xt); this.xt = this.xr(this.xx, this.ya); } this.r7(false); this.qz(); break; case ScatterTriangulationSeries.$$p[3]: if (this.xx != null) { this.xx.deregisterColumn(this.xu); this.xu = this.xr(this.xx, this.yc); } this.r7(false); this.qz(); break; case "XColumn": if (this.xi != null) { this.xi.ec(); } break; case "YColumn": if (this.xj != null) { this.xj.ec(); } break; } } x0(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } xz(a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; } hk(a, b, c) { return super.hk(a, b, c) && this.dp != null && this.xi != null && this.xj != null && this.xi.b2 != null && this.xj.b2 != null && a.width > 0 && a.height > 0 && this.xs != null && this.xs.count > 0 && this.xt != null && this.xt.count > 0 && this.xu != null && this.xu.count > 0 && this.xv != null && this.xv.count > 0 && this.xw != null && this.xw.count > 0; } yv() { if (this.trianglesSource == null) { this.x1 = null; this.xs = null; this.xt = null; this.xu = null; this.xy = false; } } qo() { super.qo(); if (this.xi != null) { this.xi.lu(); } if (this.xj != null) { this.xj.lu(); } } pn(a, b, c, d) { super.pn(a, b, c, d); this.yv(); this.r7(false); } ay(a) { if (a != null && a == this.xi && this.xv != null) { return new AxisRange(this.xv.minimum, this.xv.maximum); } if (a != null && a == this.xj && this.xw != null) { return new AxisRange(this.xw.minimum, this.xw.maximum); } return null; } s8(a, b) { this.r7(false); } s7(a, b) { this.r7(false); } get xs() { return this.xm; } set xs(a) { let b = this.xs != a; if (b) { let c = this.xs; this.xm = a; this.raisePropertyChanged("TriangleVertexColumn1", c, this.xs); } } get xt() { return this.xn; } set xt(a) { let b = this.xt != a; if (b) { let c = this.xt; this.xn = a; this.raisePropertyChanged("TriangleVertexColumn2", c, this.xt); } } get xu() { return this.xo; } set xu(a) { let b = this.xu != a; if (b) { let c = this.xu; this.xo = a; this.raisePropertyChanged("TriangleVertexColumn3", c, this.xu); } } get_f0() { return true; } get_fo() { return true; } getDataLegendSeriesContextAt(a, b) { let c = { $type: Point_$type, x: a, y: b }; let d = this.kw(c); let e = d == null ? NaN : this.i4(d, "XMemberPath"); let f = d == null ? NaN : this.i4(d, "YMemberPath"); let g = new DataLegendSeriesValueInfo(); g.l = e; g.a = 13; g.q = "X"; g.r = this.yk != null ? this.yk : "X"; g.s = this.yg != null ? this.yg : "X:"; g.t = this.yi != null ? this.yi : ""; let h = new DataLegendSeriesValueInfo(); h.l = f; h.a = 14; h.q = "Y"; h.r = this.ys != null ? this.ys : "Y"; h.s = this.yo != null ? this.yo : "Y:"; h.t = this.yq != null ? this.yq : ""; let i = new DataLegendSeriesContext(); i.e = ((() => { let $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(g); $ret.add(h); return $ret; })()); i.h = this.mn(); return i; } } ScatterTriangulationSeries.$t = markType(ScatterTriangulationSeries, 'ScatterTriangulationSeries', Series.$); ScatterTriangulationSeries.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterTriangulationSeries, 'raisePropertyChanged', ['FastTrianglesSource:xx:yy', [IFastItemsSource_$type, null], 'TriangleVertexMemberPath1:x8:y0', [2, null], 'TriangleVertexMemberPath2:ya:y1', [2, null], 'TriangleVertexMemberPath3:yc:y2', [2, null], 'TrianglesSource::yz', [IEnumerable_$type, null], 'XAxis:xi:y3', [NumericXAxis.$, null], 'XMemberAsLegendLabel:yg:y4', [2, null], 'XMemberAsLegendUnit:yi:y5', [2, null], 'XMemberPath:yk:y6', [2, null], 'YAxis:xj:y7', [NumericYAxis.$, null], 'YMemberAsLegendLabel:yo:y8', [2, null], 'YMemberAsLegendUnit:yq:y9', [2, null], 'YMemberPath:ys:za', [2, null]]); return ScatterTriangulationSeries; })();