UNPKG

igniteui-angular-charts

Version:

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

1,477 lines (1,476 loc) 46.8 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 { Base, Point_$type, runOn, delegateCombine, Number_$type, enumGetBox, fromEnum, typeCast, markType, markDep } from "igniteui-angular-core"; import { PolarAxisInfoCache } from "./PolarAxisInfoCache"; import { SeriesRenderer$2 } from "./SeriesRenderer$2"; import { PolarFrame } from "./PolarFrame"; import { DependencyProperty } from "igniteui-angular-core"; import { NumericAngleAxis } from "./NumericAngleAxis"; import { NumericRadiusAxis } from "./NumericRadiusAxis"; 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 { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode"; import { HighlightingInfo } from "igniteui-angular-core"; import { Rect } from "igniteui-angular-core"; import { Marker } from "./Marker"; import { MarkerSeriesView } from "./MarkerSeriesView"; import { PolarAxes } from "./PolarAxes"; import { List$1 } from "igniteui-angular-core"; import { SeriesPointOfInterest } from "./SeriesPointOfInterest"; import { ScalerParams } from "./ScalerParams"; import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay"; import { IFastItemsSource_$type } from "igniteui-angular-core"; import { SeriesRenderingArguments } from "./SeriesRenderingArguments"; import { AxisRange } from "./AxisRange"; import { Dictionary$2 } from "igniteui-angular-core"; import { OwnedPoint } from "./OwnedPoint"; import { CoreGeometryUtil } from "igniteui-angular-core"; import { GeometryUtil } from "igniteui-angular-core"; import { DataContext } from "igniteui-angular-core"; import { HashPool$2 } from "igniteui-angular-core"; import { Clipper } from "igniteui-angular-core"; import { PolarTrendLineManager } from "./PolarTrendLineManager"; import { TrendResolutionParams } from "./TrendResolutionParams"; import { AssigningPolarStyleEventArgs } from "./AssigningPolarStyleEventArgs"; import { AssigningPolarMarkerStyleEventArgs } from "./AssigningPolarMarkerStyleEventArgs"; import { SeriesRenderManager } from "./SeriesRenderManager"; import { DataLegendSeriesValueInfo } from "igniteui-angular-core"; import { DataLegendSeriesContext } from "igniteui-angular-core"; import { ChartSelection } from "./ChartSelection"; import { CollisionRect } from "igniteui-angular-core"; import { PropertyMetadata } from "igniteui-angular-core"; import { truncate, isNaN_, isInfinity } from "igniteui-angular-core"; import { Defaults } from "./Defaults"; import { NumericMarkerManager } from "./NumericMarkerManager"; import { GeometryGroup } from "igniteui-angular-core"; import { stringIsNullOrEmpty } from "igniteui-angular-core"; /** * @hidden */ export class PolarBase extends MarkerSeries { static { this.$t = markType(PolarBase, 'PolarBase', MarkerSeries.$); } ct() { return new PolarBaseView(this); } rj(a) { super.rj(a); this.z9 = a; } b3() { if (this.b4 == 0) { { return 1; } } else { return super.b3(); } } xc(a) { if (!this.hasMarkers || !this.x4()) { return Rect.empty; } let b = this.xu.ce(this.wt(a)); if (b != null) { return this.xu.c7(b); } return Rect.empty; } g4(a, b) { if (this.x5(a, b)) { return true; } return false; } ph() { super.ph(); this.z5 = null; this.z6 = null; } get_ft() { return true; } w3(a) { let b = this.z5; let c = this.z6; if (b == null || c == null || this.dc == null) { return { $type: Point_$type, x: NaN, y: NaN }; } let d = NaN; let e = NaN; let f = this.z7.f(a.x, a.y, this.dc.yv, this.dc.zd, this.getEffectiveViewport(), d, e); d = f.p5; e = f.p6; return { $type: Point_$type, x: d, y: e }; } ed(a, b, c, d, e) { if (!this.hasMarkers) { return false; } let f = this.z5; let g = new ScalerParams(1, this.dc.yv, this.xf, f.dr); g.c = this.getEffectiveViewport1(this.cw); let h = this.z6; let i = new ScalerParams(1, this.dc.yv, this.xf, h.dr); i.c = this.getEffectiveViewport1(this.cw); a.clear(); this.xu.cw((j) => { if (j._visibility == 0) { let k = new SeriesPointOfInterest(); let l = j.n; let m = j.o; if (!e && (l < this.xf.left || l > this.xf.right || m < this.xf.top || m > this.xf.bottom)) { return; } let n; let o; let p = this.z7.f(l, m, this.cw.ca, this.cw.b9, this.cw.getEffectiveViewport(), n, o); n = p.p5; o = p.p6; k.d = n; k.e = o; k.b = j.content; k.g = this.v2; k.c = j.al; if (this.hh) { k.g = this.v9(j.al); } a.add(k); } }); return true; } constructor() { super(); this.aaa = null; this.z1 = null; this.z8 = null; this.adr = null; this.adq = null; this.adp = null; this.aam = null; this.aat = null; this.aau = null; this.aae = new PolarFrame(); this.aag = new PolarFrame(); this.aac = new PolarFrame(); this.z7 = null; this.abc = null; this.aai = 1; this.aay = false; this.aax = false; this.aar = null; this.aas = null; this.assigningPolarStyle = null; this.assigningPolarMarkerStyle = null; this.aah = null; this.aaf = null; this.aab = null; this.aah = new PolarSeriesRenderManager(); this.aaj = this.aak(); this.aaf = new PolarFrame(); this.aag.ab = runOn(this, this.ado); this.aae.ab = runOn(this, this.ado); this.aac.ab = runOn(this, this.ado); this.aam = new SeriesRenderer$2(PolarFrame.$, PolarBaseView.$, 0, runOn(this, this.acp), runOn(this, this.act), runOn(this, this.d4), runOn(this, this.sr), runOn(this, this.aci)); } aci() { if (this.dd.g) { this.dd.t(); } } ack() { this.z7.e(this.aaa.aa, this.aav, this.aaw, this.adr, this.adq, this.adp, (a, b) => Math.cos(b), (a, b) => Math.sin(b), true); } gj() { return this.highlightedItemsSource != null || (this.ab0 != null && this.aby != null); } aba() { return false; } h1() { let a = super.h1(); { let b = ((() => { let $ret = new SeriesLayerPropertyOverlay(); $ret.ad = "AngleMemberPath"; $ret.p = true; $ret.y = "HighlightedAngleMemberPath"; $ret.q = true; return $ret; })()); b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.acl)); a.add(b); } { let c = ((() => { let $ret = new SeriesLayerPropertyOverlay(); $ret.ad = "RadiusMemberPath"; $ret.p = true; $ret.y = "HighlightedRadiusMemberPath"; $ret.q = true; return $ret; })()); c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.acm)); a.add(c); } if (this.aba()) { 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.aba()) { 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.sk)); a.add(e); } if (!this.aba()) { 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.sk)); a.add(f); } return a; } acm(a, b) { if (this.ab0 != null) { b.value = this.ab0; return; } b.value = this.acd; } acl(a, b) { if (this.aby != null) { b.value = this.aby; return; } b.value = this.abv; } get aav() { return this.aat; } set aav(a) { if (this.aat != a) { let b = this.aav; this.aat = a; this.raisePropertyChanged("AngleColumn", b, this.aav); } } get aaw() { return this.aau; } set aaw(a) { if (this.aau != a) { let b = this.aaw; this.aau = a; this.raisePropertyChanged("RadiusColumn", b, this.aaw); } } get adj() { return this.c(PolarBase.acu); } set adj(a) { this.h(PolarBase.acu, a); } static { this.acu = DependencyProperty.i("ActualTrendLineBrush", Brush.$, PolarBase.$, new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue))); } aad() { let a = this.aac; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.aag; } return a; } qr() { super.qr(); if (this.z6 != null) { this.z6.l8(false); } if (this.z5 != null) { this.z5.l8(false); } } pq(a, b, c, d) { let e = false; this.z9.dd.g$i(a, b, c, d); if (this.z9.aa.count > 0) { for (let f of fromEnum(this.z9.aa)) { f.g$i(a, b, c, d); } } if (this.z5 != null && !this.z5.ei()) { e = true; } if (this.z6 != null && !this.z6.ei()) { e = true; } if (e) { this.sa(true); } } ta(a, b) { this.sa(false); } tb(a, b) { this.sa(false); } hm(a, b, c) { let d = true; if (!super.hm(a, b, c) || !c.r() || b.isEmpty || a.isEmpty || this.z5 == null || this.z6 == null || this.aav == null || this.aaw == null || this.aav.count == 0 || this.aaw.count == 0 || this.dp == null || this.dp.count != this.aav.count || this.dp.count != this.aaw.count || this.z7 == null || this.z5.b7 == null || this.z6.b7 == null || this.z5.ra == this.z5.q9 || this.z6.ra == this.z6.q9) { d = false; } return d; } sb(a) { super.sb(a); let b; let c; let d = this.getViewInfo(c, b); c = d.p0; b = d.p1; if (!this.hm(c, b, this.cw)) { this.pk(true, this.cw); return; } this.adr = b; this.adq = c; this.adp = this.cw.getEffectiveViewport(); this.z8 = new PolarAxisInfoCache(this.z5, this.z6, this.dp); let e = new SeriesRenderingArguments(this, c, b, a, this.gz); let f = this.aae; let g = this.aac; let h = this.aag; let i = this.aam.g(e, f, g, h, this.z9); f = i.p1; g = i.p2; h = i.p3; this.aae = f; this.aac = g; this.aag = h; } ado(a) { let b = this.z7.h(a.x, a.y, this.adr, this.adq, this.adp, this.z8.e, this.z8.d, this.z8.g, this.z8.f, this.z8.i, this.z8.h); return b; } ay(a) { if (a != null && a == this.z5 && this.aav != null) { return new AxisRange(this.aav.minimum, this.aav.maximum); } if (a != null && a == this.z6 && this.aaw != null) { return new AxisRange(this.aaw.minimum, this.aaw.maximum); } return null; } gl(a) { let b = this.cw.ca; b = b.copy(); let c = this.cw.b9; let d = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1; if (this.z5 == null || this.aav == null || this.z6 == null || this.aaw == null) { return false; } if (d < 0 || d > this.aav.count - 1 || d > this.aaw.count - 1) { return false; } let e = this.z5.getScaledAngle(this.aav.item(d)); let f = this.z6.t1(this.aaw.item(d)); let g = 0.5 + (Math.cos(e) * f); let h = 0.5 + (Math.sin(e) * f); if (!isNaN_(g)) { if (g < b.left + 0.1 * b.width) { g = g + 0.4 * b.width; b.x = g - 0.5 * b.width; } if (g > b.right - 0.1 * b.width) { g = g - 0.4 * b.width; b.x = g - 0.5 * b.width; } } if (!isNaN_(h)) { if (h < b.top + 0.1 * b.height) { h = h + 0.4 * b.height; b.y = h - 0.5 * b.height; } if (h > b.bottom - 0.1 * b.height) { h = h - 0.4 * b.height; b.y = h - 0.5 * b.height; } } if (this.c4 != null) { this.c4.at(this.dc, b, true); } return d >= 0; } ky(a) { let b = this.ke(a); if (this.dp != null && b >= 0 && b < this.dp.count) { return this.dp.item(b); } return null; } ke(a) { let b = truncate(Math.round(this.i0(a))); return b; } i0(a) { switch (this.aaj) { case 1: return this.abg(a); case 3: return this.abh(a); case 2: return this.abe(a); case 4: return this.abf(a); } return -1; } abf(a) { return this.abi(a, false); } abe(a) { let b = this.wt(a); let c = b.x; let d = b.y; if (this.dp == null || this.z5 == null || this.z6 == null || this.aav == null || this.aaw == null) { return -1; } if (this.dp.count > this.abk) { return -1; } if (!this.aa2()) { return -1; } let e = this.abc; let f = 1.7976931348623157E+308; let g = -1; for (let h = 0; h < this.aav.count; h++) { let i = e._inner[h].x; let j = e._inner[h].y; let k = (c - i) * (c - i) + (d - j) * (d - j); if (k < f) { f = k; g = h; } } return g; } aa2() { let a = this.aac; if (this.d4()) { a = this.aag; } if (a == null || a.aa.count == 0) { return false; } this.abc = a.aa; return true; } abi(a, b) { if (!this.aa5) { return -1; } let c = { $type: Point_$type, x: 0, y: 0 }; let d = true; let e = this.aac; if (this.d4()) { e = this.aag; } if (e == null) { return -1; } if (e.q == null) { return -1; } if (this.dp == null || this.dp.count > this.abk) { return -1; } if (!this.aa2()) { return -1; } let f = this.abc; let g = this.wt(a); let h = 1.7976931348623157E+308; let i = -1; for (let j = 0; j < f.count; j++) { let k = f._inner[j]; if (j > 0) { if (isNaN_(k.x) || isNaN_(k.y) || isNaN_(c.x) || isNaN_(c.y)) { c = k; continue; } if (!b || e.m.containsKey(this.dp.item(j)) || e.m.containsKey(this.dp.item(j - 1))) { let l = CoreGeometryUtil.q(g, c, k); if (l < h) { h = l; i = j; } } } c = k; } if (i >= 0) { let m = f._inner[i]; let n = f._inner[i - 1]; if (!b || (e.m.containsKey(this.dp.item(i)) && e.m.containsKey(this.dp.item(i - 1)))) { let o = GeometryUtil.j(g, n, m); return (i - 1) + o; } else if (e.m.containsKey(this.dp.item(i))) { return i; } else { return i - 1; } } return -1; } abh(a) { return this.abi(a, true); } abg(a) { let b = null; let c = 1.7976931348623157E+308; let d = this.wt(a); let e = d.x; let f = d.y; if (this.z9.de.e > this.abk) { return -1; } this.z9.dh((g) => { if (g._visibility == 0) { let h = this.z9.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.al; } return -1; } wy(a, b, c) { if (this.z5 == null || this.z6 == null || this.aav == null || this.aaw == 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.z5.dr, f); let h = ((() => { let $ret = new ScalerParams(0, d, e, this.z6.dr, f); $ret.b = this.i7(); return $ret; })()); if (b) { let i = this.i0(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) { return this.z7.h(this.aav.item(j), this.aaw.item(j), d, e, f, this.z8.e, this.z8.d, this.z8.g, this.z8.f, this.z8.i, this.z8.h); } let l = i - Math.floor(i); let m = this.z7.h(this.aav.item(j), this.aaw.item(j), d, e, f, this.z8.e, this.z8.d, this.z8.g, this.z8.f, this.z8.i, this.z8.h); let n = this.z7.h(this.aav.item(k), this.aaw.item(k), d, e, f, this.z8.e, this.z8.d, this.z8.g, this.z8.f, this.z8.i, this.z8.h); let o = m.x; let p = m.y; let q = n.x; let r = n.y; let s = q - o; let t = r - p; return { $type: Point_$type, x: o + s * l, y: p + t * l }; } else { let u = this.ke(a); if (u == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } return this.z7.h(this.aav.item(u), this.aaw.item(u), d, e, f, this.z8.e, this.z8.d, this.z8.g, this.z8.f, this.z8.i, this.z8.h); } } ai() { return [this.z5, this.z6]; } k1(a, b) { let c = this.nq(b); if (c == PolarBase.$$p[3]) { return this.k2(a, b, this.abv); } if (c == PolarBase.$$p[15]) { return this.k2(a, b, this.acd); } if (c == PolarBase.$$p[5]) { return this.k2(a, b, this.aby); } if (c == PolarBase.$$p[6]) { return this.k2(a, b, this.ab0); } return super.k1(a, b); } mq(a) { let b = this.nq(a); if (b == PolarBase.$$p[3]) { return this.abv; } if (b == PolarBase.$$p[15]) { return this.acd; } if (b == PolarBase.$$p[5]) { return this.aby; } if (b == PolarBase.$$p[6]) { return this.ab0; } return super.mq(a); } rs(a, b, c, d) { super.rs(a, b, c, d); if (this.z9.dd.g$e(a, b, c, d)) { this.sa(false); this.q2(); } switch (b) { case PolarBase.$$p[1]: case PolarBase.$$p[2]: case PolarBase.$$p[13]: case PolarBase.$$p[14]: this.qw(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.aav); c.deregisterColumn(this.aaw); this.aav = null; this.aaw = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.aav = this.dl(this.abv); this.aaw = this.dl(this.acd); } if ((this.z6 != null && !this.z6.ei()) || (this.z5 != null && !this.z5.ei())) { this.sa(this.go && c != null); } break; case PolarBase.$$p[0]: if (this.z5 != null && this.z6 != null) { this.z7 = new PolarAxes(this.z6, this.z5); } if (c != null) { c.c0(this); } if (d != null) { d.d8(this); } if (this.z5 != null && !this.z5.ei()) { this.sa(false); } else if (c != null && d == null) { this.pk(true, this.cw); } break; case PolarBase.$$p[12]: if (this.z5 != null && this.z6 != null) { this.z7 = new PolarAxes(this.z6, this.z5); } if (c != null) { c.c0(this); } if (d != null) { d.d8(this); } if (this.z6 != null && !this.z6.ei()) { this.sa(false); } else if (c != null && d == null) { this.pk(true, this.cw); } if (this.z5 != null && !this.z5.ei()) { this.z5.l4(); } break; case PolarBase.$$p[3]: if (this.dp != null) { this.dp.deregisterColumn(this.aav); this.aav = this.dl(this.abv); } break; case "AngleColumn": this.z9.dd.g$m(); if (this.z5 != null && !this.z5.ei()) { this.sa(this.go && this.d9); } break; case PolarBase.$$p[15]: if (this.dp != null) { this.dp.deregisterColumn(this.aaw); this.aaw = this.dl(this.acd); } break; case "RadiusColumn": this.z9.dd.g$m(); if (this.z6 != null && !this.z6.ei()) { this.sa(this.go && this.d9); } break; case PolarBase.$$p[16]: this.sa(false); this.q2(); break; case PolarBase.$$p[11]: this.sa(false); this.q2(); break; case "TransitionProgress": this.z8 = new PolarAxisInfoCache(this.z5, this.z6, this.dp); this.adr = this.cw.ca; this.adq = this.cw.b9; this.adp = this.cw.getEffectiveViewport(); this.aag.z = this.abb; this.aag.d(this.j1, this.aae, this.aac); if (this.d7(this.cw)) { return; } if (this.j1 == 1) { this.act(this.aac, this.z9); this.q5(); } else { this.act(this.aag, this.z9); } if (this.dc != null) { this.dc.sv(this); } break; case "TrendLineBrush": this.ry(b); break; case PolarBase.$$p[4]: this.sa(false); this.q2(); break; case "TrendLineType": this.q2(); break; case PolarBase.$$p[8]: this.aay = this.aa7(); this.sa(false); break; case PolarBase.$$p[7]: this.aax = this.aa6(); this.sa(false); break; case PolarBase.$$p[9]: this.aaj = this.aak(); break; } } get aaj() { return this.aai; } set aaj(a) { let b = this.aai; this.aai = a; if (b != this.aai) { this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.aai)); } } aak() { if (this.aal != 0) { return this.aal; } return this.aa5 ? 4 : 1; } get_aa5() { return false; } get aa5() { return this.get_aa5(); } aa7() { return this.aa4; } aa6() { return this.aa3; } aa0(a) { if (typeCast(NumericRadiusAxis.$, a) !== null) { return true; } return false; } aaz(a) { if (typeCast(NumericAngleAxis.$, a) !== null) { return true; } return false; } pk(a, b) { super.pk(a, b); let c = b; if (a) { c.de.clear(); } c.dd.g$h(); } z2(a, b) { let c = a.top - 10; let d = a.bottom + 10; let e = a.left - 10; let f = a.right + 10; let g = ((() => { let $ret = new Clipper(1, e, d, f, c, false); $ret.i = b; return $ret; })()); return g; } ach(a, b, c, d) { a.j = new Dictionary$2(Base.$, OwnedPoint.$, 1, b); let e = this.dp; for (let f = 0; f < b; f++) { let g = a.aa._inner[f]; if (!isInfinity(g.x) && !isInfinity(g.y)) { let h = { $type: Point_$type, x: this.aav.item(f), y: this.aaw.item(f) }; let i = { $type: Point_$type, x: g.x, y: g.y }; a.j.addItem(e.item(f), ((() => { let $ret = new OwnedPoint(); $ret.a = e.item(f); $ret.b = h; $ret.c = i; return $ret; })())); } } } acp(a, b) { let c = b.ca; let d = b.b9; let e = b.getEffectiveViewport(); a.m.clear(); a.r.clear(); let f = Math.min(this.aav != null ? this.aav.count : 0, this.aaw != null ? this.aaw.count : 0); if (f < 1) { return; } this.z8 = new PolarAxisInfoCache(this.z5, this.z6, this.dp); this.aaa = a; this.adq = d; this.adr = c; this.adp = b.getEffectiveViewport(); b.db.l(a.m, this.abl, c, d, this.im); if (f <= this.abl) { this.ach(a, f, c, d); } let g = this.z2(d, a.r); let h = Math.min(this.z5.ra, this.z5.q9); let i = Math.max(this.z5.q9, this.z5.ra); b.dd.k = this.abb; b.dd.j = 0; b.dd.m = this.z6.tu; b.dd.l = this.z6.tt; b.dd.n = (j, k) => this.z7.c(j, k, c, d, e, Math.cos); b.dd.o = (j, k) => this.z7.d(j, k, c, d, e, Math.sin); let j = new List$1(Number_$type, 0); for (let k = 0; k < this.aav.count; k++) { if (this.aav.item(k) >= h && this.aav.item(k) <= i) { j.add(this.aav.item(k)); } } let l = this.aaw; if (j.count != this.aav.count) { l = new List$1(Number_$type, 0); for (let m = 0; m < this.aav.count; m++) { if (this.aav.item(m) >= h && this.aav.item(m) <= i) { l.add(this.aaw.item(m)); } } } b.dd.p(a.r, this.aan, j, l, this.abm, runOn(this.z5, this.z5.getScaledAngle), runOn(this.z6, this.z6.t1), ((() => { let $ret = new TrendResolutionParams(); $ret.d = this.im; $ret.i = d; $ret.h = e; $ret.j = c; return $ret; })()), g, h, i); 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.k = this.abb; o.j = 0; o.m = this.z6.tu; o.l = this.z6.tt; o.n = (p, q) => this.z7.c(p, q, c, d, e, Math.cos); o.o = (p, q) => this.z7.d(p, q, c, d, e, Math.sin); o.p(a.p._inner[n], o.g$b, j, l, o.g$f, runOn(this.z5, this.z5.getScaledAngle), runOn(this.z6, this.z6.t1), ((() => { let $ret = new TrendResolutionParams(); $ret.d = this.im; $ret.i = d; $ret.h = e; $ret.j = c; return $ret; })()), g, h, i); } } } get_fh() { return true; } aap(a, b, c) { return null; } aaq(a, b, c) { if (this.dp == null) { return null; } let d = this.aad(); let e = this.z9.ce(this.wt(b)); let f = -1; if (e == null) { if (a != null) { f = this.dp.indexOf(a); } else { return null; } } else { f = e.al; } 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; } aao(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.aap(a, b, this.aar); this.aar = d; return d; } else { let e = this.aao(a, b, this.aar); this.aar = e; return e; } } di(a, b, c) { if (this.f3(this.by) && !c) { let d = this.aaq(a, b, this.aas); this.aas = d; return d; } else { let e = this.aao(a, b, this.aas); e.d = true; this.aas = e; return e; } } aa9() { return (this.assigningPolarStyle != null && this.aay) || (this.by != 1) || this.d3 || (this.cq != 1) || (this.cp != 1); } aa8() { return (this.assigningPolarMarkerStyle != null && this.aax) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } act(a, b) { this.rf(); let c = b.ca; let d = b.b9; let e = this.getEffectiveViewport1(b); let f = this.w6(b); this.z8 = new PolarAxisInfoCache(this.z5, this.z6, this.dp); if (this.x4()) { b.db.j(a.m, this.x6); if (this.aa8()) { this.acj(b, a); } } b.c4(); let g = this.z2(d, b.dd.g$n.an); b.dd.g$k(a.r, g); if (b.aa.count > 0) { for (let h = 0; h < b.aa.count; h++) { let i = b.aa._inner[h]; i.g$k(a.p._inner[h], g); } } this.acg(d, c, e, f, b); } zz(a, b) { return this.z0(a, b); } z0(a, b) { if (b < a || a < 0 || a > this.aav.count || b < 0 || b > this.aav.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; } acj(a, b) { a.ck = true; this.aah.ay(this, this.aa8(), runOn(this, this.zz)); let c = this.aah.d; let d = c != null; let e = this.getEffectiveViewport1(a); let f = this.dp == null ? 0 : this.dp.count; this.z9.cw((g) => { if (g._visibility == 0) { let h = g.al; let i = g.content; if (i == null) { i = new DataContext(); g.content = i; } if (d) { this.acn(h, f, a.t); } this.aah.ac(g, i); } }); } aco(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.aah.a0(this.aah.b, a, b, false); this.aah.ab(this.ik); let g = this.aah.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) { i = this.dc.d8.getHighlightingInfo(this, k, g.z, g.y, false); if (i == null && this.bo != null) { i = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, false); } g.d = i; } if (f && this.dc != null) { j = this.dc.d6.getHighlightingInfo(this, k, g.z, g.y, false); g.b = j; } g.h = c; this.acr(g); this.aah.z(this, h, i, j, c, d, e, f, a < 0); } acn(a, b, c) { let d = this.by != 1; let e = this.cq != 1; let f = this.cp != 1; this.aah.a0(this.aah.d, a, b, true); this.aah.aa(this.ik); let g = this.aah.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 (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.acq(g); this.aah.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); } acr(a) { if (this.assigningPolarStyle != null && this.aay) { this.assigningPolarStyle(this, a); } } acq(a) { if (this.assigningPolarMarkerStyle != null && this.aax) { this.assigningPolarMarkerStyle(this, a); } } acg(a, b, c, d, e) { e.dg(a, b, c, d); } s1() { super.s1(); if (this.index < 0) { return; } this.z9.dj(); } sc(a, b) { super.sc(a, b); if (!this.g8) { this.cw.be(b); return; } this.cw.be(b); if (this.d7(this.cv)) { return; } this.sd(); this.g8 = false; } sd() { super.sd(); let a = this.cv; if (!this.g0) { this.aaf = new PolarFrame(); this.acp(this.aaf, a); } this.g0 = false; this.act(this.aaf, a); } r9(a, b, c, d, e) { super.r9(a, b, c, d, e); let f = this.ba.a$k.item(d); let g = f; f.bd(c); if (this.d7(g)) { return; } if (this.aab == null) { this.aab = new PolarFrame(); } this.acp(this.aab, g); this.act(this.aab, g); } acs(a, b) { let c = new List$1(Base.$, 0); for (let d of fromEnum(b.c)) { if (!a.containsKey(d)) { c.add1(d); } } for (let e of fromEnum(c)) { b.h(e); } } zy(a, b, c) { this.ack(); return this.aaa.aa.toArray(); } abd(a) { let b = new List$1(Number_$type, 0); let c = this.dp; for (let d of fromEnum(this.z9.de.c)) { b.add(c.indexOf(d)); } return b; } adn(a) { return { $type: Point_$type, x: this.aav.item(a), y: this.aaw.item(a) }; } qf(a) { super.qf(a); this.bc.exportTrendlineData(this, a, this.z9.dd.g$n); } getDataLegendSeriesContextAt(a, b) { let c = { $type: Point_$type, x: a, y: b }; let d = this.ky(c); let e = d == null ? NaN : this.i6(d, "RadiusMemberPath"); let f = d == null ? NaN : this.i6(d, "AngleMemberPath"); let g = new DataLegendSeriesValueInfo(); g.l = e; g.a = 11; g.r = this.acd != null ? this.acd : "Radius"; g.q = "Radius"; g.s = this.ab9 != null ? this.ab9 : "R:"; g.t = this.acb != null ? this.acb : ""; let h = new DataLegendSeriesValueInfo(); h.l = f; h.a = 10; h.r = this.abv != null ? this.abv : "Angle"; h.q = "Angle"; h.s = this.abr != null ? this.abr : "A:"; h.t = this.abt != null ? this.abt : ""; let i = new DataLegendSeriesContext(); i.e = ((() => { let $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(g); $ret.add(h); return $ret; })()); i.h = this.mp(); return i; } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.qk(a, c, b); return c.toArray(); } qk(a, b, c) { let d = this.cw.ca; let e = this.cw.b9; let f = this.getEffectiveViewport1(this.cw); let g = this.dc.y3(this.xf, this.getEffectiveViewport(), d); let h = new CollisionRect(0, this.dc.y0(a)); let i = this.z6.qb(e, d, f, g); for (let j = 0; j < this.dp.count; j++) { let k = this.z5.getScaledAngle(this.aav.item(j)); let l = this.z6.t1(this.aaw.item(j)); let m = this.z7.c(k, l, d, e, f, Math.cos); let n = this.z7.d(k, l, d, e, f, Math.sin); if (h.containsLocation(m, n)) { 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(j); return $ret; })())); } else { b.add(((() => { let $ret = new ChartSelection(); $ret.item = this.dp.item(j); $ret.series = this; return $ret; })())); } } } } bd() { return new PolarTrendLineManager(); } static { this.$$p = markDep(DependencyProperty, PropertyMetadata, PolarBase, 'raisePropertyChanged', ['AngleAxis:z5:acv', [NumericAngleAxis.$, null], 'AngleMemberAsLegendLabel:abr:acw', [2, null], 'AngleMemberAsLegendUnit:abt:acx', [2, null], 'AngleMemberPath:abv:acy', [2], 'ClipSeriesToBounds:aa1:acz', [0, false], 'HighlightedAngleMemberPath:aby:ac0', [2, null], 'HighlightedRadiusMemberPath:ab0:ac1', [2, null], 'IsCustomPolarMarkerStyleAllowed:aa3:ac2', [0, false], 'IsCustomPolarStyleAllowed:aa4:ac3', [0, false], 'ItemSearchMode:aal:ac4', [ScatterItemSearchMode_$type, enumGetBox(ScatterItemSearchMode_$type, 0)], 'ItemSearchThreshold:abk:ac5', [1, 10000], 'MaximumMarkers:abl:ac6', [1, 400], 'RadiusAxis:z6:ac7', [NumericRadiusAxis.$, null], 'RadiusMemberAsLegendLabel:ab9:ac8', [2, null], 'RadiusMemberAsLegendUnit:acb:ac9', [2, null], 'RadiusMemberPath:acd:ada', [2], 'UseCartesianInterpolation:abb:adi', [0, true], 'TrendLineType:aan:adg', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:abj:adf', [1, 1.5], 'TrendLinePeriod:abm:ade', [1, 7], 'TrendLineZIndex:abn:adh', [1, 1], 'TrendLineBrush:adk:adb', [Brush.$, null], 'TrendLineDashArray:adl:adc', [DoubleCollection.$], 'TrendLineDashCap:adm:add', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]); } } /** * @hidden */ export class PolarSeriesRenderManager extends SeriesRenderManager { constructor() { super(...arguments); this.aw = null; this.ax = null; } static { this.$t = markType(PolarSeriesRenderManager, 'PolarSeriesRenderManager', SeriesRenderManager.$); } c() { this.aw = new AssigningPolarMarkerStyleEventArgs(); return this.aw; } a() { this.ax = new AssigningPolarStyleEventArgs(); return this.ax; } ay(a, b, c) { this.w(a, b, c); } az(a, b, c) { this.x(a, b, c); } a0(a, b, c, d) { if (b == -1) { a.e = false; a.z = 0; a.y = c - 1; } else { if (d) { a.z = b; a.y = b; } else { a.e = false; a.z = b; a.y = b; } } } } /** * @hidden */ export class PolarBaseView extends MarkerSeriesView { static { this.$t = markType(PolarBaseView, 'PolarBaseView', MarkerSeriesView.$); } constructor(a) { super(a); this.dc = null; this.db = null; this.dd = null; this.de = null; this.dc = a; this.de = new HashPool$2(Base.$, Marker.$); this.cz(this.de); this.dd = new PolarTrendLineManager(); } a4() { super.a4(); this.db = this.da(); if (!this.t) { this.dc.abl = 1000; this.ch.xy = Defaults.e; } } dh(a) { this.de.g(a); } da() { let a = new NumericMarkerManager(0, (b) => this.de.item(b), (b) => this.dc.z8.c.item(b), runOn(this, this.di), runOn(this, this.c9), runOn(this, this.df)); a.n = true; a.p = runOn(this.dc, this.dc.adn); return a; } di(a) { this.dc.acs(a, this.de); } c9() { return this.dc.zy(this.de, this.ca, this.b9); } df() { return this.dc.abd(this.de); } dg(a, b, c, d) { if (this.dc.aa1) { let e = new GeometryGroup(); this.dc.z6.t8(e, a, b, c, d); } else { } } dj() { if (this.dc.adk != null) { this.dc.adj = this.dc.adk; } else { this.dc.adj = this.dc.vv; } } cw(a) { this.de.f(a); } bi(a, b) { if (a.d) { if (this.dc.aan != 0 && !b) { let c = this.dd.g$n; c.ad = this.dc.abj; c._stroke = this.dc.adj; c.aj = this.dc.adm; c.ai = this.dc.adl; a.v(c); } } super.bi(a, b); } dk() { return Rect.empty; } getDefaultTooltipTemplate() { let a = "<div class='ui-chart-default-tooltip-content'><span>" + "${item." + this.dc.abv + "}" + "</span><br/><span"; let b = this.f.ba.a$v(this.f); if (!stringIsNullOrEmpty(b)) { a += " style='color:" + b + "'"; } a += ">" + this.dc.title + ": </span><span class='ui-priority-primary'>" + "${item." + this.dc.acd + "}</span></div>"; return a; } }