UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

402 lines (401 loc) 15.5 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-react-core"; import { IEnumerable_$type, runOn, delegateCombine, delegateRemove, typeCast, Point_$type, markType, markDep } from "igniteui-react-core"; import { NumericXAxis } from "./NumericXAxis"; import { NumericYAxis } from "./NumericYAxis"; import { IFastItemsSource_$type } from "igniteui-react-core"; import { Triangulator } from "igniteui-react-core"; import { TriangulationStatusEventArgs } from "igniteui-react-core"; import { FastItemsSource } from "igniteui-react-core"; import { SeriesViewer } from "./SeriesViewer"; import { Axis } from "./Axis"; import { AxisRange } from "./AxisRange"; import { DataLegendSeriesValueInfo } from "igniteui-react-core"; import { DataLegendSeriesContext } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; /** * @hidden */ export let ScatterTriangulationSeries = /*@__PURE__*/ (() => { class ScatterTriangulationSeries extends Series { constructor() { super(...arguments); this.xq = null; this.xr = null; this.xz = false; this.xm = null; this.triangulationStatusChanged = null; this.x2 = null; this.xn = null; this.xo = null; this.xp = null; } pf() { super.pf(); this.xj = null; this.xk = null; } kz(a, b) { let c = this.no(b); if (c == ScatterTriangulationSeries.$$p[8]) { return this.k0(a, b, this.yl); } if (c == ScatterTriangulationSeries.$$p[12]) { return this.k0(a, b, this.yt); } return super.kz(a, b); } mo(a) { let b = this.no(a); if (b == ScatterTriangulationSeries.$$p[8]) { return this.yl; } if (b == ScatterTriangulationSeries.$$p[12]) { return this.yt; } return super.mo(a); } get xw() { return this.xq; } set xw(a) { let b = this.xw != a; if (b) { let c = this.xw; this.xq = a; this.raisePropertyChanged("XColumn", c, this.xw); } } get xx() { return this.xr; } set xx(a) { let b = this.xx != a; if (b) { let c = this.xx; this.xr = a; this.raisePropertyChanged("YColumn", c, this.xx); } } r9(a) { let b = this.dp != null && this.xy == null && this.x2 == null && this.xw != null && this.xx != null && this.xw.count >= 3 && this.xx.count >= 3 && !this.xz; if (b) { this.yx(); this.xz = true; } } yx() { this.xm = new Triangulator(this.dp.count, this.xw, this.xx); let a = this.xm; a.triangulationStatusChanged = delegateCombine(a.triangulationStatusChanged, runOn(this, this.yy)); this.xm.y(); } yv() { if (this.xm == null) { return; } this.xm.r(); let a = this.xm; a.triangulationStatusChanged = delegateRemove(a.triangulationStatusChanged, runOn(this, this.yy)); this.xm = null; } yy(a, b) { if (this.triangulationStatusChanged != null) { this.triangulationStatusChanged(this, new TriangulationStatusEventArgs(b.currentStatus)); } if (b.currentStatus >= 100) { if (this.xm == null) { return; } let c = this.xm; c.triangulationStatusChanged = delegateRemove(c.triangulationStatusChanged, runOn(this, this.yy)); this.x2 = this.xm.n(); this.xm = null; let d = ((() => { let $ret = new FastItemsSource(); $ret.e = this.x2; return $ret; })()); this.xt = this.xs(d, "v1"); this.xu = this.xs(d, "v2"); this.xv = this.xs(d, "v3"); this.r8(false); } } xs(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); } rq(a, b, c, d) { super.rq(a, b, c, d); switch (b) { case ScatterTriangulationSeries.$$p[6]: case ScatterTriangulationSeries.$$p[10]: case ScatterTriangulationSeries.$$p[7]: case ScatterTriangulationSeries.$$p[11]: this.qu(); break; case "FastItemsSource": let e = typeCast(IFastItemsSource_$type, c); if (e != null) { e.deregisterColumn(this.xw); e.deregisterColumn(this.xx); this.xw = null; this.xx = null; } this.yw(); let f = typeCast(IFastItemsSource_$type, d); if (f != null) { this.xw = this.dl(this.yl); this.xx = this.dl(this.yt); } this.r8(this.gm && c != null); break; case ScatterTriangulationSeries.$$p[8]: if (this.dp != null) { this.dp.deregisterColumn(this.xw); this.xw = this.dl(this.yl); } this.yw(); this.r8(false); this.q0(); break; case ScatterTriangulationSeries.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.xx); this.xx = this.dl(this.yt); } this.yw(); this.r8(false); this.q0(); break; case ScatterTriangulationSeries.$$p[5]: if (c != null) { (typeCast(Axis.$, c)).cx(this); } if (d != null) { (typeCast(Axis.$, d)).d3(this); } if ((this.xj != null && !this.xj.ed()) || (d == null && c != null)) { this.r8(false); } this.q0(); break; case ScatterTriangulationSeries.$$p[9]: if (c != null) { (typeCast(Axis.$, c)).cx(this); } if (d != null) { (typeCast(Axis.$, d)).d3(this); } if ((this.xk != null && !this.xk.ed()) || (d == null && c != null)) { this.r8(false); } this.q0(); break; case ScatterTriangulationSeries.$$p[4]: if (this.trianglesSource != null) { this.yv(); this.xy = ((() => { let $ret = new FastItemsSource(); $ret.e = this.trianglesSource; return $ret; })()); } else { this.xy = null; } break; case ScatterTriangulationSeries.$$p[0]: let g = typeCast(IFastItemsSource_$type, c); if (g != null) { g.deregisterColumn(this.xt); g.deregisterColumn(this.xu); g.deregisterColumn(this.xv); this.xt = null; this.xu = null; this.xv = null; } let h = typeCast(IFastItemsSource_$type, d); if (h != null) { this.xt = this.xs(h, this.x9); this.xu = this.xs(h, this.yb); this.xv = this.xs(h, this.yd); } this.r8(false); this.q0(); break; case ScatterTriangulationSeries.$$p[1]: if (this.xy != null) { this.xy.deregisterColumn(this.xt); this.xt = this.xs(this.xy, this.x9); } this.r8(false); this.q0(); break; case ScatterTriangulationSeries.$$p[2]: if (this.xy != null) { this.xy.deregisterColumn(this.xu); this.xu = this.xs(this.xy, this.yb); } this.r8(false); this.q0(); break; case ScatterTriangulationSeries.$$p[3]: if (this.xy != null) { this.xy.deregisterColumn(this.xv); this.xv = this.xs(this.xy, this.yd); } this.r8(false); this.q0(); break; case "XColumn": if (this.xj != null) { this.xj.ed(); } break; case "YColumn": if (this.xk != null) { this.xk.ed(); } break; } } x1(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } x0(a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; } hk(a, b, c) { return super.hk(a, b, c) && this.dp != null && this.xj != null && this.xk != null && this.xj.b7 != null && this.xk.b7 != null && a.width > 0 && a.height > 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 && this.xx != null && this.xx.count > 0; } yw() { if (this.trianglesSource == null) { this.x2 = null; this.xt = null; this.xu = null; this.xv = null; this.xz = false; } } qp() { super.qp(); if (this.xj != null) { this.xj.lx(); } if (this.xk != null) { this.xk.lx(); } } po(a, b, c, d) { super.po(a, b, c, d); this.yw(); this.r8(false); } ay(a) { if (a != null && a == this.xj && this.xw != null) { return new AxisRange(this.xw.minimum, this.xw.maximum); } if (a != null && a == this.xk && this.xx != null) { return new AxisRange(this.xx.minimum, this.xx.maximum); } return null; } s9(a, b) { this.r8(false); } s8(a, b) { this.r8(false); } get xt() { return this.xn; } set xt(a) { let b = this.xt != a; if (b) { let c = this.xt; this.xn = a; this.raisePropertyChanged("TriangleVertexColumn1", 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("TriangleVertexColumn2", c, this.xu); } } get xv() { return this.xp; } set xv(a) { let b = this.xv != a; if (b) { let c = this.xv; this.xp = a; this.raisePropertyChanged("TriangleVertexColumn3", c, this.xv); } } 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.yl != null ? this.yl : "X"; g.s = this.yh != null ? this.yh : "X:"; g.t = this.yj != null ? this.yj : ""; let h = new DataLegendSeriesValueInfo(); h.l = f; h.a = 14; h.q = "Y"; h.r = this.yt != null ? this.yt : "Y"; h.s = this.yp != null ? this.yp : "Y:"; h.t = this.yr != null ? this.yr : ""; 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 = /*@__PURE__*/ markType(ScatterTriangulationSeries, 'ScatterTriangulationSeries', Series.$); ScatterTriangulationSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, ScatterTriangulationSeries, 'raisePropertyChanged', ['FastTrianglesSource:xy:yz', [IFastItemsSource_$type, null], 'TriangleVertexMemberPath1:x9:y1', [2, null], 'TriangleVertexMemberPath2:yb:y2', [2, null], 'TriangleVertexMemberPath3:yd:y3', [2, null], 'TrianglesSource::y0', [IEnumerable_$type, null], 'XAxis:xj:y4', [NumericXAxis.$, null], 'XMemberAsLegendLabel:yh:y5', [2, null], 'XMemberAsLegendUnit:yj:y6', [2, null], 'XMemberPath:yl:y7', [2, null], 'YAxis:xk:y8', [NumericYAxis.$, null], 'YMemberAsLegendLabel:yp:y9', [2, null], 'YMemberAsLegendUnit:yr:za', [2, null], 'YMemberPath:yt:zb', [2, null]]); return ScatterTriangulationSeries; })();