UNPKG

igniteui-react-charts

Version:

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

426 lines (425 loc) 16.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 { __extends, __read, __spreadArray } from "tslib"; 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 */ var ScatterTriangulationSeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ScatterTriangulationSeries, _super); function ScatterTriangulationSeries() { var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this; _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; return _this; } ScatterTriangulationSeries.prototype.ph = function () { _super.prototype.ph.call(this); this.xl = null; this.xm = null; }; ScatterTriangulationSeries.prototype.k1 = function (a, b) { var 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.prototype.k1.call(this, a, b); }; ScatterTriangulationSeries.prototype.mq = function (a) { var b = this.nq(a); if (b == ScatterTriangulationSeries.$$p[8]) { return this.yn; } if (b == ScatterTriangulationSeries.$$p[12]) { return this.yv; } return _super.prototype.mq.call(this, a); }; Object.defineProperty(ScatterTriangulationSeries.prototype, "xy", { get: function () { return this.xs; }, set: function (a) { var b = this.xy != a; if (b) { var c = this.xy; this.xs = a; this.raisePropertyChanged("XColumn", c, this.xy); } }, enumerable: false, configurable: true }); Object.defineProperty(ScatterTriangulationSeries.prototype, "xz", { get: function () { return this.xt; }, set: function (a) { var b = this.xz != a; if (b) { var c = this.xz; this.xt = a; this.raisePropertyChanged("YColumn", c, this.xz); } }, enumerable: false, configurable: true }); ScatterTriangulationSeries.prototype.sb = function (a) { var 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; } }; ScatterTriangulationSeries.prototype.yz = function () { this.xo = new Triangulator(this.dp.count, this.xy, this.xz); var a = this.xo; a.triangulationStatusChanged = delegateCombine(a.triangulationStatusChanged, runOn(this, this.y0)); this.xo.y(); }; ScatterTriangulationSeries.prototype.yx = function () { if (this.xo == null) { return; } this.xo.r(); var a = this.xo; a.triangulationStatusChanged = delegateRemove(a.triangulationStatusChanged, runOn(this, this.y0)); this.xo = null; }; ScatterTriangulationSeries.prototype.y0 = function (a, b) { var _this = this; if (this.triangulationStatusChanged != null) { this.triangulationStatusChanged(this, new TriangulationStatusEventArgs(b.currentStatus)); } if (b.currentStatus >= 100) { if (this.xo == null) { return; } var c = this.xo; c.triangulationStatusChanged = delegateRemove(c.triangulationStatusChanged, runOn(this, this.y0)); this.x4 = this.xo.n(); this.xo = null; var d = ((function () { var $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); } }; ScatterTriangulationSeries.prototype.xu = function (a, b) { if (b == null) { return a.registerColumnInt(null, null, false); } var c = null; var d = SeriesViewer.de(b, this.coercionMethods); c = d.a; return a.registerColumnInt(b, c, this.expectFunctions); }; ScatterTriangulationSeries.prototype.rs = function (a, b, c, d) { var _this = this; _super.prototype.rs.call(this, 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": var e = typeCast(IFastItemsSource_$type, c); if (e != null) { e.deregisterColumn(this.xy); e.deregisterColumn(this.xz); this.xy = null; this.xz = null; } this.yy(); var 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 = ((function () { var $ret = new FastItemsSource(); $ret.e = _this.trianglesSource; return $ret; })()); } else { this.x0 = null; } break; case ScatterTriangulationSeries.$$p[0]: var 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; } var 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; } }; ScatterTriangulationSeries.prototype.x3 = function (a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; }; ScatterTriangulationSeries.prototype.x2 = function (a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; }; ScatterTriangulationSeries.prototype.hm = function (a, b, c) { return _super.prototype.hm.call(this, 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; }; ScatterTriangulationSeries.prototype.yy = function () { if (this.trianglesSource == null) { this.x4 = null; this.xv = null; this.xw = null; this.xx = null; this.x1 = false; } }; ScatterTriangulationSeries.prototype.qr = function () { _super.prototype.qr.call(this); if (this.xl != null) { this.xl.lz(); } if (this.xm != null) { this.xm.lz(); } }; ScatterTriangulationSeries.prototype.pq = function (a, b, c, d) { _super.prototype.pq.call(this, a, b, c, d); this.yy(); this.sa(false); }; ScatterTriangulationSeries.prototype.ay = function (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; }; ScatterTriangulationSeries.prototype.tb = function (a, b) { this.sa(false); }; ScatterTriangulationSeries.prototype.ta = function (a, b) { this.sa(false); }; Object.defineProperty(ScatterTriangulationSeries.prototype, "xv", { get: function () { return this.xp; }, set: function (a) { var b = this.xv != a; if (b) { var c = this.xv; this.xp = a; this.raisePropertyChanged("TriangleVertexColumn1", c, this.xv); } }, enumerable: false, configurable: true }); Object.defineProperty(ScatterTriangulationSeries.prototype, "xw", { get: function () { return this.xq; }, set: function (a) { var b = this.xw != a; if (b) { var c = this.xw; this.xq = a; this.raisePropertyChanged("TriangleVertexColumn2", c, this.xw); } }, enumerable: false, configurable: true }); Object.defineProperty(ScatterTriangulationSeries.prototype, "xx", { get: function () { return this.xr; }, set: function (a) { var b = this.xx != a; if (b) { var c = this.xx; this.xr = a; this.raisePropertyChanged("TriangleVertexColumn3", c, this.xx); } }, enumerable: false, configurable: true }); ScatterTriangulationSeries.prototype.get_f1 = function () { return true; }; ScatterTriangulationSeries.prototype.get_fp = function () { return true; }; ScatterTriangulationSeries.prototype.getDataLegendSeriesContextAt = function (a, b) { var c = { $type: Point_$type, x: a, y: b }; var d = this.ky(c); var e = d == null ? NaN : this.i6(d, "XMemberPath"); var f = d == null ? NaN : this.i6(d, "YMemberPath"); var 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 : ""; var 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 : ""; var i = new DataLegendSeriesContext(); i.e = ((function () { var $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(g); $ret.add(h); return $ret; })()); i.h = this.mp(); return i; }; ScatterTriangulationSeries.$t = markType(ScatterTriangulationSeries, 'ScatterTriangulationSeries', Series.$); ScatterTriangulationSeries.$$p = 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; }(Series)); export { ScatterTriangulationSeries };