UNPKG

igniteui-react-charts

Version:

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

1,423 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 { 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); } o4() { super.o4(); this.xAxis = null; this.yAxis = null; } q3(a) { super.q3(a); this.y2 = a; } get_fx() { return true; } ai() { return [this.xAxis, this.yAxis]; } kr(a, b) { let c = this.nf(b); if (c == ScatterBase.$$p[12]) { return this.ks(a, b, this.aay); } if (c == ScatterBase.$$p[16]) { return this.ks(a, b, this.aa6); } if (c == ScatterBase.$$p[1]) { return this.ks(a, b, this.aai); } if (c == ScatterBase.$$p[2]) { return this.ks(a, b, this.aak); } return null; } mf(a) { let b = this.nf(a); if (b == ScatterBase.$$p[12]) { return this.aay; } if (b == ScatterBase.$$p[16]) { return this.aa6; } if (b == ScatterBase.$$p[1]) { return this.aai; } if (b == ScatterBase.$$p[2]) { return this.aak; } return super.mf(a); } ed(a, b, c, d, e) { if (!this.hasMarkers) { return false; } let f = this.xAxis; let g = new ScalerParams(1, this.dc.wt, this.wx, f.ch); g.c = this.getEffectiveViewport1(this.cw); let h = this.yAxis; let i = new ScalerParams(1, this.dc.wt, this.wx, h.ch); i.c = this.getEffectiveViewport1(this.cw); a.clear(); this.xb.cw((j) => { if (j._visibility == 0) { let k = new SeriesPointOfInterest(); let l = j.n; let m = j.o; if (!e && (l < this.wx.left || l > this.wx.right || m < this.wx.top || m > this.wx.bottom)) { return; } k.d = f.eo(l, g); k.e = h.eo(m, i); k.b = j.content; k.g = this.vl; k.c = j.ak; if (this.ha) { k.g = this.vs(j.ak); } a.add(k); } }); return true; } b3() { if (this.b4 == 0) { if (this.aae <= 2000) { return 1; } else { return super.b3(); } } else { return super.b3(); } } wu(a) { if (!this.hasMarkers || !this.xl()) { return Rect.empty; } let b = this.xb.ce(this.wc(a)); if (b != null) { return this.xb.c7(b); } return Rect.empty; } gx(a, b) { if (this.xm(a, b)) { return true; } return false; } constructor() { super(); this.y1 = null; this.zk = null; this.zl = null; this.acq = null; this.acr = null; this.za = 1; this.yr = null; this.ys = null; this.y7 = null; this.y9 = null; this.y5 = null; this.zq = false; this.zp = false; this.zi = null; this.zj = null; this.assigningScatterStyle = null; this.assigningScatterMarkerStyle = null; this.ze = null; this.y8 = null; this.y4 = null; this.zo = true; this.z3 = 0; this.z4 = 0; this.z5 = 0; this.z6 = 0; this.zb = this.zc(); this.ze = new ScatterSeriesRenderManager(); this.y8 = new ScatterFrame(); this.acr = Rect.empty; this.acq = Rect.empty; } get zm() { return this.zk; } set zm(a) { if (this.zk != a) { let b = this.zm; this.zk = a; this.raisePropertyChanged("XColumn", b, this.zm); } } get zn() { return this.zl; } set zn(a) { if (this.zl != a) { let b = this.zn; this.zl = a; this.raisePropertyChanged("YColumn", b, this.zn); } } gc() { return this.highlightedItemsSource != null || (this.aai != null && this.aak != null); } z1() { 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.abe)); 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.abd)); a.add(c); } if (this.z1()) { 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.z1()) { 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.r4)); a.add(e); } if (!this.z1()) { 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.r4)); a.add(f); } return a; } abd(a, b) { if (this.aai != null) { b.value = this.aai; return; } b.value = this.aay; } abe(a, b) { if (this.aak != null) { b.value = this.aak; return; } b.value = this.aa6; } get acn() { return this.c(ScatterBase.aby); } set acn(a) { this.h(ScatterBase.aby, a); } get GetErrorBarsXAxis() { return this.xAxis; } get GetErrorBarsYAxis() { return this.yAxis; } qd() { super.qd(); if (this.xAxis != null) { this.xAxis.ib(false); } if (this.yAxis != null) { this.yAxis.ib(false); } } rc(a, b, c, d) { super.rc(a, b, c, d); if (this.y2.df.g$e(a, b, c, d)) { this.ru(false); this.qn(); } switch (b) { case ScatterBase.$$p[10]: case ScatterBase.$$p[14]: case ScatterBase.$$p[11]: case ScatterBase.$$p[15]: this.qh(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.zm); c.deregisterColumn(this.zn); this.zm = null; this.zn = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.zm = this.dl(this.aay); this.zn = this.dl(this.aa6); } if ((this.yAxis != null && !this.yAxis.c1()) || (this.xAxis != null && !this.xAxis.c1())) { this.ru(this.gh && 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.ru(false); } this.qn(); 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.ru(false); } this.qn(); break; case ScatterBase.$$p[12]: if (this.dp != null) { this.dp.deregisterColumn(this.zm); this.zm = this.dl(this.aay); } break; case "XColumn": this.y2.df.g$m(); if (this.xAxis != null && !this.xAxis.c1()) { this.ru(this.gh && this.d9); } break; case ScatterBase.$$p[16]: if (this.dp != null) { this.dp.deregisterColumn(this.zn); this.zn = this.dl(this.aa6); } break; case "YColumn": this.y2.df.g$m(); if (this.yAxis != null && !this.yAxis.c1()) { this.ru(this.gh && this.d9); } break; case ScatterBase.$$p[7]: this.ru(false); this.qn(); break; case ScatterBase.$$p[8]: this.ru(false); this.qn(); break; case "TransitionProgress": this.y9.c(this.jr, this.y7, this.y5); this.aa8(); try { if (this.d7(this.cw)) { return; } if ((Math.round(this.jr * 100000) / 100000) == 1) { this.abv(this.y5, this.y2); } else { this.abv(this.y9, this.y2); } if (this.dc != null) { this.dc.q7(this); } } finally { this.abw(); } break; case "TrendLineBrush": this.ri(b); break; case ScatterBase.$$p[0]: if (this.y3 != null) { this.y3.r = this; } this.ru(false); this.qn(); break; case "TrendLineType": this.qn(); break; case ScatterBase.$$p[4]: this.zq = this.zy(); this.ru(false); break; case ScatterBase.$$p[3]: this.zp = this.zx(); this.ru(false); break; case ScatterBase.$$p[5]: this.zb = this.zc(); break; } } zy() { return this.zu; } zx() { return this.zt; } zs(a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; } zr(a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; } abw() { this.acq = Rect.empty; this.acr = Rect.empty; } aa8() { let a = this.getViewInfo(this.acq, this.acr); this.acq = a.p0; this.acr = a.p1; } zw(a, b) { if (b != 3) { return true; } if (a == null) { return true; } if (this.aay == a || this.aa6 == a) { return true; } return false; } pd(a, b, c, d) { let e = false; if (!this.zw(d, a)) { return; } this.y2.df.g$i(a, b, c, d); if (this.y2.aa.count > 0) { for (let f of fromEnum(this.y2.aa)) { f.g$i(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.zo = true; } else if (a == 1) { for (let g = b; g < b + c; g++) { this.z3 += this.zm.item(g); this.z4 += this.zn.item(g); } this.z5 = this.z3 / this.zm.count; this.z6 = this.z4 / this.zn.count; } if (e) { this.ru(true); } } abn(a) { this.abo(a, null); } abo(a, b) { let c = this.zm != null ? this.zm.count : 0; let d = this.zn != null ? this.zn.count : 0; let e = Math.min(c, d); if (e <= this.aae) { 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.zm != null) { return new AxisRange(this.zm.minimum, this.zm.maximum); } if (a != null && a == this.yAxis && this.zn != null) { return new AxisRange(this.zn.minimum, this.zn.maximum); } return null; } ko(a) { let b = this.j4(a); if (this.dp != null && b >= 0 && b < this.dp.count) { return this.dp.item(b); } return null; } get zb() { return this.za; } set zb(a) { let b = this.za; this.za = a; if (b != this.za) { this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.za)); } } zc() { if (this.zd != 0) { return this.zd; } return this.zv ? 4 : 1; } j4(a) { let b = truncate(Math.round(this.is(a))); return b; } is(a) { switch (this.zb) { case 1: return this.aaa(a); case 3: return this.aab(a); case 2: return this.z8(a); case 4: return this.z9(a); case 5: return this.z7(a); } return -1; } z9(a) { return this.aac(a, false); } z8(a) { let b = this.wc(a); let c = b.x; let d = b.y; if (this.dp == null || this.xAxis == null || this.yAxis == null || this.zm == null || this.zn == null) { return -1; } if (this.dp.count > this.aad) { return -1; } this.abb(); let e = this.yr; let f = this.ys; if (e == null || f == null) { return -1; } let g = 1.7976931348623157E+308; let h = -1; for (let i = 0; i < this.zm.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; } abb() { let a = this.cw.ca; let b = this.cw.b9; let c = this.getEffectiveViewport(); if (this.y1 == null) { return; } let d = new ScalerParams(0, a, b, this.y1.d, c); let e = ((() => { let $ret = new ScalerParams(0, a, b, this.y1.e, c); $ret.b = this.iz(); return $ret; })()); if (this.yr == null || this.ys == null) { let f = arrayShallowClone(this.zm.asArray()); let g = arrayShallowClone(this.zn.asArray()); this.xAxis.hq(boxArray$1(f), 0, f.length, d); this.yAxis.hq(boxArray$1(g), 0, g.length, e); this.yr = f; this.ys = g; } } get_zv() { return false; } get zv() { return this.get_zv(); } aac(a, b) { if (!this.zv) { return -1; } let c = { $type: Point_$type, x: 0, y: 0 }; let d = true; let e = this.y6(); if (e == null) { return -1; } if (e.n == null) { return -1; } if (this.dp == null || this.dp.count > this.aad) { return -1; } this.abb(); let f = this.yr; let g = this.ys; if (f == null || g == null) { return -1; } let h = this.wc(a); let i = 1.7976931348623157E+308; let j = -1; for (let k = 0; k < this.yr.length; k++) { let l = { $type: Point_$type, x: this.yr[k], y: this.ys[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.yr[j], y: this.ys[j] }; let o = { $type: Point_$type, x: this.yr[j - 1], y: this.ys[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; } aab(a) { return this.aac(a, true); } z7(a) { let b = this.wc(a); let c = b.x; let d = b.y; if (this.y2.dg.e > this.aad) { return -1; } let e = -1; this.xb.cx((f) => { let g = this.y2.c7(f); let h = g.left; let i = g.top; let j = g.width; let k = g.height; if (this.xi) { 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; } aaa(a) { let b = null; let c = 1.7976931348623157E+308; let d = this.wc(a); let e = d.x; let f = d.y; if (this.y2.dg.e > this.aad) { return -1; } this.y2.dn((g) => { if (g._visibility == 0) { let h = this.y2.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; } wh(a, b, c) { if (this.xAxis == null || this.yAxis == null || this.zm == null || this.zn == 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.ch, f); let h = ((() => { let $ret = new ScalerParams(0, d, e, this.yAxis.ch, f); $ret.b = this.iz(); return $ret; })()); if (b) { let i = this.is(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.el(this.zm.item(j), g); let m = this.yAxis.el(this.zn.item(j), h); return { $type: Point_$type, x: l, y: m }; } let n = i - Math.floor(i); let o = this.xAxis.el(this.zm.item(j), g); let p = this.yAxis.el(this.zn.item(j), h); let q = this.xAxis.el(this.zm.item(k), g); let r = this.yAxis.el(this.zn.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.j4(a); if (u == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } let v = this.xAxis.el(this.zm.item(u), g); let w = this.yAxis.el(this.zn.item(u), h); return { $type: Point_$type, x: v, y: w }; } } ge(a) { let b = this.dc != null ? this.dc.wt : Rect.empty; b = b.copy(); let c = this.dc != null ? this.dc.xb : Rect.empty; let d = new Rect(0, 0, 0, 1, 1); let e = this.wq(this.cw); let f = new ScalerParams(0, d, d, this.xAxis.ch, e); let g = ((() => { let $ret = new ScalerParams(0, d, d, this.yAxis.ch, e); $ret.b = this.iz(); return $ret; })()); let h = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1; let i = this.xAxis != null && this.zm != null && h < this.zm.count ? this.xAxis.el(this.zm.item(h), f) : NaN; let j = this.yAxis != null && this.zn != null && h < this.zn.count ? this.yAxis.el(this.zn.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; } su(a, b) { this.ru(false); } sv(a, b) { this.ru(false); } y6() { let a = this.y5; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.y9; } return a; } aa9(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.y1.d, f); $ret.c = this.getEffectiveViewport1(a); return $ret; })()); let k = ((() => { let $ret = new ScalerParams(0, d, e, this.y1.e, f); $ret.c = this.getEffectiveViewport1(a); $ret.b = this.iz(); return $ret; })()); let l = false; let m = 0; if (this.dc != null) { if (this.dc.f8()) { let n = this.dc.nm(d, j); l = n.c; m = n.d; } } for (let o = 0; o < c; o++) { h = this.zm.item(o); i = this.zn.item(o); let p = { $type: Point_$type, x: this.y1.a.el(h, j), y: this.y1.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)) { 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; })())); } } } } abk(a, b) { this.yr = null; this.ys = null; a.j.clear(); a.o.clear(); a.h.clear(); a.l.clear(); a.i.clear(); a.k.clear(); let c = Math.min(this.zm != null ? this.zm.count : 0, this.zn != null ? this.zn.count : 0); let d = b.ca; let e = b.b9; let f = this.getEffectiveViewport1(b); let g = new ScalerParams(0, d, e, this.xAxis.ch, f); g.c = this.getEffectiveViewport1(b); let h = ((() => { let $ret = new ScalerParams(0, d, e, this.yAxis.ch, f); $ret.b = this.iz(); return $ret; })()); h.c = this.getEffectiveViewport1(b); if (c < 1) { return; } this.y1 = ((() => { let $ret = new ScatterAxisInfoCache(); $ret.a = this.xAxis; $ret.b = this.yAxis; $ret.d = this.xAxis.ch; $ret.e = this.yAxis.ch; $ret.c = this.dp; return $ret; })()); let i = b; if (c <= this.aae) { this.aa9(i, a, c, d, e); } if (this.xl()) { b.dd.l(a.j, this.aae, d, e, this.ie); } let j = ((() => { let $ret = new Clipper(0, e, false); $ret.i = a.o; return $ret; })()); let k = this.wo(b); let l = this.xAxis.eo(k.left, g); let m = this.xAxis.eo(k.right, g); b.df.j(a.o, this.trendLineType, this.zm, this.zn, this.trendLinePeriod, (n) => this.xAxis.el(n, g), (n) => this.yAxis.el(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.zm, this.zn, o.g$f, (p) => this.xAxis.el(p, g), (p) => this.yAxis.el(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.abi(a, b); } o7(a, b) { super.o7(a, b); let c = b; c.dm(a); } get_ff() { return true; } zg(a, b, c) { return null; } zh(a, b, c) { if (this.dp == null) { return null; } let d = this.y6(); let e = this.y2.ce(this.wc(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; } w0(a, b) { if (this.xd != 1 && this.xd != 13) { let c = this.xb.c8(); let d = (c.width / 2) + (this.xo / 2); let e = (c.height / 2) + (this.xo / 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); } zf(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.zg(a, b, this.zi); this.zi = d; return d; } else { let e = this.zf(a, b, this.zi); this.zi = e; return e; } } di(a, b, c) { if (this.f0(this.by) && !c) { let d = this.zh(a, b, this.zj); this.zj = d; return d; } else { let e = this.zf(a, b, this.zj); e.d = true; this.zj = e; return e; } } z0() { return (this.assigningScatterStyle != null && this.zq) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } zz() { return (this.assigningScatterMarkerStyle != null && this.zp) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } abv(a, b) { this.qz(); let c = b.b9; this.y1 = ((() => { let $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.xl()) { b.dd.j(a.j, this.xn); if (this.zz()) { this.aba(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.abs(a, b); } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.p6(a, c, b); return c.toArray(); } p6(a, b, c) { this.abc(a, b, c, 0, null); } abc(a, b, c, d, e) { let f = this.dc.w8(this.dc.wy(a)); let g = this.dp.count; let h = this.y1.a; let i = this.y1.b; let j = this.dc.w1(this.wx, this.getEffectiveViewport(), f); let k = new ScalerParams(0, f, this.dc.xb, h.ch, this.getEffectiveViewport()); let l = new ScalerParams(0, f, this.dc.xb, i.ch, this.getEffectiveViewport()); if (d == 0) { for (let m = 0; m < g; m++) { let n = h.el(this.zm.item(m), k); let o = i.el(this.zn.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.el(this.zm.item(p), k); let r = i.el(this.zn.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; })())); } } } } } yu(a, b) { return this.yv(a, b); } yv(a, b) { if (b < a || a < 0 || a > this.zm.count || b < 0 || b > this.zm.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; } aba(a, b) { a.ck = true; this.ze.ay(this, this.zz(), runOn(this, this.yu)); let c = this.ze.d; let d = c != null; let e = this.getEffectiveViewport1(a); let f = this.dp == null ? 0 : this.dp.count; this.y2.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.abf(h, f, a.t); } this.ze.ac(g, i); } }); } abg(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.ze.a0(this.ze.b, a, b, false); this.ze.ab(this.ic); let g = this.ze.ax; let h = null; let i = null; let j = null; let k = this.dp; if (d && this.dc != null) { h = this.dc.dn.getHighlightingInfo(this, k, g.z, g.y, false); g.c = h; } if (e && this.dc != null) { h = this.dc.dp.getHighlightingInfo(this, k, g.z, g.y, false); g.d = h; } if (f && this.dc != null) { h = this.dc.dm.getHighlightingInfo(this, k, g.z, g.y, false); g.b = h; } g.h = c; this.abq(g); this.ze.z(this, h, i, j, c, d, e, f, a < 0); } abf(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.ze.a0(this.ze.d, a, b, true); this.ze.aa(this.ic); let g = this.ze.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.dn.getHighlightingInfo(this, k, g.z, g.y, true); if (this.dc.dn.isCrossContextHighlight(this)) { l = this.dc.dn.getHighlightingInfo(this, k, g.z, g.y, true); } g.c = h; } if (e && this.dc != null) { i = this.dc.dp.getHighlightingInfo(this, k, g.z, g.y, true); if (i == null && this.bo != null) { i = this.dc.dp.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true); } if (i == null && this.bl != null) { i = this.dc.dp.getHighlightingInfo(this.bl, this.bl.dp, g.z, g.y, true); } if (this.dc.dp.isCrossContextHighlight(this)) { m = this.dc.dp.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } if (f && this.dc != null) { j = this.dc.dm.getHighlightingInfo(this, k, g.z, g.y, true); if (this.dc.dm.isCrossContextHighlight(this)) { n = this.dc.dm.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } g.h = c; this.abp(g); this.ze.y(this, h, i, j, c, d, e, f, g.v, this.dc.dn.totalHighWaterMark, g.x, this.dc.dp.totalHighWaterMark, g.t, this.dc.dm.totalHighWaterMark); } abq(a) { if (this.assigningScatterStyle != null && this.zq) { this.assigningScatterStyle(this, a); } } abp(a) { if (this.assigningScatterMarkerStyle != null && this.zp) { this.assigningScatterMarkerStyle(this, a); } } abi(a, b) { let c = new ErrorBarsHelper(this, b); if (this.y3 == null) { return; } let d = this.y3.u; let e = this.y3.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.abl(k, c, d, h, i, true); h = l.p3; i = l.p4; break; case 0: let m = this.abj(k, c, d, h, i, true); h = m.p3; i = m.p4; break; case 2: let n = this.abh(k, c, d, j, h, i, true); h = n.p4; i = n.p5; break; case 3: let o = this.abm(c, d, f, h, i, true); f = o.p2; h = o.p3; i = o.p4; break; case 4: let p =