UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

1,453 lines 78.1 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, __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-angular-core"; import { NumericYAxis } from "./NumericYAxis"; import { Series } from "./Series"; import { TrendLineType_$type } from "igniteui-angular-core"; import { Brush } from "igniteui-angular-core"; import { PenLineCap_$type } from "igniteui-angular-core"; import { DoubleCollection } from "igniteui-angular-core"; import { CollisionAvoidanceType_$type } from "./CollisionAvoidanceType"; import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode"; import { ScatterErrorBarSettings } from "./ScatterErrorBarSettings"; import { HighlightingInfo } from "igniteui-angular-core"; import { ScatterFrame } from "./ScatterFrame"; import { Base, runOn, delegateCombine, enumGetBox, Number_$type, typeCast, fromEnum, Point_$type, markType, markDep, PointUtil } from "igniteui-angular-core"; import { List$1 } from "igniteui-angular-core"; import { SeriesPointOfInterest } from "./SeriesPointOfInterest"; import { ScalerParams } from "./ScalerParams"; import { Rect } from "igniteui-angular-core"; import { Marker } from "./Marker"; import { MarkerSeriesView } from "./MarkerSeriesView"; import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay"; import { IFastItemsSource_$type } from "igniteui-angular-core"; import { Clipper } from "igniteui-angular-core"; import { OwnedPoint } from "./OwnedPoint"; import { Dictionary$2 } from "igniteui-angular-core"; import { AxisRange } from "./AxisRange"; import { GeometryUtil } from "igniteui-angular-core"; import { HashPool$2 } from "igniteui-angular-core"; import { DataContext } from "igniteui-angular-core"; import { TrendResolutionParams } from "./TrendResolutionParams"; import { ScatterTrendLineManager } from "./ScatterTrendLineManager"; import { Thickness } from "igniteui-angular-core"; import { Size } from "igniteui-angular-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-angular-core"; import { DataLegendSeriesValueInfo } from "igniteui-angular-core"; import { DataLegendSeriesContext } from "igniteui-angular-core"; import { PropertyMetadata } from "igniteui-angular-core"; import { truncate, isNaN_, isInfinity } from "igniteui-angular-core"; import { boxArray$1, arrayShallowClone } from "igniteui-angular-core"; import { Path } from "igniteui-angular-core"; import { DataTemplateMeasureInfo } from "igniteui-angular-core"; import { NumericMarkerManager } from "./NumericMarkerManager"; import { stringIsNullOrEmpty } from "igniteui-angular-core"; /** * @hidden */ var ScatterBase = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ScatterBase, _super); function ScatterBase() { var _this = _super.call(this) || this; _this.yw = null; _this.zf = null; _this.zg = null; _this.acl = null; _this.acm = null; _this.y5 = 1; _this.ym = null; _this.yn = null; _this.y2 = null; _this.y4 = null; _this.y0 = null; _this.zl = false; _this.zk = false; _this.zd = null; _this.ze = null; _this.assigningScatterStyle = null; _this.assigningScatterMarkerStyle = null; _this.y9 = null; _this.y3 = null; _this.yz = null; _this.zj = true; _this.zy = 0; _this.zz = 0; _this.z0 = 0; _this.z1 = 0; _this.y6 = _this.y7(); _this.y9 = new ScatterSeriesRenderManager(); _this.y3 = new ScatterFrame(); _this.acm = Rect.empty; _this.acl = Rect.empty; return _this; } ScatterBase.prototype.cs = function () { return new ScatterBaseView(this); }; ScatterBase.prototype.o2 = function () { _super.prototype.o2.call(this); this.xAxis = null; this.yAxis = null; }; ScatterBase.prototype.q1 = function (a) { _super.prototype.q1.call(this, a); this.yx = a; }; ScatterBase.prototype.get_fw = function () { return true; }; ScatterBase.prototype.ai = function () { return [this.xAxis, this.yAxis]; }; ScatterBase.prototype.kq = function (a, b) { var c = this.nd(b); if (c == ScatterBase.$$p[12]) { return this.kr(a, b, this.aat); } if (c == ScatterBase.$$p[16]) { return this.kr(a, b, this.aa1); } if (c == ScatterBase.$$p[1]) { return this.kr(a, b, this.aad); } if (c == ScatterBase.$$p[2]) { return this.kr(a, b, this.aaf); } return null; }; ScatterBase.prototype.md = function (a) { var b = this.nd(a); if (b == ScatterBase.$$p[12]) { return this.aat; } if (b == ScatterBase.$$p[16]) { return this.aa1; } if (b == ScatterBase.$$p[1]) { return this.aad; } if (b == ScatterBase.$$p[2]) { return this.aaf; } return _super.prototype.md.call(this, a); }; ScatterBase.prototype.eb = function (a, b, c, d, e) { var _this = this; if (!this.hasMarkers) { return false; } var f = this.xAxis; var g = new ScalerParams(1, this.db.v4, this.ws, f.ch); g.c = this.getEffectiveViewport1(this.cv); var h = this.yAxis; var i = new ScalerParams(1, this.db.v4, this.ws, h.ch); i.c = this.getEffectiveViewport1(this.cv); a.clear(); this.w6.cj(function (j) { if (j._visibility == 0) { var k = new SeriesPointOfInterest(); var l = j.n; var m = j.o; if (l < _this.ws.left || l > _this.ws.right || m < _this.ws.top || m > _this.ws.bottom) { return; } k.d = f.eo(l, g); k.e = h.eo(m, i); k.b = j.content; k.g = _this.vg; k.c = j.ak; if (_this.g9) { k.g = _this.vn(j.ak); } a.add(k); } }); return true; }; ScatterBase.prototype.b2 = function () { if (this.b3 == 0) { if (this.z9 <= 2000) { return 1; } else { return _super.prototype.b2.call(this); } } else { return _super.prototype.b2.call(this); } }; ScatterBase.prototype.wp = function (a) { if (!this.hasMarkers || !this.xg()) { return Rect.empty; } var b = this.w6.b1(this.v7(a)); if (b != null) { return this.w6.cu(b); } return Rect.empty; }; ScatterBase.prototype.gw = function (a, b) { if (this.xh(a, b)) { return true; } return false; }; Object.defineProperty(ScatterBase.prototype, "zh", { get: function () { return this.zf; }, set: function (a) { if (this.zf != a) { var b = this.zh; this.zf = a; this.raisePropertyChanged("XColumn", b, this.zh); } }, enumerable: false, configurable: true }); Object.defineProperty(ScatterBase.prototype, "zi", { get: function () { return this.zg; }, set: function (a) { if (this.zg != a) { var b = this.zi; this.zg = a; this.raisePropertyChanged("YColumn", b, this.zi); } }, enumerable: false, configurable: true }); ScatterBase.prototype.gb = function () { return this.highlightedItemsSource != null || (this.aad != null && this.aaf != null); }; ScatterBase.prototype.zw = function () { return false; }; ScatterBase.prototype.ht = function () { var a = _super.prototype.ht.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.aa9)); 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.aa8)); a.add(c); } if (this.zw()) { 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.zw()) { 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.r0)); a.add(e); } if (!this.zw()) { 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.r0)); a.add(f); } return a; }; ScatterBase.prototype.aa8 = function (a, b) { if (this.aad != null) { b.value = this.aad; return; } b.value = this.aat; }; ScatterBase.prototype.aa9 = function (a, b) { if (this.aaf != null) { b.value = this.aaf; return; } b.value = this.aa1; }; Object.defineProperty(ScatterBase.prototype, "aci", { get: function () { return this.c(ScatterBase.abt); }, set: function (a) { this.h(ScatterBase.abt, 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.qb = function () { _super.prototype.qb.call(this); if (this.xAxis != null) { this.xAxis.ib(false); } if (this.yAxis != null) { this.yAxis.ib(false); } }; ScatterBase.prototype.q9 = function (a, b, c, d) { _super.prototype.q9.call(this, a, b, c, d); if (this.yx.c2.g$b(a, b, c, d)) { this.rr(false); this.ql(); } switch (b) { case ScatterBase.$$p[10]: case ScatterBase.$$p[14]: case ScatterBase.$$p[11]: case ScatterBase.$$p[15]: this.qf(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.zh); c.deregisterColumn(this.zi); this.zh = null; this.zi = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.zh = this.dk(this.aat); this.zi = this.dk(this.aa1); } if ((this.yAxis != null && !this.yAxis.c1()) || (this.xAxis != null && !this.xAxis.c1())) { this.rr(this.gg && c != null); } break; case ScatterBase.$$p[9]: if (c != null) { c.b0(this); } if (d != null) { d.ct(this); } if ((this.xAxis != null && !this.xAxis.c1()) || (d == null && c != null)) { this.rr(false); } this.ql(); break; case ScatterBase.$$p[13]: if (c != null) { c.b0(this); } if (d != null) { d.ct(this); } if ((this.yAxis != null && !this.yAxis.c1()) || (d == null && c != null)) { this.rr(false); } this.ql(); break; case ScatterBase.$$p[12]: if (this.dn != null) { this.dn.deregisterColumn(this.zh); this.zh = this.dk(this.aat); } break; case "XColumn": this.yx.c2.g$i(); if (this.xAxis != null && !this.xAxis.c1()) { this.rr(this.gg && this.d7); } break; case ScatterBase.$$p[16]: if (this.dn != null) { this.dn.deregisterColumn(this.zi); this.zi = this.dk(this.aa1); } break; case "YColumn": this.yx.c2.g$i(); if (this.yAxis != null && !this.yAxis.c1()) { this.rr(this.gg && this.d7); } break; case ScatterBase.$$p[7]: this.rr(false); this.ql(); break; case ScatterBase.$$p[8]: this.rr(false); this.ql(); break; case "TransitionProgress": this.y4.c(this.jq, this.y2, this.y0); this.aa3(); try { if (this.d5(this.cv)) { return; } if ((Math.round(this.jq * 100000) / 100000) == 1) { this.abq(this.y0, this.yx); } else { this.abq(this.y4, this.yx); } if (this.db != null) { this.db.qo(this); } } finally { this.abr(); } break; case "TrendLineBrush": this.rf(b); break; case ScatterBase.$$p[0]: if (this.yy != null) { this.yy.r = this; } this.rr(false); this.ql(); break; case "TrendLineType": this.ql(); break; case ScatterBase.$$p[4]: this.zl = this.zt(); this.rr(false); break; case ScatterBase.$$p[3]: this.zk = this.zs(); this.rr(false); break; case ScatterBase.$$p[5]: this.y6 = this.y7(); break; } }; ScatterBase.prototype.zt = function () { return this.zp; }; ScatterBase.prototype.zs = function () { return this.zo; }; ScatterBase.prototype.zn = function (a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; }; ScatterBase.prototype.zm = function (a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; }; ScatterBase.prototype.abr = function () { this.acl = Rect.empty; this.acm = Rect.empty; }; ScatterBase.prototype.aa3 = function () { var a = this.getViewInfo(this.acl, this.acm); this.acl = a.p0; this.acm = a.p1; }; ScatterBase.prototype.zr = function (a, b) { if (b != 3) { return true; } if (a == null) { return true; } if (this.aat == a || this.aa1 == a) { return true; } return false; }; ScatterBase.prototype.pb = function (a, b, c, d) { var e = false; if (!this.zr(d, a)) { return; } this.yx.c2.g$e(a, b, c, d); if (this.xAxis != null && !this.xAxis.c1()) { e = true; } if (this.yAxis != null && !this.yAxis.c1()) { e = true; } if (a == 0 || a == 2 || a == 3 || a == 4) { this.zj = true; } else if (a == 1) { for (var f = b; f < b + c; f++) { this.zy += this.zh.item(f); this.zz += this.zi.item(f); } this.z0 = this.zy / this.zh.count; this.z1 = this.zz / this.zi.count; } if (e) { this.rr(true); } }; ScatterBase.prototype.abi = function (a) { this.abj(a, null); }; ScatterBase.prototype.abj = function (a, b) { var e_1, _a, e_2, _b; var c = this.zh != null ? this.zh.count : 0; var d = this.zi != null ? this.zi.count : 0; var e = Math.min(c, d); if (e <= this.z9) { a.m.clear(); var f = new List$1(OwnedPoint.$, 0); try { for (var _c = __values(fromEnum(a.u.values)), _d = _c.next(); !_d.done; _d = _c.next()) { var g = _d.value; f.add(g); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_d && !_d.done && (_a = _c.return)) _a.call(_c); } finally { if (e_1) throw e_1.error; } } var h_1 = this.dn; 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.m; } 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.m.add({ $type: Point_$type, x: i.c.x, y: i.c.y }); } } } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_f && !_f.done && (_b = _e.return)) _b.call(_e); } finally { if (e_2) throw e_2.error; } } } }; ScatterBase.prototype.ay = function (a) { if (a != null && a == this.xAxis && this.zh != null) { return new AxisRange(this.zh.minimum, this.zh.maximum); } if (a != null && a == this.yAxis && this.zi != null) { return new AxisRange(this.zi.minimum, this.zi.maximum); } return null; }; ScatterBase.prototype.kn = function (a) { var b = this.j3(a); if (this.dn != null && b >= 0 && b < this.dn.count) { return this.dn.item(b); } return null; }; Object.defineProperty(ScatterBase.prototype, "y6", { get: function () { return this.y5; }, set: function (a) { var b = this.y5; this.y5 = a; if (b != this.y5) { this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.y5)); } }, enumerable: false, configurable: true }); ScatterBase.prototype.y7 = function () { if (this.y8 != 0) { return this.y8; } return this.zq ? 4 : 1; }; ScatterBase.prototype.j3 = function (a) { var b = truncate(Math.round(this.ir(a))); return b; }; ScatterBase.prototype.ir = function (a) { switch (this.y6) { case 1: return this.z5(a); case 3: return this.z6(a); case 2: return this.z3(a); case 4: return this.z4(a); case 5: return this.z2(a); } return -1; }; ScatterBase.prototype.z4 = function (a) { return this.z7(a, false); }; ScatterBase.prototype.z3 = function (a) { var b = this.v7(a); var c = b.x; var d = b.y; if (this.dn == null || this.xAxis == null || this.yAxis == null || this.zh == null || this.zi == null) { return -1; } if (this.dn.count > this.z8) { return -1; } this.aa6(); var e = this.ym; var f = this.yn; if (e == null || f == null) { return -1; } var g = 1.7976931348623157E+308; var h = -1; for (var i = 0; i < this.zh.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.aa6 = function () { var _this = this; var a = this.cv.by; var b = this.cv.bx; var c = this.getEffectiveViewport(); if (this.yw == null) { return; } var d = new ScalerParams(0, a, b, this.yw.d, c); var e = ((function () { var $ret = new ScalerParams(0, a, b, _this.yw.e, c); $ret.b = _this.iy(); return $ret; })()); if (this.ym == null || this.yn == null) { var f = arrayShallowClone(this.zh.asArray()); var g = arrayShallowClone(this.zi.asArray()); this.xAxis.hq(boxArray$1(f), 0, f.length, d); this.yAxis.hq(boxArray$1(g), 0, g.length, e); this.ym = f; this.yn = g; } }; ScatterBase.prototype.get_zq = function () { return false; }; Object.defineProperty(ScatterBase.prototype, "zq", { get: function () { return this.get_zq(); }, enumerable: false, configurable: true }); ScatterBase.prototype.z7 = function (a, b) { if (!this.zq) { return -1; } var c = { $type: Point_$type, x: 0, y: 0 }; var d = true; var e = this.y1(); if (e == null) { return -1; } if (e.m == null) { return -1; } if (this.dn == null || this.dn.count > this.z8) { return -1; } this.aa6(); var f = this.ym; var g = this.yn; if (f == null || g == null) { return -1; } var h = this.v7(a); var i = 1.7976931348623157E+308; var j = -1; for (var k = 0; k < this.ym.length; k++) { var l = { $type: Point_$type, x: this.ym[k], y: this.yn[k] }; if (k > 0) { if (!b || e.j.containsKey(this.dn.item(k)) || e.j.containsKey(this.dn.item(k - 1))) { var m = GeometryUtil.h(h, c, l); if (m < i) { i = m; j = k; } } } c = l; } if (j >= 0) { var n = { $type: Point_$type, x: this.ym[j], y: this.yn[j] }; var o = { $type: Point_$type, x: this.ym[j - 1], y: this.yn[j - 1] }; if (!b || (e.j.containsKey(this.dn.item(j)) && e.j.containsKey(this.dn.item(j - 1)))) { var p = GeometryUtil.m(h, o, n); return (j - 1) + p; } else if (e.j.containsKey(this.dn.item(j))) { return j; } else { return j - 1; } } return -1; }; ScatterBase.prototype.z6 = function (a) { return this.z7(a, true); }; ScatterBase.prototype.z2 = function (a) { var _this = this; var b = this.v7(a); var c = b.x; var d = b.y; if (this.yx.c3.e > this.z8) { return -1; } var e = -1; this.w6.ck(function (f) { var g = _this.yx.cu(f); var h = g.left; var i = g.top; var j = g.width; var k = g.height; if (_this.xd) { 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.ak; } } } else { if (c > h && c < h + j && d > i && d < i + k) { if (e == -1) { e = f.ak; } } } }); return e; }; ScatterBase.prototype.z5 = function (a) { var _this = this; var b = null; var c = 1.7976931348623157E+308; var d = this.v7(a); var e = d.x; var f = d.y; if (this.yx.c3.e > this.z8) { return -1; } this.yx.da(function (g) { if (g._visibility == 0) { var h = _this.yx.cu(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.ak; } return -1; }; ScatterBase.prototype.wc = function (a, b, c) { var _this = this; if (this.xAxis == null || this.yAxis == null || this.zh == null || this.zi == null) { return { $type: Point_$type, x: NaN, y: NaN }; } var d = this.cv.by; var e = this.cv.bx; var f = this.getEffectiveViewport(); var g = new ScalerParams(0, d, e, this.xAxis.ch, f); var h = ((function () { var $ret = new ScalerParams(0, d, e, _this.yAxis.ch, f); $ret.b = _this.iy(); return $ret; })()); if (b) { var i = this.ir(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.dn.count - 1) { k = this.dn.count - 1; } if (j > this.dn.count - 1) { j = this.dn.count - 1; } if (k == j) { var l = this.xAxis.el(this.zh.item(j), g); var m = this.yAxis.el(this.zi.item(j), h); return { $type: Point_$type, x: l, y: m }; } var n = i - Math.floor(i); var o = this.xAxis.el(this.zh.item(j), g); var p = this.yAxis.el(this.zi.item(j), h); var q = this.xAxis.el(this.zh.item(k), g); var r = this.yAxis.el(this.zi.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.j3(a); if (u == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } var v = this.xAxis.el(this.zh.item(u), g); var w = this.yAxis.el(this.zi.item(u), h); return { $type: Point_$type, x: v, y: w }; } }; ScatterBase.prototype.gd = function (a) { var _this = this; var b = this.db != null ? this.db.v4 : Rect.empty; b = b.copy(); var c = this.db != null ? this.db.wk : Rect.empty; var d = new Rect(0, 0, 0, 1, 1); var e = this.wl(this.cv); var f = new ScalerParams(0, d, d, this.xAxis.ch, e); var g = ((function () { var $ret = new ScalerParams(0, d, d, _this.yAxis.ch, e); $ret.b = _this.iy(); return $ret; })()); var h = !b.isEmpty && !c.isEmpty && this.dn != null ? this.dn.indexOf(a) : -1; var i = this.xAxis != null && this.zh != null && h < this.zh.count ? this.xAxis.el(this.zh.item(h), f) : NaN; var j = this.yAxis != null && this.zi != null && h < this.zi.count ? this.yAxis.el(this.zi.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.c3 != null) { this.c3.au(this.db, b, true); } return h >= 0; }; ScatterBase.prototype.sq = function (a, b) { this.rr(false); }; ScatterBase.prototype.sr = function (a, b) { this.rr(false); }; ScatterBase.prototype.y1 = function () { var a = this.y0; if (this.d3()) { if (this.dc.g) { this.dc.t(); } a = this.y4; } return a; }; ScatterBase.prototype.aa4 = function (a, b, c, d, e) { var _this = this; b.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, c); var f = this.getEffectiveViewport1(a); var g = this.dn; var h; var i; var j = ((function () { var $ret = new ScalerParams(0, d, e, _this.yw.d, f); $ret.c = _this.getEffectiveViewport1(a); return $ret; })()); var k = ((function () { var $ret = new ScalerParams(0, d, e, _this.yw.e, f); $ret.c = _this.getEffectiveViewport1(a); $ret.b = _this.iy(); return $ret; })()); var l = false; var m = 0; if (this.db != null) { if (this.db.f4()) { var n = this.db.m4(d, j); l = n.c; m = n.d; } } var _loop_1 = function (o) { h = this_1.zh.item(o); i = this_1.zi.item(o); var p = { $type: Point_$type, x: this_1.yw.a.el(h, j), y: this_1.yw.b.el(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.g.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.g.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.abf = function (a, b) { var _this = this; this.ym = null; this.yn = null; a.j.clear(); a.n.clear(); a.h.clear(); a.l.clear(); a.i.clear(); a.k.clear(); var c = Math.min(this.zh != null ? this.zh.count : 0, this.zi != null ? this.zi.count : 0); var d = b.by; var e = b.bx; var f = this.getEffectiveViewport1(b); var g = new ScalerParams(0, d, e, this.xAxis.ch, f); g.c = this.getEffectiveViewport1(b); var h = ((function () { var $ret = new ScalerParams(0, d, e, _this.yAxis.ch, f); $ret.b = _this.iy(); return $ret; })()); h.c = this.getEffectiveViewport1(b); if (c < 1) { return; } this.yw = ((function () { var $ret = new ScatterAxisInfoCache(); $ret.a = _this.xAxis; $ret.b = _this.yAxis; $ret.d = _this.xAxis.ch; $ret.e = _this.yAxis.ch; $ret.c = _this.dn; return $ret; })()); var i = b; if (c <= this.z9) { this.aa4(i, a, c, d, e); } if (this.xg()) { b.c0.l(a.j, this.z9, d, e, this.id); } var j = ((function () { var $ret = new Clipper(0, e, false); $ret.i = a.n; return $ret; })()); var k = this.wj(b); var l = this.xAxis.eo(k.left, g); var m = this.xAxis.eo(k.right, g); b.c2.h(a.n, this.trendLineType, this.zh, this.zi, this.trendLinePeriod, function (n) { return _this.xAxis.el(n, g); }, function (n) { return _this.yAxis.el(n, h); }, ((function () { var $ret = new TrendResolutionParams(); $ret.d = _this.id; $ret.i = e; $ret.h = f; $ret.j = d; return $ret; })()), j, l, m); this.abd(a, b); }; ScatterBase.prototype.o5 = function (a, b) { _super.prototype.o5.call(this, a, b); var c = b; c.c9(a); }; ScatterBase.prototype.get_fe = function () { return true; }; ScatterBase.prototype.zb = function (a, b, c) { return null; }; ScatterBase.prototype.zc = function (a, b, c) { if (this.dn == null) { return null; } var d = this.y1(); var e = this.yx.b1(this.v7(b)); var f = -1; if (e == null) { if (a != null) { f = this.dn.indexOf(a); } else { return null; } } else { f = e.ak; } 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.wv = function (a, b) { if (this.w8 != 1 && this.w8 != 13) { var c = this.w6.cv(); var d = (c.width / 2) + (this.xj / 2); var e = (c.height / 2) + (this.xj / 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.za = function (a, b, c) { var d = new HighlightingInfo(); d.i = this; d.g = 0; d.f = this.dn.count - 1; d.c = true; if (c != null && c.g == d.g && c.f == d.f) { return c; } return d; }; ScatterBase.prototype.dg = function (a, b, c) { if (this.ed && this.fz(this.bx) && !c) { var d = this.zb(a, b, this.zd); this.zd = d; return d; } else { var e = this.za(a, b, this.zd); this.zd = e; return e; } }; ScatterBase.prototype.dh = function (a, b, c) { if (this.fz(this.bx) && !c) { var d = this.zc(a, b, this.ze); this.ze = d; return d; } else { var e = this.za(a, b, this.ze); e.d = true; this.ze = e; return e; } }; ScatterBase.prototype.zv = function () { return (this.assigningScatterStyle != null && this.zl) || this.d2 || (this.bx != 1) || (this.cp != 1) || (this.co != 1); }; ScatterBase.prototype.zu = function () { return (this.assigningScatterMarkerStyle != null && this.zk) || this.d2 || (this.bx != 1) || (this.cp != 1) || (this.co != 1); }; ScatterBase.prototype.abq = function (a, b) { var _this = this; this.qx(); var c = b.bx; this.yw = ((function () { var $ret = new ScatterAxisInfoCache(); $ret.a = _this.xAxis; $ret.b = _this.yAxis; $ret.d = _this.xAxis.ch; $ret.e = _this.yAxis.ch; return $ret; })()); if (this.xg()) { b.c0.j(a.j, this.xi); if (this.zu()) { this.aa5(b, a); } } b.cr(); var d = ((function () { var $ret = new Clipper(1, NaN, c.bottom, NaN, c.top, false); $ret.i = b.c2.g$j.an; return $ret; })()); b.c2.g$h(a.n, d); this.abn(a, b); }; ScatterBase.prototype.ak = function (a, b) { var c = new List$1(ChartSelection.$, 0); this.p4(a, c, b); return c.toArray(); }; ScatterBase.prototype.p4 = function (a, b, c) { this.aa7(a, b, c, 0, null); }; ScatterBase.prototype.aa7 = function (a, b, c, d, e) { var _this = this; var f = this.wr(a); var g = this.dn.count; var h = this.yw.a; var i = this.yw.b; var j = this.wj(this.cv); var k = new ScalerParams(0, f, this.db.wk, h.ch, this.getEffectiveViewport()); var l = new ScalerParams(0, f, this.db.wk, i.ch, this.getEffectiveViewport()); if (d == 0) { var _loop_2 = function (m) { var n = h.el(this_2.zh.item(m), k); var o = i.el(this_2.zi.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.dn.item(m); return $ret; })())); } else { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dn.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.el(this_3.zh.item(p), k); var r = i.el(this_3.zi.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.dn.item(p); return $ret; })())); } else { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dn.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.yp = function (a, b) { return this.yq(a, b); }; ScatterBase.prototype.yq = function (a, b) { if (b < a || a < 0 || a > this.zh.count || b < 0 || b > this.zh.count) { return null; } var c = new Array((b - a) + 1); for (var d = a; d <= b; d++) { var e = d; c[d - a] = this.dn.item(d); } return c; }; ScatterBase.prototype.aa5 = function (a, b) { var _this = this; a.b7 = true; this.y9.ay(this, this.zu(), runOn(this, this.yp)); var c = this.y9.d; var d = c != null; var e = this.getEffectiveViewport1(a); var f = this.dn == null ? 0 : this.dn.count; this.yx.cj(function (g) { if (g._visibility == 0) { var h = g.ak; var i = g.content; if (i == null) { i = new DataContext(); g.content = i; } if (d) { _this.aba(h, f, a.q); } _this.y9.ac(g, i); } }); }; ScatterBase.prototype.abb = function (a, b, c) { var d = this.bx != 1; var e = this.cp != 1; var f = this.co != 1; this.y9.a0(this.y9.b, a, b, false); this.y9.ab(this.ib); var g = this.y9.ax; var h = null; var i = null; var j = null; var k = this.dn; if (d && this.db != null) { h = this.db.dl.getHighlightingInfo(this, k, g.z, g.y, false); g.c = h; } if (e && this.db != null) { h = this.db.dm.getHighlightingInfo(this, k, g.z, g.y, false); g.d = h; } if (f && this.db != null) { h = this.db.dk.getHighlightingInfo(this, k, g.z, g.y, false); g.b = h; } g.h = c; this.abl(g); this.y9.z(this, h, i, j, c, d, e, f, a < 0); }; ScatterBase.prototype.aba = function (a, b, c) { var d = this.bx != 1; var e = this.cp != 1; var f = this.co != 1; this.y9.a0(this.y9.d, a, b, true); this.y9.aa(this.ib); var g = this.y9.aw; var h = null; var i = null; var j = null; var k = this.dn; var l = null; var m = null; var n = null; if (d && this.db != null) { h = this.db.dl.getHighlightingInfo(this, k, g.z, g.y, true); if (this.db.dl.isCrossContextHighlight(this)) { l = this.db.dl.getHighlightingInfo(this, k, g.z, g.y, true); } g.c = h; } if (e && this.db != null) { i = this.db.dm.getHighlightingInfo(this, k, g.z, g.y, true); if (i == null && this.bn != null) { i = this.db.dm.getHighlightingInfo(this.bn, this.bn.dn, g.z, g.y, true); } if (i == null && this.bk != null) { i = this.db.dm.getHighlightingInfo(this.bk, this.bk.dn, g.z, g.y, true); } if (this.db.dm.isCrossContextHighlight(this)) { m = this.db.dm.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } if (f && this.db != null) { j = this.db.dk.getHighlightingInfo(this, k, g.z, g.y, true); if (this.db.dk.isCrossContextHighlight(this)) { n = this.db.dk.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } g.h = c; this.abk(g); this.y9.y(this, h, i, j, c, d, e, f, g.v, this.db.dl.totalHighWaterMark, g.x, this.db.dm.totalHighWaterMark, g.t, this.db.dk.totalHighWaterMark); }; ScatterBase.prototype.abl = function (a) { if (this.assigningScatterStyle != null && this.zl) { this.assigningScatterStyle(this, a); } }; ScatterBase.prototype.abk = function (a) { if (this.assigningScatterMarkerStyle != null && this.zk) { this.assigningScatterMarkerStyle(this, a); } }; ScatterBase.prototype.abd = function (a, b) { var e_3, _a; var c = new ErrorBarsHelper(this, b); if (this.yy ==