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.xr = null; _this.xs = null; _this.x0 = false; _this.xn = null; _this.triangulationStatusChanged = null; _this.x3 = null; _this.xo = null; _this.xp = null; _this.xq = null; return _this; } ScatterTriangulationSeries.prototype.pg = function () { _super.prototype.pg.call(this); this.xk = null; this.xl = null; }; ScatterTriangulationSeries.prototype.k0 = function (a, b) { var c = this.np(b); if (c == ScatterTriangulationSeries.$$p[8]) { return this.k1(a, b, this.ym); } if (c == ScatterTriangulationSeries.$$p[12]) { return this.k1(a, b, this.yu); } return _super.prototype.k0.call(this, a, b); }; ScatterTriangulationSeries.prototype.mp = function (a) { var b = this.np(a); if (b == ScatterTriangulationSeries.$$p[8]) { return this.ym; } if (b == ScatterTriangulationSeries.$$p[12]) { return this.yu; } return _super.prototype.mp.call(this, a); }; 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("XColumn", c, this.xx); } }, enumerable: false, configurable: true }); 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("YColumn", c, this.xy); } }, enumerable: false, configurable: true }); ScatterTriangulationSeries.prototype.sa = function (a) { var b = this.dp != null && this.xz == null && this.x3 == null && this.xx != null && this.xy != null && this.xx.count >= 3 && this.xy.count >= 3 && !this.x0; if (b) { this.yy(); this.x0 = true; } }; ScatterTriangulationSeries.prototype.yy = function () { this.xn = new Triangulator(this.dp.count, this.xx, this.xy); var a = this.xn; a.triangulationStatusChanged = delegateCombine(a.triangulationStatusChanged, runOn(this, this.yz)); this.xn.y(); }; ScatterTriangulationSeries.prototype.yw = function () { if (this.xn == null) { return; } this.xn.r(); var a = this.xn; a.triangulationStatusChanged = delegateRemove(a.triangulationStatusChanged, runOn(this, this.yz)); this.xn = null; }; ScatterTriangulationSeries.prototype.yz = function (a, b) { var _this = this; if (this.triangulationStatusChanged != null) { this.triangulationStatusChanged(this, new TriangulationStatusEventArgs(b.currentStatus)); } if (b.currentStatus >= 100) { if (this.xn == null) { return; } var c = this.xn; c.triangulationStatusChanged = delegateRemove(c.triangulationStatusChanged, runOn(this, this.yz)); this.x3 = this.xn.n(); this.xn = null; var d = ((function () { var $ret = new FastItemsSource(); $ret.e = _this.x3; return $ret; })()); this.xu = this.xt(d, "v1"); this.xv = this.xt(d, "v2"); this.xw = this.xt(d, "v3"); this.r9(false); } }; ScatterTriangulationSeries.prototype.xt = 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.rr = function (a, b, c, d) { var _this = this; _super.prototype.rr.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.qv(); break; case "FastItemsSource": var e = typeCast(IFastItemsSource_$type, c); if (e != null) { e.deregisterColumn(this.xx); e.deregisterColumn(this.xy); this.xx = null; this.xy = null; } this.yx(); var f = typeCast(IFastItemsSource_$type, d); if (f != null) { this.xx = this.dl(this.ym); this.xy = this.dl(this.yu); } this.r9(this.gn && c != null); break; case ScatterTriangulationSeries.$$p[8]: if (this.dp != null) { this.dp.deregisterColumn(this.xx); this.xx = this.dl(this.ym); } this.yx(); this.r9(false); this.q1(); break; case ScatterTriangulationSeries.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.xy); this.xy = this.dl(this.yu); } this.yx(); this.r9(false); this.q1(); break; case ScatterTriangulationSeries.$$p[5]: if (c != null) { (typeCast(Axis.$, c)).cx(this); } if (d != null) { (typeCast(Axis.$, d)).d4(this); } if ((this.xk != null && !this.xk.ee()) || (d == null && c != null)) { this.r9(false); } this.q1(); break; case ScatterTriangulationSeries.$$p[9]: 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.r9(false); } this.q1(); break; case ScatterTriangulationSeries.$$p[4]: if (this.trianglesSource != null) { this.yw(); this.xz = ((function () { var $ret = new FastItemsSource(); $ret.e = _this.trianglesSource; return $ret; })()); } else { this.xz = null; } break; case ScatterTriangulationSeries.$$p[0]: var g = typeCast(IFastItemsSource_$type, c); if (g != null) { g.deregisterColumn(this.xu); g.deregisterColumn(this.xv); g.deregisterColumn(this.xw); this.xu = null; this.xv = null; this.xw = null; } var h = typeCast(IFastItemsSource_$type, d); if (h != null) { this.xu = this.xt(h, this.ya); this.xv = this.xt(h, this.yc); this.xw = this.xt(h, this.ye); } this.r9(false); this.q1(); break; case ScatterTriangulationSeries.$$p[1]: if (this.xz != null) { this.xz.deregisterColumn(this.xu); this.xu = this.xt(this.xz, this.ya); } this.r9(false); this.q1(); break; case ScatterTriangulationSeries.$$p[2]: if (this.xz != null) { this.xz.deregisterColumn(this.xv); this.xv = this.xt(this.xz, this.yc); } this.r9(false); this.q1(); break; case ScatterTriangulationSeries.$$p[3]: if (this.xz != null) { this.xz.deregisterColumn(this.xw); this.xw = this.xt(this.xz, this.ye); } this.r9(false); this.q1(); break; case "XColumn": if (this.xk != null) { this.xk.ee(); } break; case "YColumn": if (this.xl != null) { this.xl.ee(); } break; } }; ScatterTriangulationSeries.prototype.x2 = function (a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; }; ScatterTriangulationSeries.prototype.x1 = function (a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; }; ScatterTriangulationSeries.prototype.hl = function (a, b, c) { return _super.prototype.hl.call(this, a, b, c) && this.dp != null && this.xk != null && this.xl != null && this.xk.b7 != null && this.xl.b7 != null && a.width > 0 && a.height > 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 && this.xy != null && this.xy.count > 0; }; ScatterTriangulationSeries.prototype.yx = function () { if (this.trianglesSource == null) { this.x3 = null; this.xu = null; this.xv = null; this.xw = null; this.x0 = false; } }; ScatterTriangulationSeries.prototype.qq = function () { _super.prototype.qq.call(this); if (this.xk != null) { this.xk.lz(); } if (this.xl != null) { this.xl.lz(); } }; ScatterTriangulationSeries.prototype.pp = function (a, b, c, d) { _super.prototype.pp.call(this, a, b, c, d); this.yx(); this.r9(false); }; ScatterTriangulationSeries.prototype.ay = function (a) { if (a != null && a == this.xk && this.xx != null) { return new AxisRange(this.xx.minimum, this.xx.maximum); } if (a != null && a == this.xl && this.xy != null) { return new AxisRange(this.xy.minimum, this.xy.maximum); } return null; }; ScatterTriangulationSeries.prototype.ta = function (a, b) { this.r9(false); }; ScatterTriangulationSeries.prototype.s9 = function (a, b) { this.r9(false); }; 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("TriangleVertexColumn1", 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("TriangleVertexColumn2", 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("TriangleVertexColumn3", c, this.xw); } }, 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.kx(c); var e = d == null ? NaN : this.i5(d, "XMemberPath"); var f = d == null ? NaN : this.i5(d, "YMemberPath"); var g = new DataLegendSeriesValueInfo(); g.l = e; g.a = 13; g.q = "X"; g.r = this.ym != null ? this.ym : "X"; g.s = this.yi != null ? this.yi : "X:"; g.t = this.yk != null ? this.yk : ""; var h = new DataLegendSeriesValueInfo(); h.l = f; h.a = 14; h.q = "Y"; h.r = this.yu != null ? this.yu : "Y"; h.s = this.yq != null ? this.yq : "Y:"; h.t = this.ys != null ? this.ys : ""; 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.mo(); return i; }; ScatterTriangulationSeries.$t = markType(ScatterTriangulationSeries, 'ScatterTriangulationSeries', Series.$); ScatterTriangulationSeries.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterTriangulationSeries, 'raisePropertyChanged', ['FastTrianglesSource:xz:y0', [IFastItemsSource_$type, null], 'TriangleVertexMemberPath1:ya:y2', [2, null], 'TriangleVertexMemberPath2:yc:y3', [2, null], 'TriangleVertexMemberPath3:ye:y4', [2, null], 'TrianglesSource::y1', [IEnumerable_$type, null], 'XAxis:xk:y5', [NumericXAxis.$, null], 'XMemberAsLegendLabel:yi:y6', [2, null], 'XMemberAsLegendUnit:yk:y7', [2, null], 'XMemberPath:ym:y8', [2, null], 'YAxis:xl:y9', [NumericYAxis.$, null], 'YMemberAsLegendLabel:yq:za', [2, null], 'YMemberAsLegendUnit:ys:zb', [2, null], 'YMemberPath:yu:zc', [2, null]]); return ScatterTriangulationSeries; }(Series)); export { ScatterTriangulationSeries };