UNPKG

igniteui-react-charts

Version:

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

1,423 lines (1,422 loc) 73.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-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 { 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); } o8() { super.o8(); this.xAxis = null; this.yAxis = null; } q8(a) { super.q8(a); this.y8 = a; } get_fx() { return true; } ai() { return [this.xAxis, this.yAxis]; } ku(a, b) { let c = this.ni(b); if (c == ScatterBase.$$p[12]) { return this.kv(a, b, this.aa4); } if (c == ScatterBase.$$p[16]) { return this.kv(a, b, this.abc); } if (c == ScatterBase.$$p[1]) { return this.kv(a, b, this.aao); } if (c == ScatterBase.$$p[2]) { return this.kv(a, b, this.aaq); } return null; } mi(a) { let b = this.ni(a); if (b == ScatterBase.$$p[12]) { return this.aa4; } if (b == ScatterBase.$$p[16]) { return this.abc; } if (b == ScatterBase.$$p[1]) { return this.aao; } if (b == ScatterBase.$$p[2]) { return this.aaq; } return super.mi(a); } ed(a, b, c, d, e) { if (!this.hasMarkers) { return false; } let f = this.xAxis; let g = new ScalerParams(1, this.dc.xn, this.w3, f.df); g.c = this.getEffectiveViewport1(this.cw); let h = this.yAxis; let i = new ScalerParams(1, this.dc.xn, this.w3, h.df); i.c = this.getEffectiveViewport1(this.cw); a.clear(); this.xh.cw((j) => { if (j._visibility == 0) { let k = new SeriesPointOfInterest(); let l = j.n; let m = j.o; if (!e && (l < this.w3.left || l > this.w3.right || m < this.w3.top || m > this.w3.bottom)) { return; } k.d = f.fw(l, g); k.e = h.fw(m, i); k.b = j.content; k.g = this.vr; k.c = j.ak; if (this.ha) { k.g = this.vy(j.ak); } a.add(k); } }); return true; } b3() { if (this.b4 == 0) { if (this.aak <= 2000) { return 1; } else { return super.b3(); } } else { return super.b3(); } } w0(a) { if (!this.hasMarkers || !this.xr()) { return Rect.empty; } let b = this.xh.ce(this.wi(a)); if (b != null) { return this.xh.c7(b); } return Rect.empty; } gx(a, b) { if (this.xs(a, b)) { return true; } return false; } constructor() { super(); this.y7 = null; this.zq = null; this.zr = null; this.acw = null; this.acx = null; this.zg = 1; this.yx = null; this.yy = null; this.zd = null; this.zf = null; this.zb = null; this.zw = false; this.zv = false; this.zo = null; this.zp = null; this.assigningScatterStyle = null; this.assigningScatterMarkerStyle = null; this.zk = null; this.ze = null; this.za = null; this.zu = true; this.z9 = 0; this.aaa = 0; this.aab = 0; this.aac = 0; this.zh = this.zi(); this.zk = new ScatterSeriesRenderManager(); this.ze = new ScatterFrame(); this.acx = Rect.empty; this.acw = Rect.empty; } get zs() { return this.zq; } set zs(a) { if (this.zq != a) { let b = this.zs; this.zq = a; this.raisePropertyChanged("XColumn", b, this.zs); } } get zt() { return this.zr; } set zt(a) { if (this.zr != a) { let b = this.zt; this.zr = a; this.raisePropertyChanged("YColumn", b, this.zt); } } gc() { return this.highlightedItemsSource != null || (this.aao != null && this.aaq != null); } z7() { return false; } hu() { let a = super.hu(); { 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.abk)); 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.abj)); a.add(c); } if (this.z7()) { 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.z7()) { 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.r9)); a.add(e); } if (!this.z7()) { 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.r9)); a.add(f); } return a; } abj(a, b) { if (this.aao != null) { b.value = this.aao; return; } b.value = this.aa4; } abk(a, b) { if (this.aaq != null) { b.value = this.aaq; return; } b.value = this.abc; } get act() { return this.c(ScatterBase.ab4); } set act(a) { this.h(ScatterBase.ab4, a); } get GetErrorBarsXAxis() { return this.xAxis; } get GetErrorBarsYAxis() { return this.yAxis; } qh() { super.qh(); if (this.xAxis != null) { this.xAxis.k3(false); } if (this.yAxis != null) { this.yAxis.k3(false); } } rh(a, b, c, d) { super.rh(a, b, c, d); if (this.y8.df.g$e(a, b, c, d)) { this.rz(false); this.qs(); } switch (b) { case ScatterBase.$$p[10]: case ScatterBase.$$p[14]: case ScatterBase.$$p[11]: case ScatterBase.$$p[15]: this.qm(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.zs); c.deregisterColumn(this.zt); this.zs = null; this.zt = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.zs = this.dl(this.aa4); this.zt = this.dl(this.abc); } if ((this.yAxis != null && !this.yAxis.d2()) || (this.xAxis != null && !this.xAxis.d2())) { this.rz(this.gh && c != null); } break; case ScatterBase.$$p[9]: if (c != null) { c.cq(this); } if (d != null) { d.du(this); } if ((this.xAxis != null && !this.xAxis.d2()) || (d == null && c != null)) { this.rz(false); } this.qs(); break; case ScatterBase.$$p[13]: if (c != null) { c.cq(this); } if (d != null) { d.du(this); } if ((this.yAxis != null && !this.yAxis.d2()) || (d == null && c != null)) { this.rz(false); } this.qs(); break; case ScatterBase.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.zs); this.zs = this.dl(this.aa4); } break; case "XColumn": this.y8.df.g$m(); if (this.xAxis != null && !this.xAxis.d2()) { this.rz(this.gh && this.d9); } break; case ScatterBase.$$p[16]: if (this.dp != null) { this.dp.deregisterColumn(this.zt); this.zt = this.dl(this.abc); } break; case "YColumn": this.y8.df.g$m(); if (this.yAxis != null && !this.yAxis.d2()) { this.rz(this.gh && this.d9); } break; case ScatterBase.$$p[7]: this.rz(false); this.qs(); break; case ScatterBase.$$p[8]: this.rz(false); this.qs(); break; case "TransitionProgress": this.zf.c(this.ju, this.zd, this.zb); this.abe(); try { if (this.d7(this.cw)) { return; } if ((Math.round(this.ju * 100000) / 100000) == 1) { this.ab1(this.zb, this.y8); } else { this.ab1(this.zf, this.y8); } if (this.dc != null) { this.dc.r0(this); } } finally { this.ab2(); } break; case "TrendLineBrush": this.rn(b); break; case ScatterBase.$$p[0]: if (this.y9 != null) { this.y9.r = this; } this.rz(false); this.qs(); break; case "TrendLineType": this.qs(); break; case ScatterBase.$$p[4]: this.zw = this.z4(); this.rz(false); break; case ScatterBase.$$p[3]: this.zv = this.z3(); this.rz(false); break; case ScatterBase.$$p[5]: this.zh = this.zi(); break; } } z4() { return this.z0; } z3() { return this.zz; } zy(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } zx(a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; } ab2() { this.acw = Rect.empty; this.acx = Rect.empty; } abe() { let a = this.getViewInfo(this.acw, this.acx); this.acw = a.p0; this.acx = a.p1; } z2(a, b) { if (b != 3) { return true; } if (a == null) { return true; } if (this.aa4 == a || this.abc == a) { return true; } return false; } ph(a, b, c, d) { let e = false; if (!this.z2(d, a)) { return; } this.y8.df.g$i(a, b, c, d); if (this.y8.aa.count > 0) { for (let f of fromEnum(this.y8.aa)) { f.g$i(a, b, c, d); } } if (this.xAxis != null && !this.xAxis.d2()) { e = true; } if (this.yAxis != null && !this.yAxis.d2()) { e = true; } if (a == 0 || a == 2 || a == 3 || a == 4) { this.zu = true; } else if (a == 1) { for (let g = b; g < b + c; g++) { this.z9 += this.zs.item(g); this.aaa += this.zt.item(g); } this.aab = this.z9 / this.zs.count; this.aac = this.aaa / this.zt.count; } if (e) { this.rz(true); } } abt(a) { this.abu(a, null); } abu(a, b) { let c = this.zs != null ? this.zs.count : 0; let d = this.zt != null ? this.zt.count : 0; let e = Math.min(c, d); if (e <= this.aak) { a.n.clear(); let f = new List$1(OwnedPoint.$, 0); for (let g of fromEnum(a.v.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.n; } for (let i of fromEnum(f)) { if (h.indexOf(i.a) >= 0) { if (b != null) { b.j(i.c); } else { a.n.add({ $type: Point_$type, x: i.c.x, y: i.c.y }); } } } } } ay(a) { if (a != null && a == this.xAxis && this.zs != null) { return new AxisRange(this.zs.minimum, this.zs.maximum); } if (a != null && a == this.yAxis && this.zt != null) { return new AxisRange(this.zt.minimum, this.zt.maximum); } return null; } kr(a) { let b = this.j7(a); if (this.dp != null && b >= 0 && b < this.dp.count) { return this.dp.item(b); } return null; } get zh() { return this.zg; } set zh(a) { let b = this.zg; this.zg = a; if (b != this.zg) { this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.zg)); } } zi() { if (this.zj != 0) { return this.zj; } return this.z1 ? 4 : 1; } j7(a) { let b = truncate(Math.round(this.it(a))); return b; } it(a) { switch (this.zh) { case 1: return this.aag(a); case 3: return this.aah(a); case 2: return this.aae(a); case 4: return this.aaf(a); case 5: return this.aad(a); } return -1; } aaf(a) { return this.aai(a, false); } aae(a) { let b = this.wi(a); let c = b.x; let d = b.y; if (this.dp == null || this.xAxis == null || this.yAxis == null || this.zs == null || this.zt == null) { return -1; } if (this.dp.count > this.aaj) { return -1; } this.abh(); let e = this.yx; let f = this.yy; if (e == null || f == null) { return -1; } let g = 1.7976931348623157E+308; let h = -1; for (let i = 0; i < this.zs.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; } abh() { let a = this.cw.ca; let b = this.cw.b9; let c = this.getEffectiveViewport(); if (this.y7 == null) { return; } let d = new ScalerParams(0, a, b, this.y7.d, c); let e = ((() => { let $ret = new ScalerParams(0, a, b, this.y7.e, c); $ret.b = this.i0(); return $ret; })()); if (this.yx == null || this.yy == null) { let f = arrayShallowClone(this.zs.asArray()); let g = arrayShallowClone(this.zt.asArray()); this.xAxis.j6(boxArray$1(f), 0, f.length, d); this.yAxis.j6(boxArray$1(g), 0, g.length, e); this.yx = f; this.yy = g; } } get_z1() { return false; } get z1() { return this.get_z1(); } aai(a, b) { if (!this.z1) { return -1; } let c = { $type: Point_$type, x: 0, y: 0 }; let d = true; let e = this.zc(); if (e == null) { return -1; } if (e.n == null) { return -1; } if (this.dp == null || this.dp.count > this.aaj) { return -1; } this.abh(); let f = this.yx; let g = this.yy; if (f == null || g == null) { return -1; } let h = this.wi(a); let i = 1.7976931348623157E+308; let j = -1; for (let k = 0; k < this.yx.length; k++) { let l = { $type: Point_$type, x: this.yx[k], y: this.yy[k] }; if (k > 0) { if (!b || e.j.containsKey(this.dp.item(k)) || e.j.containsKey(this.dp.item(k - 1))) { let m = GeometryUtil.h(h, c, l); if (m < i) { i = m; j = k; } } } c = l; } if (j >= 0) { let n = { $type: Point_$type, x: this.yx[j], y: this.yy[j] }; let o = { $type: Point_$type, x: this.yx[j - 1], y: this.yy[j - 1] }; if (!b || (e.j.containsKey(this.dp.item(j)) && e.j.containsKey(this.dp.item(j - 1)))) { let p = GeometryUtil.m(h, o, n); return (j - 1) + p; } else if (e.j.containsKey(this.dp.item(j))) { return j; } else { return j - 1; } } return -1; } aah(a) { return this.aai(a, true); } aad(a) { let b = this.wi(a); let c = b.x; let d = b.y; if (this.y8.dg.e > this.aaj) { return -1; } let e = -1; this.xh.cx((f) => { let g = this.y8.c7(f); let h = g.left; let i = g.top; let j = g.width; let k = g.height; if (this.xo) { 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; } aag(a) { let b = null; let c = 1.7976931348623157E+308; let d = this.wi(a); let e = d.x; let f = d.y; if (this.y8.dg.e > this.aaj) { return -1; } this.y8.dn((g) => { if (g._visibility == 0) { let h = this.y8.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; } wn(a, b, c) { if (this.xAxis == null || this.yAxis == null || this.zs == null || this.zt == 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.df, f); let h = ((() => { let $ret = new ScalerParams(0, d, e, this.yAxis.df, f); $ret.b = this.i0(); return $ret; })()); if (b) { let i = this.it(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.ft(this.zs.item(j), g); let m = this.yAxis.ft(this.zt.item(j), h); return { $type: Point_$type, x: l, y: m }; } let n = i - Math.floor(i); let o = this.xAxis.ft(this.zs.item(j), g); let p = this.yAxis.ft(this.zt.item(j), h); let q = this.xAxis.ft(this.zs.item(k), g); let r = this.yAxis.ft(this.zt.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.j7(a); if (u == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } let v = this.xAxis.ft(this.zs.item(u), g); let w = this.yAxis.ft(this.zt.item(u), h); return { $type: Point_$type, x: v, y: w }; } } ge(a) { let b = this.dc != null ? this.dc.xn : Rect.empty; b = b.copy(); let c = this.dc != null ? this.dc.x5 : Rect.empty; let d = new Rect(0, 0, 0, 1, 1); let e = this.ww(this.cw); let f = new ScalerParams(0, d, d, this.xAxis.df, e); let g = ((() => { let $ret = new ScalerParams(0, d, d, this.yAxis.df, e); $ret.b = this.i0(); return $ret; })()); let h = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1; let i = this.xAxis != null && this.zs != null && h < this.zs.count ? this.xAxis.ft(this.zs.item(h), f) : NaN; let j = this.yAxis != null && this.zt != null && h < this.zt.count ? this.yAxis.ft(this.zt.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; } sz(a, b) { this.rz(false); } s0(a, b) { this.rz(false); } zc() { let a = this.zb; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.zf; } return a; } abf(a, b, c, d, e) { b.g = 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.y7.d, f); $ret.c = this.getEffectiveViewport1(a); return $ret; })()); let k = ((() => { let $ret = new ScalerParams(0, d, e, this.y7.e, f); $ret.c = this.getEffectiveViewport1(a); $ret.b = this.i0(); return $ret; })()); let l = false; let m = 0; if (this.dc != null) { if (this.dc.gl()) { let n = this.dc.n2(d, j); l = n.c; m = n.d; } } for (let o = 0; o < c; o++) { h = this.zs.item(o); i = this.zt.item(o); let p = { $type: Point_$type, x: this.y7.a.ft(h, j), y: this.y7.b.ft(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.g.containsKey(q)) { let r = { $type: Point_$type, x: h, y: i }; let s = { $type: Point_$type, x: p.x, y: p.y }; b.g.addItem(q, ((() => { let $ret = new OwnedPoint(); $ret.a = q; $ret.b = r; $ret.c = s; return $ret; })())); } } } } abq(a, b) { this.yx = null; this.yy = null; a.j.clear(); a.o.clear(); a.h.clear(); a.l.clear(); a.i.clear(); a.k.clear(); let c = Math.min(this.zs != null ? this.zs.count : 0, this.zt != null ? this.zt.count : 0); let d = b.ca; let e = b.b9; let f = this.getEffectiveViewport1(b); let g = new ScalerParams(0, d, e, this.xAxis.df, f); g.c = this.getEffectiveViewport1(b); let h = ((() => { let $ret = new ScalerParams(0, d, e, this.yAxis.df, f); $ret.b = this.i0(); return $ret; })()); h.c = this.getEffectiveViewport1(b); if (c < 1) { return; } this.y7 = ((() => { let $ret = new ScatterAxisInfoCache(); $ret.a = this.xAxis; $ret.b = this.yAxis; $ret.d = this.xAxis.df; $ret.e = this.yAxis.df; $ret.c = this.dp; return $ret; })()); let i = b; if (c <= this.aak) { this.abf(i, a, c, d, e); } if (this.xr()) { b.dd.l(a.j, this.aak, d, e, this.ie); } let j = ((() => { let $ret = new Clipper(0, e, false); $ret.i = a.o; return $ret; })()); let k = this.wu(b); let l = this.xAxis.fw(k.left, g); let m = this.xAxis.fw(k.right, g); b.df.j(a.o, this.trendLineType, this.zs, this.zt, this.trendLinePeriod, (n) => this.xAxis.ft(n, g), (n) => this.yAxis.ft(n, h), ((() => { let $ret = new TrendResolutionParams(); $ret.d = this.ie; $ret.i = e; $ret.h = f; $ret.j = d; return $ret; })()), j, l, m); if (b.aa.count > 0) { a.m.clear(); for (let n = 0; n < b.aa.count; n++) { a.m.add(new List$1(Point_$type, 0)); let o = b.aa._inner[n]; o.j(a.m._inner[n], o.g$b, this.zs, this.zt, o.g$f, (p) => this.xAxis.ft(p, g), (p) => this.yAxis.ft(p, h), ((() => { let $ret = new TrendResolutionParams(); $ret.d = this.ie; $ret.i = e; $ret.h = f; $ret.j = d; return $ret; })()), j, l, m); } } this.abo(a, b); } pb(a, b) { super.pb(a, b); let c = b; c.dm(a); } get_ff() { return true; } zm(a, b, c) { return null; } zn(a, b, c) { if (this.dp == null) { return null; } let d = this.zc(); let e = this.y8.ce(this.wi(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; } w6(a, b) { if (this.xj != 1 && this.xj != 13) { let c = this.xh.c8(); let d = (c.width / 2) + (this.xu / 2); let e = (c.height / 2) + (this.xu / 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); } zl(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.f0(this.by) && !c) { let d = this.zm(a, b, this.zo); this.zo = d; return d; } else { let e = this.zl(a, b, this.zo); this.zo = e; return e; } } di(a, b, c) { if (this.f0(this.by) && !c) { let d = this.zn(a, b, this.zp); this.zp = d; return d; } else { let e = this.zl(a, b, this.zp); e.d = true; this.zp = e; return e; } } z6() { return (this.assigningScatterStyle != null && this.zw) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } z5() { return (this.assigningScatterMarkerStyle != null && this.zv) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } ab1(a, b) { this.q4(); let c = b.b9; this.y7 = ((() => { let $ret = new ScatterAxisInfoCache(); $ret.a = this.xAxis; $ret.b = this.yAxis; $ret.d = this.xAxis.df; $ret.e = this.yAxis.df; return $ret; })()); if (this.xr()) { b.dd.j(a.j, this.xt); if (this.z5()) { this.abg(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.o, 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.m._inner[e], d); } } this.aby(a, b); } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.qa(a, c, b); return c.toArray(); } qa(a, b, c) { this.abi(a, b, c, 0, null); } abi(a, b, c, d, e) { let f = this.dc.x2(this.dc.xs(a)); let g = this.dp.count; let h = this.y7.a; let i = this.y7.b; let j = this.dc.xv(this.w3, this.getEffectiveViewport(), f); let k = new ScalerParams(0, f, this.dc.x5, h.df, this.getEffectiveViewport()); let l = new ScalerParams(0, f, this.dc.x5, i.df, this.getEffectiveViewport()); if (d == 0) { for (let m = 0; m < g; m++) { let n = h.ft(this.zs.item(m), k); let o = i.ft(this.zt.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.ft(this.zs.item(p), k); let r = i.ft(this.zt.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; })())); } } } } } y0(a, b) { return this.y1(a, b); } y1(a, b) { if (b < a || a < 0 || a > this.zs.count || b < 0 || b > this.zs.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; } abg(a, b) { a.ck = true; this.zk.ay(this, this.z5(), runOn(this, this.y0)); let c = this.zk.d; let d = c != null; let e = this.getEffectiveViewport1(a); let f = this.dp == null ? 0 : this.dp.count; this.y8.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.abl(h, f, a.t); } this.zk.ac(g, i); } }); } abm(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.zk.a0(this.zk.b, a, b, false); this.zk.ab(this.ic); let g = this.zk.ax; let h = null; let i = null; let j = null; let k = this.dp; if (d && this.dc != null) { h = this.dc.d0.getHighlightingInfo(this, k, g.z, g.y, false); g.c = h; } if (e && this.dc != null) { h = this.dc.d1.getHighlightingInfo(this, k, g.z, g.y, false); g.d = h; } if (f && this.dc != null) { h = this.dc.dz.getHighlightingInfo(this, k, g.z, g.y, false); g.b = h; } g.h = c; this.abw(g); this.zk.z(this, h, i, j, c, d, e, f, a < 0); } abl(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.zk.a0(this.zk.d, a, b, true); this.zk.aa(this.ic); let g = this.zk.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.d0.getHighlightingInfo(this, k, g.z, g.y, true); if (this.dc.d0.isCrossContextHighlight(this)) { l = this.dc.d0.getHighlightingInfo(this, k, g.z, g.y, true); } g.c = h; } if (e && this.dc != null) { i = this.dc.d1.getHighlightingInfo(this, k, g.z, g.y, true); if (i == null && this.bo != null) { i = this.dc.d1.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true); } if (i == null && this.bl != null) { i = this.dc.d1.getHighlightingInfo(this.bl, this.bl.dp, g.z, g.y, true); } if (this.dc.d1.isCrossContextHighlight(this)) { m = this.dc.d1.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } if (f && this.dc != null) { j = this.dc.dz.getHighlightingInfo(this, k, g.z, g.y, true); if (this.dc.dz.isCrossContextHighlight(this)) { n = this.dc.dz.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } g.h = c; this.abv(g); this.zk.y(this, h, i, j, c, d, e, f, g.v, this.dc.d0.totalHighWaterMark, g.x, this.dc.d1.totalHighWaterMark, g.t, this.dc.dz.totalHighWaterMark); } abw(a) { if (this.assigningScatterStyle != null && this.zw) { this.assigningScatterStyle(this, a); } } abv(a) { if (this.assigningScatterMarkerStyle != null && this.zv) { this.assigningScatterMarkerStyle(this, a); } } abo(a, b) { let c = new ErrorBarsHelper(this, b); if (this.y9 == null) { return; } let d = this.y9.u; let e = this.y9.v; let f = 0; let g = 0; let h = 0; let i = 0; for (let j of fromEnum(a.j.keys)) { let k = a.j.item(j); if (d != null) { switch (d.getCalculatorType()) { case 1: let l = this.abr(k, c, d, h, i, true); h = l.p3; i = l.p4; break; case 0: let m = this.abp(k, c, d, h, i, true); h = m.p3; i = m.p4; break; case 2: let n = this.abn(k, c, d, j, h, i, true); h = n.p4; i = n.p5; break; case 3: let o = this.abs(c, d, f, h, i, true); f = o.p2; h = o.p3; i = o.p4; break; case 4: