UNPKG

igniteui-react-charts

Version:

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

1,491 lines 77.8 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, __values } from "tslib"; import { MarkerSeries } from "./MarkerSeries"; import { ISupportsErrorBars_$type } from "./ISupportsErrorBars"; import { ITrendLineSeries_$type } from "./ITrendLineSeries"; import { ScatterAxisInfoCache } from "./ScatterAxisInfoCache"; import { NumericXAxis } from "./NumericXAxis"; import { DependencyProperty } from "igniteui-react-core"; import { NumericYAxis } from "./NumericYAxis"; import { Series } from "./Series"; import { TrendLineType_$type } from "igniteui-react-core"; import { Brush } from "igniteui-react-core"; import { PenLineCap_$type } from "igniteui-react-core"; import { DoubleCollection } from "igniteui-react-core"; import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType"; import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode"; import { ScatterErrorBarSettings } from "./ScatterErrorBarSettings"; import { HighlightingInfo } from "igniteui-react-core"; import { ScatterFrame } from "./ScatterFrame"; import { Base, runOn, delegateCombine, enumGetBox, Number_$type, typeCast, fromEnum, Point_$type, markType, markDep, PointUtil } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { SeriesPointOfInterest } from "./SeriesPointOfInterest"; import { ScalerParams } from "./ScalerParams"; import { Rect } from "igniteui-react-core"; import { Marker } from "./Marker"; import { MarkerSeriesView } from "./MarkerSeriesView"; import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay"; import { IFastItemsSource_$type } from "igniteui-react-core"; import { Clipper } from "igniteui-react-core"; import { OwnedPoint } from "./OwnedPoint"; import { Dictionary$2 } from "igniteui-react-core"; import { AxisRange } from "./AxisRange"; import { CoreGeometryUtil } from "igniteui-react-core"; import { GeometryUtil } from "igniteui-react-core"; import { HashPool$2 } from "igniteui-react-core"; import { DataContext } from "igniteui-react-core"; import { ScatterTrendLineManager } from "./ScatterTrendLineManager"; import { TrendResolutionParams } from "./TrendResolutionParams"; import { Thickness } from "igniteui-react-core"; import { Size } from "igniteui-react-core"; import { AssigningScatterStyleEventArgs } from "./AssigningScatterStyleEventArgs"; import { AssigningScatterMarkerStyleEventArgs } from "./AssigningScatterMarkerStyleEventArgs"; import { ChartSelection } from "./ChartSelection"; import { SeriesRenderManager } from "./SeriesRenderManager"; import { ErrorBarsHelper } from "./ErrorBarsHelper"; import { PathGeometry } from "igniteui-react-core"; import { DataLegendSeriesValueInfo } from "igniteui-react-core"; import { DataLegendSeriesContext } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; import { truncate, isNaN_, isInfinity } from "igniteui-react-core"; import { boxArray$1, arrayShallowClone } from "igniteui-react-core"; import { Path } from "igniteui-react-core"; import { DataTemplateMeasureInfo } from "igniteui-react-core"; import { NumericMarkerManager } from "./NumericMarkerManager"; import { stringIsNullOrEmpty } from "igniteui-react-core"; /** * @hidden */ var ScatterBase = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ScatterBase, _super); function ScatterBase() { var _this = _super.call(this) || this; _this.zm = null; _this.z5 = null; _this.z6 = null; _this.adb = null; _this.adc = null; _this.zv = 1; _this.zc = null; _this.zd = null; _this.zs = null; _this.zu = null; _this.zq = null; _this.aab = false; _this.aaa = false; _this.z3 = null; _this.z4 = null; _this.assigningScatterStyle = null; _this.assigningScatterMarkerStyle = null; _this.zz = null; _this.zt = null; _this.zp = null; _this.z9 = true; _this.aao = 0; _this.aap = 0; _this.aaq = 0; _this.aar = 0; _this.zw = _this.zx(); _this.zz = new ScatterSeriesRenderManager(); _this.zt = new ScatterFrame(); _this.adc = Rect.empty; _this.adb = Rect.empty; return _this; } ScatterBase.prototype.ct = function () { return new ScatterBaseView(this); }; ScatterBase.prototype.ph = function () { _super.prototype.ph.call(this); this.xAxis = null; this.yAxis = null; }; ScatterBase.prototype.rj = function (a) { _super.prototype.rj.call(this, a); this.zn = a; }; ScatterBase.prototype.get_f0 = function () { return true; }; ScatterBase.prototype.ai = function () { return [this.xAxis, this.yAxis]; }; ScatterBase.prototype.k1 = function (a, b) { var c = this.nq(b); if (c == ScatterBase.$$p[12]) { return this.k2(a, b, this.abj); } if (c == ScatterBase.$$p[16]) { return this.k2(a, b, this.abr); } if (c == ScatterBase.$$p[1]) { return this.k2(a, b, this.aa3); } if (c == ScatterBase.$$p[2]) { return this.k2(a, b, this.aa5); } return null; }; ScatterBase.prototype.mq = function (a) { var b = this.nq(a); if (b == ScatterBase.$$p[12]) { return this.abj; } if (b == ScatterBase.$$p[16]) { return this.abr; } if (b == ScatterBase.$$p[1]) { return this.aa3; } if (b == ScatterBase.$$p[2]) { return this.aa5; } return _super.prototype.mq.call(this, a); }; ScatterBase.prototype.ed = function (a, b, c, d, e) { var _this = this; if (!this.hasMarkers) { return false; } var f = this.xAxis; var g = new ScalerParams(1, this.dc.yv, this.xf, f.dn); g.c = this.getEffectiveViewport1(this.cw); var h = this.yAxis; var i = new ScalerParams(1, this.dc.yv, this.xf, h.dn); i.c = this.getEffectiveViewport1(this.cw); a.clear(); this.xt.cw(function (j) { if (j._visibility == 0) { var k = new SeriesPointOfInterest(); var l = j.n; var m = j.o; if (!e && (l < _this.xf.left || l > _this.xf.right || m < _this.xf.top || m > _this.xf.bottom)) { return; } k.d = f.ga(l, g); k.e = h.ga(m, i); k.b = j.content; k.g = _this.v2; k.c = j.al; if (_this.hh) { k.g = _this.v9(j.al); } a.add(k); } }); return true; }; ScatterBase.prototype.b3 = function () { if (this.b4 == 0) { { return 1; } } else { return _super.prototype.b3.call(this); } }; ScatterBase.prototype.xc = function (a) { if (!this.hasMarkers || !this.x3()) { return Rect.empty; } var b = this.xt.ce(this.wt(a)); if (b != null) { return this.xt.c7(b); } return Rect.empty; }; ScatterBase.prototype.g4 = function (a, b) { if (this.x4(a, b)) { return true; } return false; }; Object.defineProperty(ScatterBase.prototype, "z7", { get: function () { return this.z5; }, set: function (a) { if (this.z5 != a) { var b = this.z7; this.z5 = a; this.raisePropertyChanged("XColumn", b, this.z7); } }, enumerable: false, configurable: true }); Object.defineProperty(ScatterBase.prototype, "z8", { get: function () { return this.z6; }, set: function (a) { if (this.z6 != a) { var b = this.z8; this.z6 = a; this.raisePropertyChanged("YColumn", b, this.z8); } }, enumerable: false, configurable: true }); ScatterBase.prototype.gj = function () { return this.highlightedItemsSource != null || (this.aa3 != null && this.aa5 != null); }; ScatterBase.prototype.aam = function () { return false; }; ScatterBase.prototype.h1 = function () { var a = _super.prototype.h1.call(this); { var b = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.ad = "YMemberPath"; $ret.p = true; $ret.y = "HighlightedYMemberPath"; $ret.q = true; return $ret; })()); b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.abz)); a.add(b); } { var c = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.ad = "XMemberPath"; $ret.p = true; $ret.y = "HighlightedXMemberPath"; $ret.q = true; return $ret; })()); c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.aby)); a.add(c); } if (this.aam()) { var d = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "DashArray"; $ret.p = true; $ret.x = ((function () { var $ret = new DoubleCollection(); $ret.add(5); $ret.add(5); return $ret; })()); $ret.q = true; return $ret; })()); a.add(d); } if (!this.aam()) { var e = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "Brush"; $ret.p = true; $ret.y = "ActualBrush"; $ret.q = true; return $ret; })()); e.valueResolving = delegateCombine(e.valueResolving, runOn(this, this.sk)); a.add(e); } if (!this.aam()) { var f = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "Outline"; $ret.p = true; $ret.y = "ActualOutline"; $ret.q = true; return $ret; })()); f.valueResolving = delegateCombine(f.valueResolving, runOn(this, this.sk)); a.add(f); } return a; }; ScatterBase.prototype.aby = function (a, b) { if (this.aa3 != null) { b.value = this.aa3; return; } b.value = this.abj; }; ScatterBase.prototype.abz = function (a, b) { if (this.aa5 != null) { b.value = this.aa5; return; } b.value = this.abr; }; Object.defineProperty(ScatterBase.prototype, "ac8", { get: function () { return this.c(ScatterBase.acj); }, set: function (a) { this.h(ScatterBase.acj, a); }, enumerable: false, configurable: true }); Object.defineProperty(ScatterBase.prototype, "GetErrorBarsXAxis", { get: function () { return this.xAxis; }, enumerable: false, configurable: true }); Object.defineProperty(ScatterBase.prototype, "GetErrorBarsYAxis", { get: function () { return this.yAxis; }, enumerable: false, configurable: true }); ScatterBase.prototype.qr = function () { _super.prototype.qr.call(this); if (this.xAxis != null) { this.xAxis.l0(false); } if (this.yAxis != null) { this.yAxis.l0(false); } }; ScatterBase.prototype.rs = function (a, b, c, d) { _super.prototype.rs.call(this, a, b, c, d); if (this.zn.df.g$e(a, b, c, d)) { this.sa(false); this.q2(); } switch (b) { case ScatterBase.$$p[10]: case ScatterBase.$$p[14]: case ScatterBase.$$p[11]: case ScatterBase.$$p[15]: this.qw(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.z7); c.deregisterColumn(this.z8); this.z7 = null; this.z8 = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.z7 = this.dl(this.abj); this.z8 = this.dl(this.abr); } if ((this.yAxis != null && !this.yAxis.ee()) || (this.xAxis != null && !this.xAxis.ee())) { this.sa(this.go && c != null); } break; case ScatterBase.$$p[9]: if (c != null) { c.cx(this); } if (d != null) { d.d4(this); } if ((this.xAxis != null && !this.xAxis.ee()) || (d == null && c != null)) { this.sa(false); } this.q2(); break; case ScatterBase.$$p[13]: if (c != null) { c.cx(this); } if (d != null) { d.d4(this); } if ((this.yAxis != null && !this.yAxis.ee()) || (d == null && c != null)) { this.sa(false); } this.q2(); break; case ScatterBase.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.z7); this.z7 = this.dl(this.abj); } break; case "XColumn": this.zn.df.g$m(); if (this.xAxis != null && !this.xAxis.ee()) { this.sa(this.go && this.d9); } break; case ScatterBase.$$p[16]: if (this.dp != null) { this.dp.deregisterColumn(this.z8); this.z8 = this.dl(this.abr); } break; case "YColumn": this.zn.df.g$m(); if (this.yAxis != null && !this.yAxis.ee()) { this.sa(this.go && this.d9); } break; case ScatterBase.$$p[7]: this.sa(false); this.q2(); break; case ScatterBase.$$p[8]: this.sa(false); this.q2(); break; case "TransitionProgress": this.zu.d(this.j1, this.zs, this.zq); this.abt(); try { if (this.d7(this.cw)) { return; } if ((Math.round(this.j1 * 100000) / 100000) == 1) { this.acg(this.zq, this.zn); } else { this.acg(this.zu, this.zn); } if (this.dc != null) { this.dc.sv(this); } } finally { this.ach(); } break; case "TrendLineBrush": this.ry(b); break; case ScatterBase.$$p[0]: if (this.zo != null) { this.zo.r = this; } this.sa(false); this.q2(); break; case "TrendLineType": this.q2(); break; case ScatterBase.$$p[4]: this.aab = this.aaj(); this.sa(false); break; case ScatterBase.$$p[3]: this.aaa = this.aai(); this.sa(false); break; case ScatterBase.$$p[5]: this.zw = this.zx(); break; } }; ScatterBase.prototype.aaj = function () { return this.aaf; }; ScatterBase.prototype.aai = function () { return this.aae; }; ScatterBase.prototype.aad = function (a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; }; ScatterBase.prototype.aac = function (a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; }; ScatterBase.prototype.ach = function () { this.adb = Rect.empty; this.adc = Rect.empty; }; ScatterBase.prototype.abt = function () { var a = this.getViewInfo(this.adb, this.adc); this.adb = a.p0; this.adc = a.p1; }; ScatterBase.prototype.aah = function (a, b) { if (b != 3) { return true; } if (a == null) { return true; } if (this.abj == a || this.abr == a) { return true; } return false; }; ScatterBase.prototype.pq = function (a, b, c, d) { var e_1, _a; var e = false; if (!this.aah(d, a)) { return; } this.zn.df.g$i(a, b, c, d); if (this.zn.aa.count > 0) { try { for (var _b = __values(fromEnum(this.zn.aa)), _c = _b.next(); !_c.done; _c = _b.next()) { var f = _c.value; f.g$i(a, b, c, d); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } } if (this.xAxis != null && !this.xAxis.ee()) { e = true; } if (this.yAxis != null && !this.yAxis.ee()) { e = true; } if (a == 0 || a == 2 || a == 3 || a == 4) { this.z9 = true; } else if (a == 1) { for (var g = b; g < b + c; g++) { this.aao += this.z7.item(g); this.aap += this.z8.item(g); } this.aaq = this.aao / this.z7.count; this.aar = this.aap / this.z8.count; } if (e) { this.sa(true); } }; ScatterBase.prototype.ab8 = function (a) { this.ab9(a, null); }; ScatterBase.prototype.ab9 = function (a, b) { var e_2, _a, e_3, _b; var c = this.z7 != null ? this.z7.count : 0; var d = this.z8 != null ? this.z8.count : 0; var e = Math.min(c, d); if (e <= this.aaz) { a.q.clear(); var f = new List$1(OwnedPoint.$, 0); try { for (var _c = __values(fromEnum(a.y.values)), _d = _c.next(); !_d.done; _d = _c.next()) { var g = _d.value; f.add(g); } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_d && !_d.done && (_a = _c.return)) _a.call(_c); } finally { if (e_2) throw e_2.error; } } var h_1 = this.dp; f.aa(function (i, j) { var k = h_1.indexOf(i.a); var l = h_1.indexOf(j.a); if (k < l) { return -1; } if (k > l) { return 1; } return 0; }); if (b != null) { b.i = a.q; } try { for (var _e = __values(fromEnum(f)), _f = _e.next(); !_f.done; _f = _e.next()) { var i = _f.value; if (h_1.indexOf(i.a) >= 0) { if (b != null) { b.j(i.c); } else { a.q.add({ $type: Point_$type, x: i.c.x, y: i.c.y }); } } } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_f && !_f.done && (_b = _e.return)) _b.call(_e); } finally { if (e_3) throw e_3.error; } } } }; ScatterBase.prototype.ay = function (a) { if (a != null && a == this.xAxis && this.z7 != null) { return new AxisRange(this.z7.minimum, this.z7.maximum); } if (a != null && a == this.yAxis && this.z8 != null) { return new AxisRange(this.z8.minimum, this.z8.maximum); } return null; }; ScatterBase.prototype.ky = function (a) { var b = this.ke(a); if (this.dp != null && b >= 0 && b < this.dp.count) { return this.dp.item(b); } return null; }; Object.defineProperty(ScatterBase.prototype, "zw", { get: function () { return this.zv; }, set: function (a) { var b = this.zv; this.zv = a; if (b != this.zv) { this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.zv)); } }, enumerable: false, configurable: true }); ScatterBase.prototype.zx = function () { if (this.zy != 0) { return this.zy; } return this.aag ? 4 : 1; }; ScatterBase.prototype.ke = function (a) { var b = truncate(Math.round(this.i0(a))); return b; }; ScatterBase.prototype.i0 = function (a) { switch (this.zw) { case 1: return this.aav(a); case 3: return this.aaw(a); case 2: return this.aat(a); case 4: return this.aau(a); case 5: return this.aas(a); } return -1; }; ScatterBase.prototype.aau = function (a) { return this.aax(a, false); }; ScatterBase.prototype.aat = function (a) { var b = this.wt(a); var c = b.x; var d = b.y; if (this.dp == null || this.xAxis == null || this.yAxis == null || this.z7 == null || this.z8 == null) { return -1; } if (this.dp.count > this.aay) { return -1; } this.abw(); var e = this.zc; var f = this.zd; if (e == null || f == null) { return -1; } var g = 1.7976931348623157E+308; var h = -1; for (var i = 0; i < this.z7.count; i++) { var j = e[i]; var k = f[i]; var l = (c - j) * (c - j) + (d - k) * (d - k); if (l < g) { g = l; h = i; } } return h; }; ScatterBase.prototype.abw = function () { var _this = this; var a = this.cw.ca; var b = this.cw.b9; var c = this.getEffectiveViewport(); if (this.zm == null) { return; } var d = new ScalerParams(0, a, b, this.zm.d, c); var e = ((function () { var $ret = new ScalerParams(0, a, b, _this.zm.e, c); $ret.b = _this.i7(); return $ret; })()); if (this.zc == null || this.zd == null) { var f = arrayShallowClone(this.z7.asArray()); var g = arrayShallowClone(this.z8.asArray()); this.xAxis.k3(boxArray$1(f), 0, f.length, d); this.yAxis.k3(boxArray$1(g), 0, g.length, e); this.zc = f; this.zd = g; } }; ScatterBase.prototype.get_aag = function () { return false; }; Object.defineProperty(ScatterBase.prototype, "aag", { get: function () { return this.get_aag(); }, enumerable: false, configurable: true }); ScatterBase.prototype.aax = function (a, b) { if (!this.aag) { return -1; } var c = { $type: Point_$type, x: 0, y: 0 }; var d = true; var e = this.zr(); if (e == null) { return -1; } if (e.q == null) { return -1; } if (this.dp == null || this.dp.count > this.aay) { return -1; } this.abw(); var f = this.zc; var g = this.zd; if (f == null || g == null) { return -1; } var h = this.wt(a); var i = 1.7976931348623157E+308; var j = -1; for (var k = 0; k < this.zc.length; k++) { var l = { $type: Point_$type, x: this.zc[k], y: this.zd[k] }; if (k > 0) { if (!b || e.m.containsKey(this.dp.item(k)) || e.m.containsKey(this.dp.item(k - 1))) { var m = CoreGeometryUtil.q(h, c, l); if (m < i) { i = m; j = k; } } } c = l; } if (j >= 0) { var n = { $type: Point_$type, x: this.zc[j], y: this.zd[j] }; var o = { $type: Point_$type, x: this.zc[j - 1], y: this.zd[j - 1] }; if (!b || (e.m.containsKey(this.dp.item(j)) && e.m.containsKey(this.dp.item(j - 1)))) { var p = GeometryUtil.j(h, o, n); return (j - 1) + p; } else if (e.m.containsKey(this.dp.item(j))) { return j; } else { return j - 1; } } return -1; }; ScatterBase.prototype.aaw = function (a) { return this.aax(a, true); }; ScatterBase.prototype.aas = function (a) { var _this = this; var b = this.wt(a); var c = b.x; var d = b.y; if (this.zn.dg.e > this.aay) { return -1; } var e = -1; this.xt.cx(function (f) { var g = _this.zn.c7(f); var h = g.left; var i = g.top; var j = g.width; var k = g.height; if (_this.x0) { var l = h + j / 2; var m = i + k / 2; var n = (j / 2) * (j / 2); var o = (c - l) * (c - l) + (d - m) * (d - m); if (o < n) { if (e == -1) { e = f.al; } } } else { if (c > h && c < h + j && d > i && d < i + k) { if (e == -1) { e = f.al; } } } }); return e; }; ScatterBase.prototype.aav = function (a) { var _this = this; var b = null; var c = 1.7976931348623157E+308; var d = this.wt(a); var e = d.x; var f = d.y; if (this.zn.dg.e > this.aay) { return -1; } this.zn.dn(function (g) { if (g._visibility == 0) { var h = _this.zn.c7(g); var i = h.left + h.width / 2; var j = h.top + h.height / 2; var k = (e - i) * (e - i) + (f - j) * (f - j); if (k < c) { c = k; b = g; } } }); if (b != null) { return b.al; } return -1; }; ScatterBase.prototype.wy = function (a, b, c) { var _this = this; if (this.xAxis == null || this.yAxis == null || this.z7 == null || this.z8 == null) { return { $type: Point_$type, x: NaN, y: NaN }; } var d = this.cw.ca; var e = this.cw.b9; var f = this.getEffectiveViewport(); var g = new ScalerParams(0, d, e, this.xAxis.dn, f); var h = ((function () { var $ret = new ScalerParams(0, d, e, _this.yAxis.dn, f); $ret.b = _this.i7(); return $ret; })()); if (b) { var i = this.i0(a); if (i == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } var j = truncate(Math.floor(i)); var k = truncate(Math.ceil(i)); if (j < 0) { j = 0; } if (k < 0) { k = 0; } if (k > this.dp.count - 1) { k = this.dp.count - 1; } if (j > this.dp.count - 1) { j = this.dp.count - 1; } if (k == j) { var l = this.xAxis.f7(this.z7.item(j), g); var m = this.yAxis.f7(this.z8.item(j), h); return { $type: Point_$type, x: l, y: m }; } var n = i - Math.floor(i); var o = this.xAxis.f7(this.z7.item(j), g); var p = this.yAxis.f7(this.z8.item(j), h); var q = this.xAxis.f7(this.z7.item(k), g); var r = this.yAxis.f7(this.z8.item(k), h); var s = q - o; var t = r - p; return { $type: Point_$type, x: o + s * n, y: p + t * n }; } else { var u = this.ke(a); if (u == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } var v = this.xAxis.f7(this.z7.item(u), g); var w = this.yAxis.f7(this.z8.item(u), h); return { $type: Point_$type, x: v, y: w }; } }; ScatterBase.prototype.gl = function (a) { var _this = this; var b = this.dc != null ? this.dc.yv : Rect.empty; b = b.copy(); var c = this.dc != null ? this.dc.zd : Rect.empty; var d = new Rect(0, 0, 0, 1, 1); var e = this.w8(this.cw); var f = new ScalerParams(0, d, d, this.xAxis.dn, e); var g = ((function () { var $ret = new ScalerParams(0, d, d, _this.yAxis.dn, e); $ret.b = _this.i7(); return $ret; })()); var h = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1; var i = this.xAxis != null && this.z7 != null && h < this.z7.count ? this.xAxis.f7(this.z7.item(h), f) : NaN; var j = this.yAxis != null && this.z8 != null && h < this.z8.count ? this.yAxis.f7(this.z8.item(h), g) : NaN; if (!isNaN_(i)) { if (i < b.left + 0.1 * b.width) { i = i + 0.4 * b.width; b.x = i - 0.5 * b.width; } if (i > b.right - 0.1 * b.width) { i = i - 0.4 * b.width; b.x = i - 0.5 * b.width; } } if (!isNaN_(j)) { if (j < b.top + 0.1 * b.height) { j = j + 0.4 * b.height; b.y = j - 0.5 * b.height; } if (j > b.bottom - 0.1 * b.height) { j = j - 0.4 * b.height; b.y = j - 0.5 * b.height; } } if (this.c4 != null) { this.c4.au(this.dc, b, true); } return h >= 0; }; ScatterBase.prototype.ta = function (a, b) { this.sa(false); }; ScatterBase.prototype.tb = function (a, b) { this.sa(false); }; ScatterBase.prototype.zr = function () { var a = this.zq; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.zu; } return a; }; ScatterBase.prototype.abu = function (a, b, c, d, e) { var _this = this; b.j = new Dictionary$2(Base.$, OwnedPoint.$, 1, c); var f = this.getEffectiveViewport1(a); var g = this.dp; var h; var i; var j = ((function () { var $ret = new ScalerParams(0, d, e, _this.zm.d, f); $ret.c = _this.getEffectiveViewport1(a); return $ret; })()); var k = ((function () { var $ret = new ScalerParams(0, d, e, _this.zm.e, f); $ret.c = _this.getEffectiveViewport1(a); $ret.b = _this.i7(); return $ret; })()); var l = false; var m = 0; if (this.dc != null) { if (this.dc.g1()) { var n = this.dc.ol(d, j); l = n.c; m = n.d; } } var _loop_1 = function (o) { h = this_1.z7.item(o); i = this_1.z8.item(o); var p = { $type: Point_$type, x: this_1.zm.a.f7(h, j), y: this_1.zm.b.f7(i, k) }; if (l) { if (p.x < e.left || p.x > e.right) { if (p.x + m >= e.left && p.x + m <= e.right) { p = { $type: Point_$type, x: p.x + m, y: i }; } } } if (!isInfinity(p.x) && !isInfinity(p.y)) { var q_1 = g.item(o); if (!b.j.containsKey(q_1)) { var r_1 = { $type: Point_$type, x: h, y: i }; var s_1 = { $type: Point_$type, x: p.x, y: p.y }; b.j.addItem(q_1, ((function () { var $ret = new OwnedPoint(); $ret.a = q_1; $ret.b = r_1; $ret.c = s_1; return $ret; })())); } } }; var this_1 = this; for (var o = 0; o < c; o++) { _loop_1(o); } }; ScatterBase.prototype.ab5 = function (a, b) { var _this = this; this.zc = null; this.zd = null; a.m.clear(); a.r.clear(); a.k.clear(); a.o.clear(); a.l.clear(); a.n.clear(); var c = Math.min(this.z7 != null ? this.z7.count : 0, this.z8 != null ? this.z8.count : 0); var d = b.ca; var e = b.b9; var f = this.getEffectiveViewport1(b); var g = new ScalerParams(0, d, e, this.xAxis.dn, f); g.c = this.getEffectiveViewport1(b); var h = ((function () { var $ret = new ScalerParams(0, d, e, _this.yAxis.dn, f); $ret.b = _this.i7(); return $ret; })()); h.c = this.getEffectiveViewport1(b); if (c < 1) { return; } this.zm = ((function () { var $ret = new ScatterAxisInfoCache(); $ret.a = _this.xAxis; $ret.b = _this.yAxis; $ret.d = _this.xAxis.dn; $ret.e = _this.yAxis.dn; $ret.c = _this.dp; return $ret; })()); var i = b; if (c <= this.aaz) { this.abu(i, a, c, d, e); } if (this.x3()) { b.dd.l(a.m, this.aaz, d, e, this.im); } var j = ((function () { var $ret = new Clipper(0, e, false); $ret.i = a.r; return $ret; })()); var k = this.w6(b); var l = this.xAxis.ga(k.left, g); var m = this.xAxis.ga(k.right, g); b.df.j(a.r, this.trendLineType, this.z7, this.z8, this.trendLinePeriod, function (n) { return _this.xAxis.f7(n, g); }, function (n) { return _this.yAxis.f7(n, h); }, ((function () { var $ret = new TrendResolutionParams(); $ret.d = _this.im; $ret.i = e; $ret.h = f; $ret.j = d; return $ret; })()), j, l, m); if (b.aa.count > 0) { a.p.clear(); for (var n = 0; n < b.aa.count; n++) { a.p.add(new List$1(Point_$type, 0)); var o = b.aa._inner[n]; o.j(a.p._inner[n], o.g$b, this.z7, this.z8, o.g$f, function (p) { return _this.xAxis.f7(p, g); }, function (p) { return _this.yAxis.f7(p, h); }, ((function () { var $ret = new TrendResolutionParams(); $ret.d = _this.im; $ret.i = e; $ret.h = f; $ret.j = d; return $ret; })()), j, l, m); } } this.ab3(a, b); }; ScatterBase.prototype.pk = function (a, b) { _super.prototype.pk.call(this, a, b); var c = b; c.dm(a); }; ScatterBase.prototype.get_fh = function () { return true; }; ScatterBase.prototype.z1 = function (a, b, c) { return null; }; ScatterBase.prototype.z2 = function (a, b, c) { if (this.dp == null) { return null; } var d = this.zr(); var e = this.zn.ce(this.wt(b)); var f = -1; if (e == null) { if (a != null) { f = this.dp.indexOf(a); } else { return null; } } else { f = e.al; } if (f == -1) { return null; } var g = new HighlightingInfo(); g.i = this; g.g = f; g.f = f; g.c = false; g.d = true; if (c != null && c.g == g.g && c.f == g.f) { return c; } return g; }; ScatterBase.prototype.xi = function (a, b) { if (this.xv != 1 && this.xv != 13) { var c = this.xt.c8(); var d = (c.width / 2) + (this.x7 / 2); var e = (c.height / 2) + (this.x7 / 2); var f = d; var g = d; var h = e; var i = e; if (a == 2 || a == 4) { f = 0; } if (a == 2 || a == 3) { g = 0; } if (b == 2 || b == 3) { h = 0; } if (b == 2 || b == 4) { i = 0; } return new Thickness(1, f, h, g, i); } return new Thickness(1, 0, 0, 0, 0); }; ScatterBase.prototype.z0 = function (a, b, c) { var d = new HighlightingInfo(); d.i = this; d.g = 0; d.f = this.dp.count - 1; d.c = true; if (c != null && c.g == d.g && c.f == d.f) { return c; } return d; }; ScatterBase.prototype.dh = function (a, b, c) { if (this.ef && this.f3(this.by) && !c) { var d = this.z1(a, b, this.z3); this.z3 = d; return d; } else { var e = this.z0(a, b, this.z3); this.z3 = e; return e; } }; ScatterBase.prototype.di = function (a, b, c) { if (this.f3(this.by) && !c) { var d = this.z2(a, b, this.z4); this.z4 = d; return d; } else { var e = this.z0(a, b, this.z4); e.d = true; this.z4 = e; return e; } }; ScatterBase.prototype.aal = function () { return (this.assigningScatterStyle != null && this.aab) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); }; ScatterBase.prototype.aak = function () { return (this.assigningScatterMarkerStyle != null && this.aaa) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); }; ScatterBase.prototype.acg = function (a, b) { var _this = this; this.rf(); var c = b.b9; this.zm = ((function () { var $ret = new ScatterAxisInfoCache(); $ret.a = _this.xAxis; $ret.b = _this.yAxis; $ret.d = _this.xAxis.dn; $ret.e = _this.yAxis.dn; return $ret; })()); if (this.x3()) { b.dd.j(a.m, this.x5); if (this.aak()) { this.abv(b, a); } } b.c4(); var d = ((function () { var $ret = new Clipper(1, NaN, c.bottom, NaN, c.top, false); $ret.i = b.df.g$n.an; return $ret; })()); b.df.g$l(a.r, d); if (b.aa.count > 0) { for (var e = 0; e < b.aa.count; e++) { var f = b.aa._inner[e]; f.g$l(a.p._inner[e], d); } } this.acd(a, b); }; ScatterBase.prototype.ak = function (a, b) { var c = new List$1(ChartSelection.$, 0); this.qk(a, c, b); return c.toArray(); }; ScatterBase.prototype.qk = function (a, b, c) { this.abx(a, b, c, 0, null); }; ScatterBase.prototype.abx = function (a, b, c, d, e) { var _this = this; var f = this.dc.za(this.dc.y0(a)); var g = this.dp.count; var h = this.zm.a; var i = this.zm.b; var j = this.dc.y3(this.xf, this.getEffectiveViewport(), f); var k = new ScalerParams(0, f, this.dc.zd, h.dn, this.getEffectiveViewport()); var l = new ScalerParams(0, f, this.dc.zd, i.dn, this.getEffectiveViewport()); if (d == 0) { var _loop_2 = function (m) { var n = h.f7(this_2.z7.item(m), k); var o = i.f7(this_2.z8.item(m), l); if (n < j.width && n > 0 && o < j.height && o > 0) { if (c == 7 || c == 6) { b.add(((function () { var $ret = new ChartSelection(); $ret.series = _this; return $ret; })())); return { value: void 0 }; } else if (c == 2 || c == 1) { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dp.item(m); return $ret; })())); } else { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dp.item(m); $ret.series = _this; return $ret; })())); } } }; var this_2 = this; for (var m = 0; m < g; m++) { var state_1 = _loop_2(m); if (typeof state_1 === "object") return state_1.value; } } else { var _loop_3 = function (p) { var q = h.f7(this_3.z7.item(p), k); var r = i.f7(this_3.z8.item(p), l); var s = e.item(p) / f.height; var t = e.item(p) / f.width; var u = new Rect(0, q - t / 2, r - s / 2, t, s); if (j.intersectsWith(u)) { if (c == 7 || c == 6) { b.add(((function () { var $ret = new ChartSelection(); $ret.series = _this; return $ret; })())); return { value: void 0 }; } else if (c == 2 || c == 1) { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dp.item(p); return $ret; })())); } else { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dp.item(p); $ret.series = _this; return $ret; })())); } } }; var this_3 = this; for (var p = 0; p < g; p++) { var state_2 = _loop_3(p); if (typeof state_2 === "object") return state_2.value; } } }; ScatterBase.prototype.zf = function (a, b) { return this.zg(a, b); }; ScatterBase.prototype.zg = function (a, b) { if (b < a || a < 0 || a > this.z7.count || b < 0 || b > this.z7.count) { return null; } var c = new Array((b - a) + 1); for (var d = a; d <= b; d++) { var e = d; c[d - a] = this.dp.item(d); } return c; }; ScatterBase.prototype.abv = function (a, b) { var _this = this; a.ck = true; this.zz.ay(this, this.aak(), runOn(this, this.zf)); var c = this.zz.d; var d = c != null; var e = this.getEffectiveViewport1(a); var f = this.dp == null ? 0 : this.dp.count; this.zn.cw(function (g) { if (g._visibility == 0) { var h = g.al; var i = g.content; if (i == null) { i = new DataContext(); g.content = i; } if (d) { _this.ab0(h, f, a.t); } _this.zz.ac(g, i); } }); }; ScatterBase.prototype.ab1 = function (a, b, c) { var d = this.by != 1; var e = this.cq != 1; var f = this.cp != 1; this.zz.a0(this.zz.b, a, b, false); this.zz.ab(this.ik); var g = this.zz.ax; var h = null; var i = null; var j = null; var k = this.dp; if (d && this.dc != null) { h = this.dc.d7.getHighlightingInfo(this, k, g.z, g.y, false); g.c = h; } if (e && this.dc != null) { h = this.dc.d8.getHighlightingInfo(this, k, g.z, g.y, false); g.d = h; } if (f && this.dc != null) { h = this.dc.d6.getHighlightingInfo(this, k, g.z, g.y, false); g.b = h; } g.h = c; this.acb(g); this.zz.z(this, h, i, j, c, d, e, f, a < 0); }; ScatterBase.prototype.ab0 = function (a, b, c) { var d = this.by != 1; var e = this.cq != 1; var f = this.cp != 1; this.zz.a0(this.zz.d, a, b, true); this.zz.aa(this.ik); var g = this.zz.aw; var h = null; var i = null; var j = null; var k = this.dp; var l = null; var m = null; var n = null; if (d && this.dc != null) { h = this.dc.d7.getHighlightingInfo(this, k, g.z, g.y, true); if (this.dc.d7.isCrossContextHighlight(this)) { l = this.dc.d7.getHighlightingInfo(this, k, g.z, g.y, true); } g.c = h; } if (e && this.dc != null) { i = this.dc.d8.getHighlightingInfo(this, k, g.z, g.y, true); if (i == null && this.bo != null) { i = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true); } if (i == null && this.bl != null) { i = this.dc.d8.getHighlightingInfo(this.bl, this.bl.dp, g.z, g.y, true); } if (this.dc.d8.isCrossContextHighlight(this)) { m = this.dc.d8.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } if (f && this.dc != null) { j = this.dc.d6.getHighlightingInfo(this, k, g.z, g.y, true); if (this.dc.d6.isCrossContextHighlight(this)) { n = this.dc.d6.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } g.h = c; this.aca(g); this.zz.y(this, h, i, j, c, d, e, f, g.v, this.dc.d7.totalHighWaterMark, g.x, this.dc.d8.totalHighWaterMark, g.t, this.dc.d6.totalHighWaterMark); }; ScatterBase.prototype.acb = function (a) { if (this.assigningScatterStyle != null && this.aab) { this.assigningScatterStyle(this, a); } }; ScatterBase.prototype.aca = function (a) { if (this.assigningScatterMarkerStyle != null && this.aaa) { this.assigningScatterMarkerStyle(this, a); } }; ScatterBase.prototype.ab3 = fu