UNPKG

igniteui-react-charts

Version:

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

426 lines (425 loc) 16.4 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 } 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 !== null && _super.apply(this, arguments) || this; _this.xa = null; _this.xb = null; _this.xj = false; _this.w6 = null; _this.triangulationStatusChanged = null; _this.xm = null; _this.w7 = null; _this.w8 = null; _this.w9 = null; return _this; } ScatterTriangulationSeries.prototype.o4 = function () { _super.prototype.o4.call(this); this.w3 = null; this.w4 = null; }; ScatterTriangulationSeries.prototype.kr = function (a, b) { var c = this.nf(b); if (c == ScatterTriangulationSeries.$$p[8]) { return this.ks(a, b, this.x5); } if (c == ScatterTriangulationSeries.$$p[12]) { return this.ks(a, b, this.yd); } return _super.prototype.kr.call(this, a, b); }; ScatterTriangulationSeries.prototype.mf = function (a) { var b = this.nf(a); if (b == ScatterTriangulationSeries.$$p[8]) { return this.x5; } if (b == ScatterTriangulationSeries.$$p[12]) { return this.yd; } return _super.prototype.mf.call(this, a); }; Object.defineProperty(ScatterTriangulationSeries.prototype, "xg", { get: function () { return this.xa; }, set: function (a) { var b = this.xg != a; if (b) { var c = this.xg; this.xa = a; this.raisePropertyChanged("XColumn", c, this.xg); } }, enumerable: false, configurable: true }); Object.defineProperty(ScatterTriangulationSeries.prototype, "xh", { get: function () { return this.xb; }, set: function (a) { var b = this.xh != a; if (b) { var c = this.xh; this.xb = a; this.raisePropertyChanged("YColumn", c, this.xh); } }, enumerable: false, configurable: true }); ScatterTriangulationSeries.prototype.rv = function (a) { var b = this.dp != null && this.xi == null && this.xm == null && this.xg != null && this.xh != null && this.xg.count >= 3 && this.xh.count >= 3 && !this.xj; if (b) { this.yh(); this.xj = true; } }; ScatterTriangulationSeries.prototype.yh = function () { this.w6 = new Triangulator(this.dp.count, this.xg, this.xh); var a = this.w6; a.triangulationStatusChanged = delegateCombine(a.triangulationStatusChanged, runOn(this, this.yi)); this.w6.y(); }; ScatterTriangulationSeries.prototype.yf = function () { if (this.w6 == null) { return; } this.w6.r(); var a = this.w6; a.triangulationStatusChanged = delegateRemove(a.triangulationStatusChanged, runOn(this, this.yi)); this.w6 = null; }; ScatterTriangulationSeries.prototype.yi = function (a, b) { var _this = this; if (this.triangulationStatusChanged != null) { this.triangulationStatusChanged(this, new TriangulationStatusEventArgs(b.currentStatus)); } if (b.currentStatus >= 100) { if (this.w6 == null) { return; } var c = this.w6; c.triangulationStatusChanged = delegateRemove(c.triangulationStatusChanged, runOn(this, this.yi)); this.xm = this.w6.n(); this.w6 = null; var d = ((function () { var $ret = new FastItemsSource(); $ret.e = _this.xm; return $ret; })()); this.xd = this.xc(d, "v1"); this.xe = this.xc(d, "v2"); this.xf = this.xc(d, "v3"); this.ru(false); } }; ScatterTriangulationSeries.prototype.xc = function (a, b) { if (b == null) { return a.registerColumnInt(null, null, false); } var c = null; var d = SeriesViewer.cv(b, this.coercionMethods); c = d.a; return a.registerColumnInt(b, c, this.expectFunctions); }; ScatterTriangulationSeries.prototype.rc = function (a, b, c, d) { var _this = this; _super.prototype.rc.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.qh(); break; case "FastItemsSource": var e = typeCast(IFastItemsSource_$type, c); if (e != null) { e.deregisterColumn(this.xg); e.deregisterColumn(this.xh); this.xg = null; this.xh = null; } this.yg(); var f = typeCast(IFastItemsSource_$type, d); if (f != null) { this.xg = this.dl(this.x5); this.xh = this.dl(this.yd); } this.ru(this.gh && c != null); break; case ScatterTriangulationSeries.$$p[8]: if (this.dp != null) { this.dp.deregisterColumn(this.xg); this.xg = this.dl(this.x5); } this.yg(); this.ru(false); this.qn(); break; case ScatterTriangulationSeries.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.xh); this.xh = this.dl(this.yd); } this.yg(); this.ru(false); this.qn(); break; case ScatterTriangulationSeries.$$p[5]: if (c != null) { (typeCast(Axis.$, c)).b0(this); } if (d != null) { (typeCast(Axis.$, d)).ct(this); } if ((this.w3 != null && !this.w3.c1()) || (d == null && c != null)) { this.ru(false); } this.qn(); break; case ScatterTriangulationSeries.$$p[9]: if (c != null) { (typeCast(Axis.$, c)).b0(this); } if (d != null) { (typeCast(Axis.$, d)).ct(this); } if ((this.w4 != null && !this.w4.c1()) || (d == null && c != null)) { this.ru(false); } this.qn(); break; case ScatterTriangulationSeries.$$p[4]: if (this.trianglesSource != null) { this.yf(); this.xi = ((function () { var $ret = new FastItemsSource(); $ret.e = _this.trianglesSource; return $ret; })()); } else { this.xi = null; } break; case ScatterTriangulationSeries.$$p[0]: var g = typeCast(IFastItemsSource_$type, c); if (g != null) { g.deregisterColumn(this.xd); g.deregisterColumn(this.xe); g.deregisterColumn(this.xf); this.xd = null; this.xe = null; this.xf = null; } var h = typeCast(IFastItemsSource_$type, d); if (h != null) { this.xd = this.xc(h, this.xt); this.xe = this.xc(h, this.xv); this.xf = this.xc(h, this.xx); } this.ru(false); this.qn(); break; case ScatterTriangulationSeries.$$p[1]: if (this.xi != null) { this.xi.deregisterColumn(this.xd); this.xd = this.xc(this.xi, this.xt); } this.ru(false); this.qn(); break; case ScatterTriangulationSeries.$$p[2]: if (this.xi != null) { this.xi.deregisterColumn(this.xe); this.xe = this.xc(this.xi, this.xv); } this.ru(false); this.qn(); break; case ScatterTriangulationSeries.$$p[3]: if (this.xi != null) { this.xi.deregisterColumn(this.xf); this.xf = this.xc(this.xi, this.xx); } this.ru(false); this.qn(); break; case "XColumn": if (this.w3 != null) { this.w3.c1(); } break; case "YColumn": if (this.w4 != null) { this.w4.c1(); } break; } }; ScatterTriangulationSeries.prototype.xl = function (a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; }; ScatterTriangulationSeries.prototype.xk = function (a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; }; ScatterTriangulationSeries.prototype.hf = function (a, b, c) { return _super.prototype.hf.call(this, a, b, c) && this.dp != null && this.w3 != null && this.w4 != null && this.w3.bi != null && this.w4.bi != null && a.width > 0 && a.height > 0 && this.xd != null && this.xd.count > 0 && this.xe != null && this.xe.count > 0 && this.xf != null && this.xf.count > 0 && this.xg != null && this.xg.count > 0 && this.xh != null && this.xh.count > 0; }; ScatterTriangulationSeries.prototype.yg = function () { if (this.trianglesSource == null) { this.xm = null; this.xd = null; this.xe = null; this.xf = null; this.xj = false; } }; ScatterTriangulationSeries.prototype.qd = function () { _super.prototype.qd.call(this); if (this.w3 != null) { this.w3.ia(); } if (this.w4 != null) { this.w4.ia(); } }; ScatterTriangulationSeries.prototype.pd = function (a, b, c, d) { _super.prototype.pd.call(this, a, b, c, d); this.yg(); this.ru(false); }; ScatterTriangulationSeries.prototype.ay = function (a) { if (a != null && a == this.w3 && this.xg != null) { return new AxisRange(this.xg.minimum, this.xg.maximum); } if (a != null && a == this.w4 && this.xh != null) { return new AxisRange(this.xh.minimum, this.xh.maximum); } return null; }; ScatterTriangulationSeries.prototype.sv = function (a, b) { this.ru(false); }; ScatterTriangulationSeries.prototype.su = function (a, b) { this.ru(false); }; Object.defineProperty(ScatterTriangulationSeries.prototype, "xd", { get: function () { return this.w7; }, set: function (a) { var b = this.xd != a; if (b) { var c = this.xd; this.w7 = a; this.raisePropertyChanged("TriangleVertexColumn1", c, this.xd); } }, enumerable: false, configurable: true }); Object.defineProperty(ScatterTriangulationSeries.prototype, "xe", { get: function () { return this.w8; }, set: function (a) { var b = this.xe != a; if (b) { var c = this.xe; this.w8 = a; this.raisePropertyChanged("TriangleVertexColumn2", c, this.xe); } }, enumerable: false, configurable: true }); Object.defineProperty(ScatterTriangulationSeries.prototype, "xf", { get: function () { return this.w9; }, set: function (a) { var b = this.xf != a; if (b) { var c = this.xf; this.w9 = a; this.raisePropertyChanged("TriangleVertexColumn3", c, this.xf); } }, enumerable: false, configurable: true }); ScatterTriangulationSeries.prototype.get_fy = function () { return true; }; ScatterTriangulationSeries.prototype.get_fm = function () { return true; }; ScatterTriangulationSeries.prototype.getDataLegendSeriesContextAt = function (a, b) { var c = { $type: Point_$type, x: a, y: b }; var d = this.ko(c); var e = d == null ? NaN : this.iy(d, "XMemberPath"); var f = d == null ? NaN : this.iy(d, "YMemberPath"); var g = new DataLegendSeriesValueInfo(); g.l = e; g.a = 13; g.q = "X"; g.r = this.x5 != null ? this.x5 : "X"; g.s = this.x1 != null ? this.x1 : "X:"; g.t = this.x3 != null ? this.x3 : ""; var h = new DataLegendSeriesValueInfo(); h.l = f; h.a = 14; h.q = "Y"; h.r = this.yd != null ? this.yd : "Y"; h.s = this.x9 != null ? this.x9 : "Y:"; h.t = this.yb != null ? this.yb : ""; 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.me(); return i; }; ScatterTriangulationSeries.$t = markType(ScatterTriangulationSeries, 'ScatterTriangulationSeries', Series.$); ScatterTriangulationSeries.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterTriangulationSeries, 'raisePropertyChanged', ['FastTrianglesSource:xi:yj', [IFastItemsSource_$type, null], 'TriangleVertexMemberPath1:xt:yl', [2, null], 'TriangleVertexMemberPath2:xv:ym', [2, null], 'TriangleVertexMemberPath3:xx:yn', [2, null], 'TrianglesSource::yk', [IEnumerable_$type, null], 'XAxis:w3:yo', [NumericXAxis.$, null], 'XMemberAsLegendLabel:x1:yp', [2, null], 'XMemberAsLegendUnit:x3:yq', [2, null], 'XMemberPath:x5:yr', [2, null], 'YAxis:w4:ys', [NumericYAxis.$, null], 'YMemberAsLegendLabel:x9:yt', [2, null], 'YMemberAsLegendUnit:yb:yu', [2, null], 'YMemberPath:yd:yv', [2, null]]); return ScatterTriangulationSeries; }(Series)); export { ScatterTriangulationSeries };