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.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; return _this; } ScatterTriangulationSeries.prototype.pf = function () { _super.prototype.pf.call(this); this.xj = null; this.xk = null; }; ScatterTriangulationSeries.prototype.kz = function (a, b) { var 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.prototype.kz.call(this, a, b); }; ScatterTriangulationSeries.prototype.mo = function (a) { var b = this.no(a); if (b == ScatterTriangulationSeries.$$p[8]) { return this.yl; } if (b == ScatterTriangulationSeries.$$p[12]) { return this.yt; } return _super.prototype.mo.call(this, a); }; 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("XColumn", 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("YColumn", c, this.xx); } }, enumerable: false, configurable: true }); ScatterTriangulationSeries.prototype.r9 = function (a) { var 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; } }; ScatterTriangulationSeries.prototype.yx = function () { this.xm = new Triangulator(this.dp.count, this.xw, this.xx); var a = this.xm; a.triangulationStatusChanged = delegateCombine(a.triangulationStatusChanged, runOn(this, this.yy)); this.xm.y(); }; ScatterTriangulationSeries.prototype.yv = function () { if (this.xm == null) { return; } this.xm.r(); var a = this.xm; a.triangulationStatusChanged = delegateRemove(a.triangulationStatusChanged, runOn(this, this.yy)); this.xm = null; }; ScatterTriangulationSeries.prototype.yy = function (a, b) { var _this = this; if (this.triangulationStatusChanged != null) { this.triangulationStatusChanged(this, new TriangulationStatusEventArgs(b.currentStatus)); } if (b.currentStatus >= 100) { if (this.xm == null) { return; } var c = this.xm; c.triangulationStatusChanged = delegateRemove(c.triangulationStatusChanged, runOn(this, this.yy)); this.x2 = this.xm.n(); this.xm = null; var d = ((function () { var $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); } }; ScatterTriangulationSeries.prototype.xs = 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.rq = function (a, b, c, d) { var _this = this; _super.prototype.rq.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.qu(); break; case "FastItemsSource": var e = typeCast(IFastItemsSource_$type, c); if (e != null) { e.deregisterColumn(this.xw); e.deregisterColumn(this.xx); this.xw = null; this.xx = null; } this.yw(); var 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 = ((function () { var $ret = new FastItemsSource(); $ret.e = _this.trianglesSource; return $ret; })()); } else { this.xy = null; } break; case ScatterTriangulationSeries.$$p[0]: var 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; } var 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; } }; ScatterTriangulationSeries.prototype.x1 = function (a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; }; ScatterTriangulationSeries.prototype.x0 = function (a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; }; ScatterTriangulationSeries.prototype.hk = function (a, b, c) { return _super.prototype.hk.call(this, 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; }; ScatterTriangulationSeries.prototype.yw = function () { if (this.trianglesSource == null) { this.x2 = null; this.xt = null; this.xu = null; this.xv = null; this.xz = false; } }; ScatterTriangulationSeries.prototype.qp = function () { _super.prototype.qp.call(this); if (this.xj != null) { this.xj.lx(); } if (this.xk != null) { this.xk.lx(); } }; ScatterTriangulationSeries.prototype.po = function (a, b, c, d) { _super.prototype.po.call(this, a, b, c, d); this.yw(); this.r8(false); }; ScatterTriangulationSeries.prototype.ay = function (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; }; ScatterTriangulationSeries.prototype.s9 = function (a, b) { this.r8(false); }; ScatterTriangulationSeries.prototype.s8 = function (a, b) { this.r8(false); }; Object.defineProperty(ScatterTriangulationSeries.prototype, "xt", { get: function () { return this.xn; }, set: function (a) { var b = this.xt != a; if (b) { var c = this.xt; this.xn = a; this.raisePropertyChanged("TriangleVertexColumn1", c, this.xt); } }, enumerable: false, configurable: true }); Object.defineProperty(ScatterTriangulationSeries.prototype, "xu", { get: function () { return this.xo; }, set: function (a) { var b = this.xu != a; if (b) { var c = this.xu; this.xo = a; this.raisePropertyChanged("TriangleVertexColumn2", c, this.xu); } }, enumerable: false, configurable: true }); 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("TriangleVertexColumn3", c, this.xv); } }, enumerable: false, configurable: true }); ScatterTriangulationSeries.prototype.get_f0 = function () { return true; }; ScatterTriangulationSeries.prototype.get_fo = function () { return true; }; ScatterTriangulationSeries.prototype.getDataLegendSeriesContextAt = function (a, b) { var c = { $type: Point_$type, x: a, y: b }; var d = this.kw(c); var e = d == null ? NaN : this.i4(d, "XMemberPath"); var f = d == null ? NaN : this.i4(d, "YMemberPath"); var 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 : ""; var 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 : ""; 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.mn(); return i; }; ScatterTriangulationSeries.$t = markType(ScatterTriangulationSeries, 'ScatterTriangulationSeries', Series.$); ScatterTriangulationSeries.$$p = 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; }(Series)); export { ScatterTriangulationSeries };