UNPKG

igniteui-react-charts

Version:

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

1,421 lines 73.5 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { 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 */ export let ScatterBase = /*@__PURE__*/ (() => { class ScatterBase extends MarkerSeries { ct() { return new ScatterBaseView(this); } pg() { super.pg(); this.xAxis = null; this.yAxis = null; } ri(a) { super.ri(a); this.zj = a; } get_f0() { return true; } ai() { return [this.xAxis, this.yAxis]; } k0(a, b) { let c = this.np(b); if (c == ScatterBase.$$p[12]) { return this.k1(a, b, this.abf); } if (c == ScatterBase.$$p[16]) { return this.k1(a, b, this.abn); } if (c == ScatterBase.$$p[1]) { return this.k1(a, b, this.aaz); } if (c == ScatterBase.$$p[2]) { return this.k1(a, b, this.aa1); } return null; } mp(a) { let b = this.np(a); if (b == ScatterBase.$$p[12]) { return this.abf; } if (b == ScatterBase.$$p[16]) { return this.abn; } if (b == ScatterBase.$$p[1]) { return this.aaz; } if (b == ScatterBase.$$p[2]) { return this.aa1; } return super.mp(a); } ed(a, b, c, d, e) { if (!this.hasMarkers) { return false; } let f = this.xAxis; let g = new ScalerParams(1, this.dc.ys, this.xe, f.dn); g.c = this.getEffectiveViewport1(this.cw); let h = this.yAxis; let i = new ScalerParams(1, this.dc.ys, this.xe, h.dn); i.c = this.getEffectiveViewport1(this.cw); a.clear(); this.xs.cw((j) => { if (j._visibility == 0) { let k = new SeriesPointOfInterest(); let l = j.n; let m = j.o; if (!e && (l < this.xe.left || l > this.xe.right || m < this.xe.top || m > this.xe.bottom)) { return; } k.d = f.ga(l, g); k.e = h.ga(m, i); k.b = j.content; k.g = this.v1; k.c = j.ak; if (this.hg) { k.g = this.v8(j.ak); } a.add(k); } }); return true; } b3() { if (this.b4 == 0) { { return 1; } } else { return super.b3(); } } xb(a) { if (!this.hasMarkers || !this.x2()) { return Rect.empty; } let b = this.xs.ce(this.ws(a)); if (b != null) { return this.xs.c7(b); } return Rect.empty; } g3(a, b) { if (this.x3(a, b)) { return true; } return false; } constructor() { super(); this.zi = null; this.z1 = null; this.z2 = null; this.ac7 = null; this.ac8 = null; this.zr = 1; this.y8 = null; this.y9 = null; this.zo = null; this.zq = null; this.zm = null; this.z7 = false; this.z6 = false; this.zz = null; this.z0 = null; this.assigningScatterStyle = null; this.assigningScatterMarkerStyle = null; this.zv = null; this.zp = null; this.zl = null; this.z5 = true; this.aak = 0; this.aal = 0; this.aam = 0; this.aan = 0; this.zs = this.zt(); this.zv = new ScatterSeriesRenderManager(); this.zp = new ScatterFrame(); this.ac8 = Rect.empty; this.ac7 = Rect.empty; } get z3() { return this.z1; } set z3(a) { if (this.z1 != a) { let b = this.z3; this.z1 = a; this.raisePropertyChanged("XColumn", b, this.z3); } } get z4() { return this.z2; } set z4(a) { if (this.z2 != a) { let b = this.z4; this.z2 = a; this.raisePropertyChanged("YColumn", b, this.z4); } } gi() { return this.highlightedItemsSource != null || (this.aaz != null && this.aa1 != null); } aai() { return false; } h0() { let a = super.h0(); { 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.abv)); 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.abu)); a.add(c); } if (this.aai()) { 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.aai()) { 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.sj)); a.add(e); } if (!this.aai()) { 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.sj)); a.add(f); } return a; } abu(a, b) { if (this.aaz != null) { b.value = this.aaz; return; } b.value = this.abf; } abv(a, b) { if (this.aa1 != null) { b.value = this.aa1; return; } b.value = this.abn; } get ac4() { return this.c(ScatterBase.acf); } set ac4(a) { this.h(ScatterBase.acf, a); } get GetErrorBarsXAxis() { return this.xAxis; } get GetErrorBarsYAxis() { return this.yAxis; } qq() { super.qq(); if (this.xAxis != null) { this.xAxis.l0(false); } if (this.yAxis != null) { this.yAxis.l0(false); } } rr(a, b, c, d) { super.rr(a, b, c, d); if (this.zj.df.g$e(a, b, c, d)) { this.r9(false); this.q1(); } switch (b) { case ScatterBase.$$p[10]: case ScatterBase.$$p[14]: case ScatterBase.$$p[11]: case ScatterBase.$$p[15]: this.qv(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.z3); c.deregisterColumn(this.z4); this.z3 = null; this.z4 = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.z3 = this.dl(this.abf); this.z4 = this.dl(this.abn); } if ((this.yAxis != null && !this.yAxis.ee()) || (this.xAxis != null && !this.xAxis.ee())) { this.r9(this.gn && 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.r9(false); } this.q1(); 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.r9(false); } this.q1(); break; case ScatterBase.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.z3); this.z3 = this.dl(this.abf); } break; case "XColumn": this.zj.df.g$m(); if (this.xAxis != null && !this.xAxis.ee()) { this.r9(this.gn && this.d9); } break; case ScatterBase.$$p[16]: if (this.dp != null) { this.dp.deregisterColumn(this.z4); this.z4 = this.dl(this.abn); } break; case "YColumn": this.zj.df.g$m(); if (this.yAxis != null && !this.yAxis.ee()) { this.r9(this.gn && this.d9); } break; case ScatterBase.$$p[7]: this.r9(false); this.q1(); break; case ScatterBase.$$p[8]: this.r9(false); this.q1(); break; case "TransitionProgress": this.zq.d(this.j0, this.zo, this.zm); this.abp(); try { if (this.d7(this.cw)) { return; } if ((Math.round(this.j0 * 100000) / 100000) == 1) { this.acc(this.zm, this.zj); } else { this.acc(this.zq, this.zj); } if (this.dc != null) { this.dc.su(this); } } finally { this.acd(); } break; case "TrendLineBrush": this.rx(b); break; case ScatterBase.$$p[0]: if (this.zk != null) { this.zk.r = this; } this.r9(false); this.q1(); break; case "TrendLineType": this.q1(); break; case ScatterBase.$$p[4]: this.z7 = this.aaf(); this.r9(false); break; case ScatterBase.$$p[3]: this.z6 = this.aae(); this.r9(false); break; case ScatterBase.$$p[5]: this.zs = this.zt(); break; } } aaf() { return this.aab; } aae() { return this.aaa; } z9(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } z8(a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; } acd() { this.ac7 = Rect.empty; this.ac8 = Rect.empty; } abp() { let a = this.getViewInfo(this.ac7, this.ac8); this.ac7 = a.p0; this.ac8 = a.p1; } aad(a, b) { if (b != 3) { return true; } if (a == null) { return true; } if (this.abf == a || this.abn == a) { return true; } return false; } pp(a, b, c, d) { let e = false; if (!this.aad(d, a)) { return; } this.zj.df.g$i(a, b, c, d); if (this.zj.aa.count > 0) { for (let f of fromEnum(this.zj.aa)) { f.g$i(a, b, c, d); } } 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.z5 = true; } else if (a == 1) { for (let g = b; g < b + c; g++) { this.aak += this.z3.item(g); this.aal += this.z4.item(g); } this.aam = this.aak / this.z3.count; this.aan = this.aal / this.z4.count; } if (e) { this.r9(true); } } ab4(a) { this.ab5(a, null); } ab5(a, b) { let c = this.z3 != null ? this.z3.count : 0; let d = this.z4 != null ? this.z4.count : 0; let e = Math.min(c, d); if (e <= this.aav) { 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.z3 != null) { return new AxisRange(this.z3.minimum, this.z3.maximum); } if (a != null && a == this.yAxis && this.z4 != null) { return new AxisRange(this.z4.minimum, this.z4.maximum); } return null; } kx(a) { let b = this.kd(a); if (this.dp != null && b >= 0 && b < this.dp.count) { return this.dp.item(b); } return null; } get zs() { return this.zr; } set zs(a) { let b = this.zr; this.zr = a; if (b != this.zr) { this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.zr)); } } zt() { if (this.zu != 0) { return this.zu; } return this.aac ? 4 : 1; } kd(a) { let b = truncate(Math.round(this.iz(a))); return b; } iz(a) { switch (this.zs) { case 1: return this.aar(a); case 3: return this.aas(a); case 2: return this.aap(a); case 4: return this.aaq(a); case 5: return this.aao(a); } return -1; } aaq(a) { return this.aat(a, false); } aap(a) { let b = this.ws(a); let c = b.x; let d = b.y; if (this.dp == null || this.xAxis == null || this.yAxis == null || this.z3 == null || this.z4 == null) { return -1; } if (this.dp.count > this.aau) { return -1; } this.abs(); let e = this.y8; let f = this.y9; if (e == null || f == null) { return -1; } let g = 1.7976931348623157E+308; let h = -1; for (let i = 0; i < this.z3.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; } abs() { let a = this.cw.ca; let b = this.cw.b9; let c = this.getEffectiveViewport(); if (this.zi == null) { return; } let d = new ScalerParams(0, a, b, this.zi.d, c); let e = ((() => { let $ret = new ScalerParams(0, a, b, this.zi.e, c); $ret.b = this.i6(); return $ret; })()); if (this.y8 == null || this.y9 == null) { let f = arrayShallowClone(this.z3.asArray()); let g = arrayShallowClone(this.z4.asArray()); this.xAxis.k3(boxArray$1(f), 0, f.length, d); this.yAxis.k3(boxArray$1(g), 0, g.length, e); this.y8 = f; this.y9 = g; } } get_aac() { return false; } get aac() { return this.get_aac(); } aat(a, b) { if (!this.aac) { return -1; } let c = { $type: Point_$type, x: 0, y: 0 }; let d = true; let e = this.zn(); if (e == null) { return -1; } if (e.q == null) { return -1; } if (this.dp == null || this.dp.count > this.aau) { return -1; } this.abs(); let f = this.y8; let g = this.y9; if (f == null || g == null) { return -1; } let h = this.ws(a); let i = 1.7976931348623157E+308; let j = -1; for (let k = 0; k < this.y8.length; k++) { let l = { $type: Point_$type, x: this.y8[k], y: this.y9[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.y8[j], y: this.y9[j] }; let o = { $type: Point_$type, x: this.y8[j - 1], y: this.y9[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; } aas(a) { return this.aat(a, true); } aao(a) { let b = this.ws(a); let c = b.x; let d = b.y; if (this.zj.dg.e > this.aau) { return -1; } let e = -1; this.xs.cx((f) => { let g = this.zj.c7(f); let h = g.left; let i = g.top; let j = g.width; let k = g.height; if (this.xz) { 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; } aar(a) { let b = null; let c = 1.7976931348623157E+308; let d = this.ws(a); let e = d.x; let f = d.y; if (this.zj.dg.e > this.aau) { return -1; } this.zj.dn((g) => { if (g._visibility == 0) { let h = this.zj.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; } wx(a, b, c) { if (this.xAxis == null || this.yAxis == null || this.z3 == null || this.z4 == 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.i6(); return $ret; })()); if (b) { let i = this.iz(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.f7(this.z3.item(j), g); let m = this.yAxis.f7(this.z4.item(j), h); return { $type: Point_$type, x: l, y: m }; } let n = i - Math.floor(i); let o = this.xAxis.f7(this.z3.item(j), g); let p = this.yAxis.f7(this.z4.item(j), h); let q = this.xAxis.f7(this.z3.item(k), g); let r = this.yAxis.f7(this.z4.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.kd(a); if (u == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } let v = this.xAxis.f7(this.z3.item(u), g); let w = this.yAxis.f7(this.z4.item(u), h); return { $type: Point_$type, x: v, y: w }; } } gk(a) { let b = this.dc != null ? this.dc.ys : Rect.empty; b = b.copy(); let c = this.dc != null ? this.dc.za : Rect.empty; let d = new Rect(0, 0, 0, 1, 1); let e = this.w7(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.i6(); return $ret; })()); let h = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1; let i = this.xAxis != null && this.z3 != null && h < this.z3.count ? this.xAxis.f7(this.z3.item(h), f) : NaN; let j = this.yAxis != null && this.z4 != null && h < this.z4.count ? this.yAxis.f7(this.z4.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; } s9(a, b) { this.r9(false); } ta(a, b) { this.r9(false); } zn() { let a = this.zm; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.zq; } return a; } abq(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.zi.d, f); $ret.c = this.getEffectiveViewport1(a); return $ret; })()); let k = ((() => { let $ret = new ScalerParams(0, d, e, this.zi.e, f); $ret.c = this.getEffectiveViewport1(a); $ret.b = this.i6(); return $ret; })()); let l = false; let m = 0; if (this.dc != null) { if (this.dc.g1()) { let n = this.dc.ok(d, j); l = n.c; m = n.d; } } for (let o = 0; o < c; o++) { h = this.z3.item(o); i = this.z4.item(o); let p = { $type: Point_$type, x: this.zi.a.f7(h, j), y: this.zi.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)) { 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; })())); } } } } ab1(a, b) { this.y8 = null; this.y9 = null; a.m.clear(); a.r.clear(); a.k.clear(); a.o.clear(); a.l.clear(); a.n.clear(); let c = Math.min(this.z3 != null ? this.z3.count : 0, this.z4 != null ? this.z4.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.i6(); return $ret; })()); h.c = this.getEffectiveViewport1(b); if (c < 1) { return; } this.zi = ((() => { 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.aav) { this.abq(i, a, c, d, e); } if (this.x2()) { b.dd.l(a.m, this.aav, d, e, this.il); } let j = ((() => { let $ret = new Clipper(0, e, false); $ret.i = a.r; return $ret; })()); let k = this.w5(b); let l = this.xAxis.ga(k.left, g); let m = this.xAxis.ga(k.right, g); b.df.j(a.r, this.trendLineType, this.z3, this.z4, this.trendLinePeriod, (n) => this.xAxis.f7(n, g), (n) => this.yAxis.f7(n, h), ((() => { let $ret = new TrendResolutionParams(); $ret.d = this.il; $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.z3, this.z4, o.g$f, (p) => this.xAxis.f7(p, g), (p) => this.yAxis.f7(p, h), ((() => { let $ret = new TrendResolutionParams(); $ret.d = this.il; $ret.i = e; $ret.h = f; $ret.j = d; return $ret; })()), j, l, m); } } this.abz(a, b); } pj(a, b) { super.pj(a, b); let c = b; c.dm(a); } get_fh() { return true; } zx(a, b, c) { return null; } zy(a, b, c) { if (this.dp == null) { return null; } let d = this.zn(); let e = this.zj.ce(this.ws(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; } xh(a, b) { if (this.xu != 1 && this.xu != 13) { let c = this.xs.c8(); let d = (c.width / 2) + (this.x5 / 2); let e = (c.height / 2) + (this.x5 / 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); } zw(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.f3(this.by) && !c) { let d = this.zx(a, b, this.zz); this.zz = d; return d; } else { let e = this.zw(a, b, this.zz); this.zz = e; return e; } } di(a, b, c) { if (this.f3(this.by) && !c) { let d = this.zy(a, b, this.z0); this.z0 = d; return d; } else { let e = this.zw(a, b, this.z0); e.d = true; this.z0 = e; return e; } } aah() { return (this.assigningScatterStyle != null && this.z7) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } aag() { return (this.assigningScatterMarkerStyle != null && this.z6) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } acc(a, b) { this.re(); let c = b.b9; this.zi = ((() => { 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.x2()) { b.dd.j(a.m, this.x4); if (this.aag()) { this.abr(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.ab9(a, b); } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.qj(a, c, b); return c.toArray(); } qj(a, b, c) { this.abt(a, b, c, 0, null); } abt(a, b, c, d, e) { let f = this.dc.y7(this.dc.yx(a)); let g = this.dp.count; let h = this.zi.a; let i = this.zi.b; let j = this.dc.y0(this.xe, this.getEffectiveViewport(), f); let k = new ScalerParams(0, f, this.dc.za, h.dn, this.getEffectiveViewport()); let l = new ScalerParams(0, f, this.dc.za, i.dn, this.getEffectiveViewport()); if (d == 0) { for (let m = 0; m < g; m++) { let n = h.f7(this.z3.item(m), k); let o = i.f7(this.z4.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.f7(this.z3.item(p), k); let r = i.f7(this.z4.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; })())); } } } } } zb(a, b) { return this.zc(a, b); } zc(a, b) { if (b < a || a < 0 || a > this.z3.count || b < 0 || b > this.z3.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; } abr(a, b) { a.ck = true; this.zv.ay(this, this.aag(), runOn(this, this.zb)); let c = this.zv.d; let d = c != null; let e = this.getEffectiveViewport1(a); let f = this.dp == null ? 0 : this.dp.count; this.zj.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.abw(h, f, a.t); } this.zv.ac(g, i); } }); } abx(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.zv.a0(this.zv.b, a, b, false); this.zv.ab(this.ij); let g = this.zv.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.ab7(g); this.zv.z(this, h, i, j, c, d, e, f, a < 0); } abw(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.zv.a0(this.zv.d, a, b, true); this.zv.aa(this.ij); let g = this.zv.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.ab6(g); this.zv.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); } ab7(a) { if (this.assigningScatterStyle != null && this.z7) { this.assigningScatterStyle(this, a); } } ab6(a) { if (this.assigningScatterMarkerStyle != null && this.z6) { this.assigningScatterMarkerStyle(this, a); } } abz(a, b) { let c = new ErrorBarsHelper(this, b); if (this.zk == null) { return; } let d = this.zk.u; let e = this.zk.v; let f = 0; let g = 0; let h = 0; let i = 0; for (let j of fromEnum(a.m.keys)) { let k = a.m.item(j); if (d != null) { switch (d.getCalculatorType()) { case 1: let l = this.ab2(k, c, d, h, i, true); h = l.p3; i = l.p4; break; case 0: let m = this.ab0(k, c, d, h, i, true); h = m.p3; i = m.p4; break; case 2: let n = this.aby(k, c, d, j, h, i, true); h = n.p4; i = n.p5; break; case 3: let o = this.ab3(c, d, f, h, i, true); f = o.p2; h = o.p3; i = o.p4; break; case 4: let p = this