UNPKG

igniteui-angular-charts

Version:

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

1,382 lines (1,381 loc) 75.6 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 { 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 { CoreGeometryUtil } from "igniteui-angular-core"; import { GeometryUtil } from "igniteui-angular-core"; import { HashPool$2 } from "igniteui-angular-core"; import { DataContext } from "igniteui-angular-core"; import { ScatterTrendLineManager } from "./ScatterTrendLineManager"; import { TrendResolutionParams } from "./TrendResolutionParams"; 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 */ export let ScatterBase = /*@__PURE__*/ (() => { class ScatterBase extends MarkerSeries { constructor() { super(); this.zg = null; this.zz = null; this.z0 = null; this.ac5 = null; this.ac6 = null; this.zp = 1; this.y6 = null; this.y7 = null; this.zm = null; this.zo = null; this.zk = null; this.z5 = false; this.z4 = false; this.zx = null; this.zy = null; this.assigningScatterStyle = null; this.assigningScatterMarkerStyle = null; this.zt = null; this.zn = null; this.zj = null; this.z3 = true; this.aai = 0; this.aaj = 0; this.aak = 0; this.aal = 0; this.zq = this.zr(); this.zt = new ScatterSeriesRenderManager(); this.zn = new ScatterFrame(); this.ac6 = Rect.empty; this.ac5 = Rect.empty; } ct() { return new ScatterBaseView(this); } pe() { super.pe(); this.xAxis = null; this.yAxis = null; } rg(a) { super.rg(a); this.zh = a; } get_fz() { return true; } ai() { return [this.xAxis, this.yAxis]; } kz(a, b) { let c = this.no(b); if (c == ScatterBase.$$p[12]) { return this.k0(a, b, this.abd); } if (c == ScatterBase.$$p[16]) { return this.k0(a, b, this.abl); } if (c == ScatterBase.$$p[1]) { return this.k0(a, b, this.aax); } if (c == ScatterBase.$$p[2]) { return this.k0(a, b, this.aaz); } return null; } mo(a) { let b = this.no(a); if (b == ScatterBase.$$p[12]) { return this.abd; } if (b == ScatterBase.$$p[16]) { return this.abl; } if (b == ScatterBase.$$p[1]) { return this.aax; } if (b == ScatterBase.$$p[2]) { return this.aaz; } return super.mo(a); } ed(a, b, c, d, e) { if (!this.hasMarkers) { return false; } let f = this.xAxis; let g = new ScalerParams(1, this.dc.yr, this.xc, f.dn); g.c = this.getEffectiveViewport1(this.cw); let h = this.yAxis; let i = new ScalerParams(1, this.dc.yr, this.xc, h.dn); i.c = this.getEffectiveViewport1(this.cw); a.clear(); this.xq.cw((j) => { if (j._visibility == 0) { let k = new SeriesPointOfInterest(); let l = j.n; let m = j.o; if (!e && (l < this.xc.left || l > this.xc.right || m < this.xc.top || m > this.xc.bottom)) { return; } k.d = f.f8(l, g); k.e = h.f8(m, i); k.b = j.content; k.g = this.vz; k.c = j.ak; if (this.hf) { k.g = this.v6(j.ak); } a.add(k); } }); return true; } b3() { if (this.b4 == 0) { { return 1; } } else { return super.b3(); } } w9(a) { if (!this.hasMarkers || !this.x0()) { return Rect.empty; } let b = this.xq.ce(this.wq(a)); if (b != null) { return this.xq.c7(b); } return Rect.empty; } g2(a, b) { if (this.x1(a, b)) { return true; } return false; } get z1() { return this.zz; } set z1(a) { if (this.zz != a) { let b = this.z1; this.zz = a; this.raisePropertyChanged("XColumn", b, this.z1); } } get z2() { return this.z0; } set z2(a) { if (this.z0 != a) { let b = this.z2; this.z0 = a; this.raisePropertyChanged("YColumn", b, this.z2); } } gh() { return this.highlightedItemsSource != null || (this.aax != null && this.aaz != null); } aag() { return false; } hz() { let a = super.hz(); { let b = ((() => { let $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.abt)); a.add(b); } { let c = ((() => { let $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.abs)); a.add(c); } if (this.aag()) { let d = ((() => { let $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "DashArray"; $ret.p = true; $ret.x = ((() => { let $ret = new DoubleCollection(); $ret.add(5); $ret.add(5); return $ret; })()); $ret.q = true; return $ret; })()); a.add(d); } if (!this.aag()) { let e = ((() => { let $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.sh)); a.add(e); } if (!this.aag()) { let f = ((() => { let $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.sh)); a.add(f); } return a; } abs(a, b) { if (this.aax != null) { b.value = this.aax; return; } b.value = this.abd; } abt(a, b) { if (this.aaz != null) { b.value = this.aaz; return; } b.value = this.abl; } get ac2() { return this.c(ScatterBase.acd); } set ac2(a) { this.h(ScatterBase.acd, a); } get GetErrorBarsXAxis() { return this.xAxis; } get GetErrorBarsYAxis() { return this.yAxis; } qo() { super.qo(); if (this.xAxis != null) { this.xAxis.lv(false); } if (this.yAxis != null) { this.yAxis.lv(false); } } rp(a, b, c, d) { super.rp(a, b, c, d); if (this.zh.df.g$e(a, b, c, d)) { this.r7(false); this.qz(); } switch (b) { case ScatterBase.$$p[10]: case ScatterBase.$$p[14]: case ScatterBase.$$p[11]: case ScatterBase.$$p[15]: this.qt(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.z1); c.deregisterColumn(this.z2); this.z1 = null; this.z2 = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.z1 = this.dl(this.abd); this.z2 = this.dl(this.abl); } if ((this.yAxis != null && !this.yAxis.ec()) || (this.xAxis != null && !this.xAxis.ec())) { this.r7(this.gm && c != null); } break; case ScatterBase.$$p[9]: if (c != null) { c.cx(this); } if (d != null) { d.d3(this); } if ((this.xAxis != null && !this.xAxis.ec()) || (d == null && c != null)) { this.r7(false); } this.qz(); break; case ScatterBase.$$p[13]: if (c != null) { c.cx(this); } if (d != null) { d.d3(this); } if ((this.yAxis != null && !this.yAxis.ec()) || (d == null && c != null)) { this.r7(false); } this.qz(); break; case ScatterBase.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.z1); this.z1 = this.dl(this.abd); } break; case "XColumn": this.zh.df.g$m(); if (this.xAxis != null && !this.xAxis.ec()) { this.r7(this.gm && this.d9); } break; case ScatterBase.$$p[16]: if (this.dp != null) { this.dp.deregisterColumn(this.z2); this.z2 = this.dl(this.abl); } break; case "YColumn": this.zh.df.g$m(); if (this.yAxis != null && !this.yAxis.ec()) { this.r7(this.gm && this.d9); } break; case ScatterBase.$$p[7]: this.r7(false); this.qz(); break; case ScatterBase.$$p[8]: this.r7(false); this.qz(); break; case "TransitionProgress": this.zo.d(this.jz, this.zm, this.zk); this.abn(); try { if (this.d7(this.cw)) { return; } if ((Math.round(this.jz * 100000) / 100000) == 1) { this.aca(this.zk, this.zh); } else { this.aca(this.zo, this.zh); } if (this.dc != null) { this.dc.st(this); } } finally { this.acb(); } break; case "TrendLineBrush": this.rv(b); break; case ScatterBase.$$p[0]: if (this.zi != null) { this.zi.r = this; } this.r7(false); this.qz(); break; case "TrendLineType": this.qz(); break; case ScatterBase.$$p[4]: this.z5 = this.aad(); this.r7(false); break; case ScatterBase.$$p[3]: this.z4 = this.aac(); this.r7(false); break; case ScatterBase.$$p[5]: this.zq = this.zr(); break; } } aad() { return this.z9; } aac() { return this.z8; } z7(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } z6(a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; } acb() { this.ac5 = Rect.empty; this.ac6 = Rect.empty; } abn() { let a = this.getViewInfo(this.ac5, this.ac6); this.ac5 = a.p0; this.ac6 = a.p1; } aab(a, b) { if (b != 3) { return true; } if (a == null) { return true; } if (this.abd == a || this.abl == a) { return true; } return false; } pn(a, b, c, d) { let e = false; if (!this.aab(d, a)) { return; } this.zh.df.g$i(a, b, c, d); if (this.zh.aa.count > 0) { for (let f of fromEnum(this.zh.aa)) { f.g$i(a, b, c, d); } } if (this.xAxis != null && !this.xAxis.ec()) { e = true; } if (this.yAxis != null && !this.yAxis.ec()) { e = true; } if (a == 0 || a == 2 || a == 3 || a == 4) { this.z3 = true; } else if (a == 1) { for (let g = b; g < b + c; g++) { this.aai += this.z1.item(g); this.aaj += this.z2.item(g); } this.aak = this.aai / this.z1.count; this.aal = this.aaj / this.z2.count; } if (e) { this.r7(true); } } ab2(a) { this.ab3(a, null); } ab3(a, b) { let c = this.z1 != null ? this.z1.count : 0; let d = this.z2 != null ? this.z2.count : 0; let e = Math.min(c, d); if (e <= this.aat) { a.q.clear(); let f = new List$1(OwnedPoint.$, 0); for (let g of fromEnum(a.y.values)) { f.add(g); } let h = this.dp; f.aa((i, j) => { let k = h.indexOf(i.a); let l = h.indexOf(j.a); if (k < l) { return -1; } if (k > l) { return 1; } return 0; }); if (b != null) { b.i = a.q; } for (let i of fromEnum(f)) { if (h.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 }); } } } } } ay(a) { if (a != null && a == this.xAxis && this.z1 != null) { return new AxisRange(this.z1.minimum, this.z1.maximum); } if (a != null && a == this.yAxis && this.z2 != null) { return new AxisRange(this.z2.minimum, this.z2.maximum); } return null; } kw(a) { let b = this.kc(a); if (this.dp != null && b >= 0 && b < this.dp.count) { return this.dp.item(b); } return null; } get zq() { return this.zp; } set zq(a) { let b = this.zp; this.zp = a; if (b != this.zp) { this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.zp)); } } zr() { if (this.zs != 0) { return this.zs; } return this.aaa ? 4 : 1; } kc(a) { let b = truncate(Math.round(this.iy(a))); return b; } iy(a) { switch (this.zq) { case 1: return this.aap(a); case 3: return this.aaq(a); case 2: return this.aan(a); case 4: return this.aao(a); case 5: return this.aam(a); } return -1; } aao(a) { return this.aar(a, false); } aan(a) { let b = this.wq(a); let c = b.x; let d = b.y; if (this.dp == null || this.xAxis == null || this.yAxis == null || this.z1 == null || this.z2 == null) { return -1; } if (this.dp.count > this.aas) { return -1; } this.abq(); let e = this.y6; let f = this.y7; if (e == null || f == null) { return -1; } let g = 1.7976931348623157E+308; let h = -1; for (let i = 0; i < this.z1.count; i++) { let j = e[i]; let k = f[i]; let l = (c - j) * (c - j) + (d - k) * (d - k); if (l < g) { g = l; h = i; } } return h; } abq() { let a = this.cw.ca; let b = this.cw.b9; let c = this.getEffectiveViewport(); if (this.zg == null) { return; } let d = new ScalerParams(0, a, b, this.zg.d, c); let e = ((() => { let $ret = new ScalerParams(0, a, b, this.zg.e, c); $ret.b = this.i5(); return $ret; })()); if (this.y6 == null || this.y7 == null) { let f = arrayShallowClone(this.z1.asArray()); let g = arrayShallowClone(this.z2.asArray()); this.xAxis.ky(boxArray$1(f), 0, f.length, d); this.yAxis.ky(boxArray$1(g), 0, g.length, e); this.y6 = f; this.y7 = g; } } get_aaa() { return false; } get aaa() { return this.get_aaa(); } aar(a, b) { if (!this.aaa) { return -1; } let c = { $type: Point_$type, x: 0, y: 0 }; let d = true; let e = this.zl(); if (e == null) { return -1; } if (e.q == null) { return -1; } if (this.dp == null || this.dp.count > this.aas) { return -1; } this.abq(); let f = this.y6; let g = this.y7; if (f == null || g == null) { return -1; } let h = this.wq(a); let i = 1.7976931348623157E+308; let j = -1; for (let k = 0; k < this.y6.length; k++) { let l = { $type: Point_$type, x: this.y6[k], y: this.y7[k] }; if (k > 0) { if (!b || e.m.containsKey(this.dp.item(k)) || e.m.containsKey(this.dp.item(k - 1))) { let m = CoreGeometryUtil.q(h, c, l); if (m < i) { i = m; j = k; } } } c = l; } if (j >= 0) { let n = { $type: Point_$type, x: this.y6[j], y: this.y7[j] }; let o = { $type: Point_$type, x: this.y6[j - 1], y: this.y7[j - 1] }; if (!b || (e.m.containsKey(this.dp.item(j)) && e.m.containsKey(this.dp.item(j - 1)))) { let 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; } aaq(a) { return this.aar(a, true); } aam(a) { let b = this.wq(a); let c = b.x; let d = b.y; if (this.zh.dg.e > this.aas) { return -1; } let e = -1; this.xq.cx((f) => { let g = this.zh.c7(f); let h = g.left; let i = g.top; let j = g.width; let k = g.height; if (this.xx) { let l = h + j / 2; let m = i + k / 2; let n = (j / 2) * (j / 2); let 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; } aap(a) { let b = null; let c = 1.7976931348623157E+308; let d = this.wq(a); let e = d.x; let f = d.y; if (this.zh.dg.e > this.aas) { return -1; } this.zh.dn((g) => { if (g._visibility == 0) { let h = this.zh.c7(g); let i = h.left + h.width / 2; let j = h.top + h.height / 2; let k = (e - i) * (e - i) + (f - j) * (f - j); if (k < c) { c = k; b = g; } } }); if (b != null) { return b.ak; } return -1; } wv(a, b, c) { if (this.xAxis == null || this.yAxis == null || this.z1 == null || this.z2 == null) { return { $type: Point_$type, x: NaN, y: NaN }; } let d = this.cw.ca; let e = this.cw.b9; let f = this.getEffectiveViewport(); let g = new ScalerParams(0, d, e, this.xAxis.dn, f); let h = ((() => { let $ret = new ScalerParams(0, d, e, this.yAxis.dn, f); $ret.b = this.i5(); return $ret; })()); if (b) { let i = this.iy(a); if (i == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } let j = truncate(Math.floor(i)); let 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) { let l = this.xAxis.f5(this.z1.item(j), g); let m = this.yAxis.f5(this.z2.item(j), h); return { $type: Point_$type, x: l, y: m }; } let n = i - Math.floor(i); let o = this.xAxis.f5(this.z1.item(j), g); let p = this.yAxis.f5(this.z2.item(j), h); let q = this.xAxis.f5(this.z1.item(k), g); let r = this.yAxis.f5(this.z2.item(k), h); let s = q - o; let t = r - p; return { $type: Point_$type, x: o + s * n, y: p + t * n }; } else { let u = this.kc(a); if (u == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } let v = this.xAxis.f5(this.z1.item(u), g); let w = this.yAxis.f5(this.z2.item(u), h); return { $type: Point_$type, x: v, y: w }; } } gj(a) { let b = this.dc != null ? this.dc.yr : Rect.empty; b = b.copy(); let c = this.dc != null ? this.dc.y9 : Rect.empty; let d = new Rect(0, 0, 0, 1, 1); let e = this.w5(this.cw); let f = new ScalerParams(0, d, d, this.xAxis.dn, e); let g = ((() => { let $ret = new ScalerParams(0, d, d, this.yAxis.dn, e); $ret.b = this.i5(); return $ret; })()); let h = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1; let i = this.xAxis != null && this.z1 != null && h < this.z1.count ? this.xAxis.f5(this.z1.item(h), f) : NaN; let j = this.yAxis != null && this.z2 != null && h < this.z2.count ? this.yAxis.f5(this.z2.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; } s7(a, b) { this.r7(false); } s8(a, b) { this.r7(false); } zl() { let a = this.zk; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.zo; } return a; } abo(a, b, c, d, e) { b.j = new Dictionary$2(Base.$, OwnedPoint.$, 1, c); let f = this.getEffectiveViewport1(a); let g = this.dp; let h; let i; let j = ((() => { let $ret = new ScalerParams(0, d, e, this.zg.d, f); $ret.c = this.getEffectiveViewport1(a); return $ret; })()); let k = ((() => { let $ret = new ScalerParams(0, d, e, this.zg.e, f); $ret.c = this.getEffectiveViewport1(a); $ret.b = this.i5(); return $ret; })()); let l = false; let m = 0; if (this.dc != null) { if (this.dc.g0()) { let n = this.dc.oj(d, j); l = n.c; m = n.d; } } for (let o = 0; o < c; o++) { h = this.z1.item(o); i = this.z2.item(o); let p = { $type: Point_$type, x: this.zg.a.f5(h, j), y: this.zg.b.f5(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)) { let q = g.item(o); if (!b.j.containsKey(q)) { let r = { $type: Point_$type, x: h, y: i }; let s = { $type: Point_$type, x: p.x, y: p.y }; b.j.addItem(q, ((() => { let $ret = new OwnedPoint(); $ret.a = q; $ret.b = r; $ret.c = s; return $ret; })())); } } } } abz(a, b) { this.y6 = null; this.y7 = null; a.m.clear(); a.r.clear(); a.k.clear(); a.o.clear(); a.l.clear(); a.n.clear(); let c = Math.min(this.z1 != null ? this.z1.count : 0, this.z2 != null ? this.z2.count : 0); let d = b.ca; let e = b.b9; let f = this.getEffectiveViewport1(b); let g = new ScalerParams(0, d, e, this.xAxis.dn, f); g.c = this.getEffectiveViewport1(b); let h = ((() => { let $ret = new ScalerParams(0, d, e, this.yAxis.dn, f); $ret.b = this.i5(); return $ret; })()); h.c = this.getEffectiveViewport1(b); if (c < 1) { return; } this.zg = ((() => { let $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; })()); let i = b; if (c <= this.aat) { this.abo(i, a, c, d, e); } if (this.x0()) { b.dd.l(a.m, this.aat, d, e, this.ik); } let j = ((() => { let $ret = new Clipper(0, e, false); $ret.i = a.r; return $ret; })()); let k = this.w3(b); let l = this.xAxis.f8(k.left, g); let m = this.xAxis.f8(k.right, g); b.df.j(a.r, this.trendLineType, this.z1, this.z2, this.trendLinePeriod, (n) => this.xAxis.f5(n, g), (n) => this.yAxis.f5(n, h), ((() => { let $ret = new TrendResolutionParams(); $ret.d = this.ik; $ret.i = e; $ret.h = f; $ret.j = d; return $ret; })()), j, l, m); if (b.aa.count > 0) { a.p.clear(); for (let n = 0; n < b.aa.count; n++) { a.p.add(new List$1(Point_$type, 0)); let o = b.aa._inner[n]; o.j(a.p._inner[n], o.g$b, this.z1, this.z2, o.g$f, (p) => this.xAxis.f5(p, g), (p) => this.yAxis.f5(p, h), ((() => { let $ret = new TrendResolutionParams(); $ret.d = this.ik; $ret.i = e; $ret.h = f; $ret.j = d; return $ret; })()), j, l, m); } } this.abx(a, b); } ph(a, b) { super.ph(a, b); let c = b; c.dm(a); } get_fh() { return true; } zv(a, b, c) { return null; } zw(a, b, c) { if (this.dp == null) { return null; } let d = this.zl(); let e = this.zh.ce(this.wq(b)); let f = -1; if (e == null) { if (a != null) { f = this.dp.indexOf(a); } else { return null; } } else { f = e.ak; } if (f == -1) { return null; } let 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; } xf(a, b) { if (this.xs != 1 && this.xs != 13) { let c = this.xq.c8(); let d = (c.width / 2) + (this.x3 / 2); let e = (c.height / 2) + (this.x3 / 2); let f = d; let g = d; let h = e; let 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); } zu(a, b, c) { let 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; } dh(a, b, c) { if (this.ef && this.f2(this.by) && !c) { let d = this.zv(a, b, this.zx); this.zx = d; return d; } else { let e = this.zu(a, b, this.zx); this.zx = e; return e; } } di(a, b, c) { if (this.f2(this.by) && !c) { let d = this.zw(a, b, this.zy); this.zy = d; return d; } else { let e = this.zu(a, b, this.zy); e.d = true; this.zy = e; return e; } } aaf() { return (this.assigningScatterStyle != null && this.z5) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } aae() { return (this.assigningScatterMarkerStyle != null && this.z4) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } aca(a, b) { this.rc(); let c = b.b9; this.zg = ((() => { let $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.x0()) { b.dd.j(a.m, this.x2); if (this.aae()) { this.abp(b, a); } } b.c4(); let d = ((() => { let $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 (let e = 0; e < b.aa.count; e++) { let f = b.aa._inner[e]; f.g$l(a.p._inner[e], d); } } this.ab7(a, b); } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.qh(a, c, b); return c.toArray(); } qh(a, b, c) { this.abr(a, b, c, 0, null); } abr(a, b, c, d, e) { let f = this.dc.y6(this.dc.yw(a)); let g = this.dp.count; let h = this.zg.a; let i = this.zg.b; let j = this.dc.yz(this.xc, this.getEffectiveViewport(), f); let k = new ScalerParams(0, f, this.dc.y9, h.dn, this.getEffectiveViewport()); let l = new ScalerParams(0, f, this.dc.y9, i.dn, this.getEffectiveViewport()); if (d == 0) { for (let m = 0; m < g; m++) { let n = h.f5(this.z1.item(m), k); let o = i.f5(this.z2.item(m), l); if (n < j.width && n > 0 && o < j.height && o > 0) { if (c == 7 || c == 6) { b.add(((() => { let $ret = new ChartSelection(); $ret.series = this; return $ret; })())); return; } else if (c == 2 || c == 1) { b.add(((() => { let $ret = new ChartSelection(); $ret.item = this.dp.item(m); return $ret; })())); } else { b.add(((() => { let $ret = new ChartSelection(); $ret.item = this.dp.item(m); $ret.series = this; return $ret; })())); } } } } else { for (let p = 0; p < g; p++) { let q = h.f5(this.z1.item(p), k); let r = i.f5(this.z2.item(p), l); let s = e.item(p) / f.height; let t = e.item(p) / f.width; let u = new Rect(0, q - t / 2, r - s / 2, t, s); if (j.intersectsWith(u)) { if (c == 7 || c == 6) { b.add(((() => { let $ret = new ChartSelection(); $ret.series = this; return $ret; })())); return; } else if (c == 2 || c == 1) { b.add(((() => { let $ret = new ChartSelection(); $ret.item = this.dp.item(p); return $ret; })())); } else { b.add(((() => { let $ret = new ChartSelection(); $ret.item = this.dp.item(p); $ret.series = this; return $ret; })())); } } } } } y9(a, b) { return this.za(a, b); } za(a, b) { if (b < a || a < 0 || a > this.z1.count || b < 0 || b > this.z1.count) { return null; } let c = new Array((b - a) + 1); for (let d = a; d <= b; d++) { let e = d; c[d - a] = this.dp.item(d); } return c; } abp(a, b) { a.ck = true; this.zt.ay(this, this.aae(), runOn(this, this.y9)); let c = this.zt.d; let d = c != null; let e = this.getEffectiveViewport1(a); let f = this.dp == null ? 0 : this.dp.count; this.zh.cw((g) => { if (g._visibility == 0) { let h = g.ak; let i = g.content; if (i == null) { i = new DataContext(); g.content = i; } if (d) { this.abu(h, f, a.t); } this.zt.ac(g, i); } }); } abv(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.zt.a0(this.zt.b, a, b, false); this.zt.ab(this.ii); let g = this.zt.ax; let h = null; let i = null; let j = null; let 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.ab5(g); this.zt.z(this, h, i, j, c, d, e, f, a < 0); } abu(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.zt.a0(this.zt.d, a, b, true); this.zt.aa(this.ii); let g = this.zt.aw; let h = null; let i = null; let j = null; let k = this.dp; let l = null; let m = null; let 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.ab4(g); this.zt.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); } ab5(a) { if (this.assigningScatterStyle != null && this.z5) { this.assigningScatterStyle(this, a); } } ab4(a) { if (this.assigningScatterMarkerStyle != null && this.z4) { this.assigningScatterMarkerStyle(this, a);