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.xs = null; this.xt = null; this.x1 = false; this.xo = null; this.triangulationStatusChanged = null; this.x4 = null; this.xp = null; this.xq = null; this.xr = null; } ph() { super.ph(); this.xl = null; this.xm = null; } k1(a, b) { let c = this.nq(b); if (c == ScatterTriangulationSeries.$$p[8]) { return this.k2(a, b, this.yn); } if (c == ScatterTriangulationSeries.$$p[12]) { return this.k2(a, b, this.yv); } return super.k1(a, b); } mq(a) { let b = this.nq(a); if (b == ScatterTriangulationSeries.$$p[8]) { return this.yn; } if (b == ScatterTriangulationSeries.$$p[12]) { return this.yv; } return super.mq(a); } get xy() { return this.xs; } set xy(a) { let b = this.xy != a; if (b) { let c = this.xy; this.xs = a; this.raisePropertyChanged("XColumn", c, this.xy); } } get xz() { return this.xt; } set xz(a) { let b = this.xz != a; if (b) { let c = this.xz; this.xt = a; this.raisePropertyChanged("YColumn", c, this.xz); } } sb(a) { let b = this.dp != null && this.x0 == null && this.x4 == null && this.xy != null && this.xz != null && this.xy.count >= 3 && this.xz.count >= 3 && !this.x1; if (b) { this.yz(); this.x1 = true; } } yz() { this.xo = new Triangulator(this.dp.count, this.xy, this.xz); let a = this.xo; a.triangulationStatusChanged = delegateCombine(a.triangulationStatusChanged, runOn(this, this.y0)); this.xo.y(); } yx() { if (this.xo == null) { return; } this.xo.r(); let a = this.xo; a.triangulationStatusChanged = delegateRemove(a.triangulationStatusChanged, runOn(this, this.y0)); this.xo = null; } y0(a, b) { if (this.triangulationStatusChanged != null) { this.triangulationStatusChanged(this, new TriangulationStatusEventArgs(b.currentStatus)); } if (b.currentStatus >= 100) { if (this.xo == null) { return; } let c = this.xo; c.triangulationStatusChanged = delegateRemove(c.triangulationStatusChanged, runOn(this, this.y0)); this.x4 = this.xo.n(); this.xo = null; let d = ((() => { let $ret = new FastItemsSource(); $ret.e = this.x4; return $ret; })()); this.xv = this.xu(d, "v1"); this.xw = this.xu(d, "v2"); this.xx = this.xu(d, "v3"); this.sa(false); } } xu(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); } rs(a, b, c, d) { super.rs(a, b, c, d); switch (b) { case ScatterTriangulationSeries.$$p[6]: case ScatterTriangulationSeries.$$p[10]: case ScatterTriangulationSeries.$$p[7]: case ScatterTriangulationSeries.$$p[11]: this.qw(); break; case "FastItemsSource": let e = typeCast(IFastItemsSource_$type, c); if (e != null) { e.deregisterColumn(this.xy); e.deregisterColumn(this.xz); this.xy = null; this.xz = null; } this.yy(); let f = typeCast(IFastItemsSource_$type, d); if (f != null) { this.xy = this.dl(this.yn); this.xz = this.dl(this.yv); } this.sa(this.go && c != null); break; case ScatterTriangulationSeries.$$p[8]: if (this.dp != null) { this.dp.deregisterColumn(this.xy); this.xy = this.dl(this.yn); } this.yy(); this.sa(false); this.q2(); break; case ScatterTriangulationSeries.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.xz); this.xz = this.dl(this.yv); } this.yy(); this.sa(false); this.q2(); break; case ScatterTriangulationSeries.$$p[5]: if (c != null) { (typeCast(Axis.$, c)).cx(this); } if (d != null) { (typeCast(Axis.$, d)).d4(this); } if ((this.xl != null && !this.xl.ee()) || (d == null && c != null)) { this.sa(false); } this.q2(); break; case ScatterTriangulationSeries.$$p[9]: if (c != null) { (typeCast(Axis.$, c)).cx(this); } if (d != null) { (typeCast(Axis.$, d)).d4(this); } if ((this.xm != null && !this.xm.ee()) || (d == null && c != null)) { this.sa(false); } this.q2(); break; case ScatterTriangulationSeries.$$p[4]: if (this.trianglesSource != null) { this.yx(); this.x0 = ((() => { let $ret = new FastItemsSource(); $ret.e = this.trianglesSource; return $ret; })()); } else { this.x0 = null; } break; case ScatterTriangulationSeries.$$p[0]: let g = typeCast(IFastItemsSource_$type, c); if (g != null) { g.deregisterColumn(this.xv); g.deregisterColumn(this.xw); g.deregisterColumn(this.xx); this.xv = null; this.xw = null; this.xx = null; } let h = typeCast(IFastItemsSource_$type, d); if (h != null) { this.xv = this.xu(h, this.yb); this.xw = this.xu(h, this.yd); this.xx = this.xu(h, this.yf); } this.sa(false); this.q2(); break; case ScatterTriangulationSeries.$$p[1]: if (this.x0 != null) { this.x0.deregisterColumn(this.xv); this.xv = this.xu(this.x0, this.yb); } this.sa(false); this.q2(); break; case ScatterTriangulationSeries.$$p[2]: if (this.x0 != null) { this.x0.deregisterColumn(this.xw); this.xw = this.xu(this.x0, this.yd); } this.sa(false); this.q2(); break; case ScatterTriangulationSeries.$$p[3]: if (this.x0 != null) { this.x0.deregisterColumn(this.xx); this.xx = this.xu(this.x0, this.yf); } this.sa(false); this.q2(); break; case "XColumn": if (this.xl != null) { this.xl.ee(); } break; case "YColumn": if (this.xm != null) { this.xm.ee(); } break; } } x3(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } x2(a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; } hm(a, b, c) { return super.hm(a, b, c) && this.dp != null && this.xl != null && this.xm != null && this.xl.b7 != null && this.xm.b7 != null && a.width > 0 && a.height > 0 && this.xv != null && this.xv.count > 0 && this.xw != null && this.xw.count > 0 && this.xx != null && this.xx.count > 0 && this.xy != null && this.xy.count > 0 && this.xz != null && this.xz.count > 0; } yy() { if (this.trianglesSource == null) { this.x4 = null; this.xv = null; this.xw = null; this.xx = null; this.x1 = false; } } qr() { super.qr(); if (this.xl != null) { this.xl.lz(); } if (this.xm != null) { this.xm.lz(); } } pq(a, b, c, d) { super.pq(a, b, c, d); this.yy(); this.sa(false); } ay(a) { if (a != null && a == this.xl && this.xy != null) { return new AxisRange(this.xy.minimum, this.xy.maximum); } if (a != null && a == this.xm && this.xz != null) { return new AxisRange(this.xz.minimum, this.xz.maximum); } return null; } tb(a, b) { this.sa(false); } ta(a, b) { this.sa(false); } get xv() { return this.xp; } set xv(a) { let b = this.xv != a; if (b) { let c = this.xv; this.xp = a; this.raisePropertyChanged("TriangleVertexColumn1", 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("TriangleVertexColumn2", 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("TriangleVertexColumn3", c, this.xx); } } get_f1() { return true; } get_fp() { return true; } getDataLegendSeriesContextAt(a, b) { let c = { $type: Point_$type, x: a, y: b }; let d = this.ky(c); let e = d == null ? NaN : this.i6(d, "XMemberPath"); let f = d == null ? NaN : this.i6(d, "YMemberPath"); let g = new DataLegendSeriesValueInfo(); g.l = e; g.a = 13; g.q = "X"; g.r = this.yn != null ? this.yn : "X"; g.s = this.yj != null ? this.yj : "X:"; g.t = this.yl != null ? this.yl : ""; let h = new DataLegendSeriesValueInfo(); h.l = f; h.a = 14; h.q = "Y"; h.r = this.yv != null ? this.yv : "Y"; h.s = this.yr != null ? this.yr : "Y:"; h.t = this.yt != null ? this.yt : ""; let i = new DataLegendSeriesContext(); i.e = ((() => { let $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(g); $ret.add(h); return $ret; })()); i.h = this.mp(); return i; } } ScatterTriangulationSeries.$t = /*@__PURE__*/ markType(ScatterTriangulationSeries, 'ScatterTriangulationSeries', Series.$); ScatterTriangulationSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, ScatterTriangulationSeries, 'raisePropertyChanged', ['FastTrianglesSource:x0:y1', [IFastItemsSource_$type, null], 'TriangleVertexMemberPath1:yb:y3', [2, null], 'TriangleVertexMemberPath2:yd:y4', [2, null], 'TriangleVertexMemberPath3:yf:y5', [2, null], 'TrianglesSource::y2', [IEnumerable_$type, null], 'XAxis:xl:y6', [NumericXAxis.$, null], 'XMemberAsLegendLabel:yj:y7', [2, null], 'XMemberAsLegendUnit:yl:y8', [2, null], 'XMemberPath:yn:y9', [2, null], 'YAxis:xm:za', [NumericYAxis.$, null], 'YMemberAsLegendLabel:yr:zb', [2, null], 'YMemberAsLegendUnit:yt:zc', [2, null], 'YMemberPath:yv:zd', [2, null]]); return ScatterTriangulationSeries; })();