UNPKG

igniteui-react-charts

Version:

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

1,448 lines 53.3 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 { __extends, __values } from "tslib"; import { MarkerSeries } from "./MarkerSeries"; import { Base, runOn, delegateCombine, Number_$type, enumGetBox, fromEnum, Point_$type, typeCast, markType, markDep } from "igniteui-react-core"; import { PolarAxisInfoCache } from "./PolarAxisInfoCache"; import { SeriesRenderer$2 } from "./SeriesRenderer$2"; import { PolarFrame } from "./PolarFrame"; import { DependencyProperty } from "igniteui-react-core"; import { NumericAngleAxis } from "./NumericAngleAxis"; import { NumericRadiusAxis } from "./NumericRadiusAxis"; 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 { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode"; import { HighlightingInfo } 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 { PolarAxes } from "./PolarAxes"; import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay"; import { IFastItemsSource_$type } from "igniteui-react-core"; import { SeriesRenderingArguments } from "./SeriesRenderingArguments"; import { AxisRange } from "./AxisRange"; import { Dictionary$2 } from "igniteui-react-core"; import { OwnedPoint } from "./OwnedPoint"; import { GeometryUtil } from "igniteui-react-core"; import { DataContext } from "igniteui-react-core"; import { HashPool$2 } from "igniteui-react-core"; import { Clipper } from "igniteui-react-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-react-core"; import { DataLegendSeriesContext } from "igniteui-react-core"; import { ChartSelection } from "./ChartSelection"; import { CollisionRect } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; import { truncate, isNaN_, isInfinity } from "igniteui-react-core"; import { Defaults } from "./Defaults"; import { NumericMarkerManager } from "./NumericMarkerManager"; import { GeometryGroup } from "igniteui-react-core"; import { stringIsNullOrEmpty } from "igniteui-react-core"; /** * @hidden */ var PolarBase = /** @class */ /*@__PURE__*/ (function (_super) { __extends(PolarBase, _super); function PolarBase() { var _this = _super.call(this) || this; _this.y9 = null; _this.y0 = null; _this.y7 = null; _this.acq = null; _this.acp = null; _this.aco = null; _this.zl = null; _this.zs = null; _this.zt = null; _this.zd = new PolarFrame(); _this.zf = new PolarFrame(); _this.zb = new PolarFrame(); _this.y6 = null; _this.aab = null; _this.zh = 1; _this.zx = false; _this.zw = false; _this.zq = null; _this.zr = null; _this.assigningPolarStyle = null; _this.assigningPolarMarkerStyle = null; _this.zg = null; _this.ze = null; _this.za = null; _this.zg = new PolarSeriesRenderManager(); _this.zi = _this.zj(); _this.ze = new PolarFrame(); _this.zf.y = runOn(_this, _this.acn); _this.zd.y = runOn(_this, _this.acn); _this.zb.y = runOn(_this, _this.acn); _this.zl = new SeriesRenderer$2(PolarFrame.$, PolarBaseView.$, 0, runOn(_this, _this.abo), runOn(_this, _this.abs), runOn(_this, _this.d4), runOn(_this, _this.sg), runOn(_this, _this.abh)); return _this; } PolarBase.prototype.ct = function () { return new PolarBaseView(this); }; PolarBase.prototype.q8 = function (a) { _super.prototype.q8.call(this, a); this.y8 = a; }; PolarBase.prototype.o8 = function () { _super.prototype.o8.call(this); this.y4 = null; this.y5 = null; }; PolarBase.prototype.get_fq = function () { return true; }; PolarBase.prototype.ed = function (a, b, c, d, e) { var _this = this; if (!this.hasMarkers) { return false; } var f = this.y4; var g = new ScalerParams(1, this.dc.xn, this.w3, f.df); g.c = this.getEffectiveViewport1(this.cw); var h = this.y5; var i = new ScalerParams(1, this.dc.xn, this.w3, h.df); i.c = this.getEffectiveViewport1(this.cw); a.clear(); this.xh.cw(function (j) { if (j._visibility == 0) { var k = new SeriesPointOfInterest(); var l = j.n; var m = j.o; if (!e && (l < _this.w3.left || l > _this.w3.right || m < _this.w3.top || m > _this.w3.bottom)) { return; } var n = void 0; var o = void 0; var p = _this.y6.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.vr; k.c = j.ak; if (_this.ha) { k.g = _this.vy(j.ak); } a.add(k); } }); return true; }; PolarBase.prototype.abh = function () { if (this.dd.g) { this.dd.t(); } }; PolarBase.prototype.abj = function () { this.y6.e(this.y9.x, this.zu, this.zv, this.acq, this.acp, this.aco, function (a, b) { return Math.cos(b); }, function (a, b) { return Math.sin(b); }, true); }; PolarBase.prototype.gc = function () { return this.highlightedItemsSource != null || (this.aaz != null && this.aax != null); }; PolarBase.prototype.z9 = function () { return false; }; PolarBase.prototype.hu = function () { var a = _super.prototype.hu.call(this); { var b = ((function () { var $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.abk)); a.add(b); } { var c = ((function () { var $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.abl)); a.add(c); } if (this.z9()) { var d = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "DashArray"; $ret.p = true; $ret.x = ((function () { var $ret = new DoubleCollection(); $ret.add(5); $ret.add(5); return $ret; })()); $ret.q = true; return $ret; })()); a.add(d); } if (!this.z9()) { var e = ((function () { var $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.z9()) { var f = ((function () { var $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; }; PolarBase.prototype.abl = function (a, b) { if (this.aaz != null) { b.value = this.aaz; return; } b.value = this.abc; }; PolarBase.prototype.abk = function (a, b) { if (this.aax != null) { b.value = this.aax; return; } b.value = this.aau; }; Object.defineProperty(PolarBase.prototype, "zu", { get: function () { return this.zs; }, set: function (a) { if (this.zs != a) { var b = this.zu; this.zs = a; this.raisePropertyChanged("AngleColumn", b, this.zu); } }, enumerable: false, configurable: true }); Object.defineProperty(PolarBase.prototype, "zv", { get: function () { return this.zt; }, set: function (a) { if (this.zt != a) { var b = this.zv; this.zt = a; this.raisePropertyChanged("RadiusColumn", b, this.zv); } }, enumerable: false, configurable: true }); Object.defineProperty(PolarBase.prototype, "aci", { get: function () { return this.c(PolarBase.abt); }, set: function (a) { this.h(PolarBase.abt, a); }, enumerable: false, configurable: true }); PolarBase.prototype.zc = function () { var a = this.zb; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.zf; } return a; }; PolarBase.prototype.qh = function () { _super.prototype.qh.call(this); if (this.y5 != null) { this.y5.k3(false); } if (this.y4 != null) { this.y4.k3(false); } }; PolarBase.prototype.ph = function (a, b, c, d) { var e_1, _a; var e = false; this.y8.dd.g$i(a, b, c, d); if (this.y8.aa.count > 0) { try { for (var _b = __values(fromEnum(this.y8.aa)), _c = _b.next(); !_c.done; _c = _b.next()) { var f = _c.value; f.g$i(a, b, c, d); } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } } if (this.y4 != null && !this.y4.d2()) { e = true; } if (this.y5 != null && !this.y5.d2()) { e = true; } if (e) { this.rz(true); } }; PolarBase.prototype.sz = function (a, b) { this.rz(false); }; PolarBase.prototype.s0 = function (a, b) { this.rz(false); }; PolarBase.prototype.hf = function (a, b, c) { var d = true; if (!_super.prototype.hf.call(this, a, b, c) || !c.r() || b.isEmpty || a.isEmpty || this.y4 == null || this.y5 == null || this.zu == null || this.zv == null || this.zu.count == 0 || this.zv.count == 0 || this.dp == null || this.dp.count != this.zu.count || this.dp.count != this.zv.count || this.y6 == null || this.y4.b0 == null || this.y5.b0 == null || this.y4.pr == this.y4.pq || this.y5.pr == this.y5.pq) { d = false; } return d; }; PolarBase.prototype.r0 = function (a) { _super.prototype.r0.call(this, a); var b; var c; var d = this.getViewInfo(c, b); c = d.p0; b = d.p1; if (!this.hf(c, b, this.cw)) { this.pb(true, this.cw); return; } this.acq = b; this.acp = c; this.aco = this.cw.getEffectiveViewport(); this.y7 = new PolarAxisInfoCache(this.y4, this.y5, this.dp); var e = new SeriesRenderingArguments(this, c, b, a, this.gs); var f = this.zl.g(e, this.zd, this.zb, this.zf, this.y8); this.zd = f.p1; this.zb = f.p2; this.zf = f.p3; }; PolarBase.prototype.acn = function (a) { var b = this.y6.h(a.x, a.y, this.acq, this.acp, this.aco, this.y7.e, this.y7.d, this.y7.g, this.y7.f, this.y7.i, this.y7.h); return b; }; PolarBase.prototype.ay = function (a) { if (a != null && a == this.y4 && this.zu != null) { return new AxisRange(this.zu.minimum, this.zu.maximum); } if (a != null && a == this.y5 && this.zv != null) { return new AxisRange(this.zv.minimum, this.zv.maximum); } return null; }; PolarBase.prototype.ge = function (a) { var b = this.cw.ca; b = b.copy(); var c = this.cw.b9; var d = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1; if (this.y4 == null || this.zu == null || this.y5 == null || this.zv == null) { return false; } if (d < 0 || d > this.zu.count - 1 || d > this.zv.count - 1) { return false; } var e = this.y4.getScaledAngle(this.zu.item(d)); var f = this.y5.sh(this.zv.item(d)); var g = 0.5 + (Math.cos(e) * f); var 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.au(this.dc, b, true); } return d >= 0; }; PolarBase.prototype.kr = function (a) { var b = this.j7(a); if (this.dp != null && b >= 0 && b < this.dp.count) { return this.dp.item(b); } return null; }; PolarBase.prototype.j7 = function (a) { var b = truncate(Math.round(this.it(a))); return b; }; PolarBase.prototype.it = function (a) { switch (this.zi) { case 1: return this.aaf(a); case 3: return this.aag(a); case 2: return this.aad(a); case 4: return this.aae(a); } return -1; }; PolarBase.prototype.aae = function (a) { return this.aah(a, false); }; PolarBase.prototype.aad = function (a) { var b = this.wi(a); var c = b.x; var d = b.y; if (this.dp == null || this.y4 == null || this.y5 == null || this.zu == null || this.zv == null) { return -1; } if (this.dp.count > this.aaj) { return -1; } if (!this.z1()) { return -1; } var e = this.aab; var f = 1.7976931348623157E+308; var g = -1; for (var h = 0; h < this.zu.count; h++) { var i = e._inner[h].x; var j = e._inner[h].y; var k = (c - i) * (c - i) + (d - j) * (d - j); if (k < f) { f = k; g = h; } } return g; }; PolarBase.prototype.z1 = function () { var a = this.zb; if (this.d4()) { a = this.zf; } if (a == null || a.x.count == 0) { return false; } this.aab = a.x; return true; }; PolarBase.prototype.aah = function (a, b) { if (!this.z4) { return -1; } var c = { $type: Point_$type, x: 0, y: 0 }; var d = true; var e = this.zb; if (this.d4()) { e = this.zf; } if (e == null) { return -1; } if (e.n == null) { return -1; } if (this.dp == null || this.dp.count > this.aaj) { return -1; } if (!this.z1()) { return -1; } var f = this.aab; var g = this.wi(a); var h = 1.7976931348623157E+308; var i = -1; for (var j = 0; j < f.count; j++) { var 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.j.containsKey(this.dp.item(j)) || e.j.containsKey(this.dp.item(j - 1))) { var l = GeometryUtil.h(g, c, k); if (l < h) { h = l; i = j; } } } c = k; } if (i >= 0) { var m = f._inner[i]; var n = f._inner[i - 1]; if (!b || (e.j.containsKey(this.dp.item(i)) && e.j.containsKey(this.dp.item(i - 1)))) { var o = GeometryUtil.m(g, n, m); return (i - 1) + o; } else if (e.j.containsKey(this.dp.item(i))) { return i; } else { return i - 1; } } return -1; }; PolarBase.prototype.aag = function (a) { return this.aah(a, true); }; PolarBase.prototype.aaf = function (a) { var _this = this; var b = null; var c = 1.7976931348623157E+308; var d = this.wi(a); var e = d.x; var f = d.y; if (this.y8.de.e > this.aaj) { return -1; } this.y8.dh(function (g) { if (g._visibility == 0) { var h = _this.y8.c7(g); var i = h.left + h.width / 2; var j = h.top + h.height / 2; var k = (e - i) * (e - i) + (f - j) * (f - j); if (k < c) { c = k; b = g; } } }); if (b != null) { return b.ak; } return -1; }; PolarBase.prototype.wn = function (a, b, c) { var _this = this; if (this.y4 == null || this.y5 == null || this.zu == null || this.zv == null) { return { $type: Point_$type, x: NaN, y: NaN }; } var d = this.cw.ca; var e = this.cw.b9; var f = this.getEffectiveViewport(); var g = new ScalerParams(0, d, e, this.y4.df, f); var h = ((function () { var $ret = new ScalerParams(0, d, e, _this.y5.df, f); $ret.b = _this.i0(); return $ret; })()); if (b) { var i = this.it(a); if (i == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } var j = truncate(Math.floor(i)); var 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.y6.h(this.zu.item(j), this.zv.item(j), d, e, f, this.y7.e, this.y7.d, this.y7.g, this.y7.f, this.y7.i, this.y7.h); } var l = i - Math.floor(i); var m = this.y6.h(this.zu.item(j), this.zv.item(j), d, e, f, this.y7.e, this.y7.d, this.y7.g, this.y7.f, this.y7.i, this.y7.h); var n = this.y6.h(this.zu.item(k), this.zv.item(k), d, e, f, this.y7.e, this.y7.d, this.y7.g, this.y7.f, this.y7.i, this.y7.h); var o = m.x; var p = m.y; var q = n.x; var r = n.y; var s = q - o; var t = r - p; return { $type: Point_$type, x: o + s * l, y: p + t * l }; } else { var u = this.j7(a); if (u == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } return this.y6.h(this.zu.item(u), this.zv.item(u), d, e, f, this.y7.e, this.y7.d, this.y7.g, this.y7.f, this.y7.i, this.y7.h); } }; PolarBase.prototype.ai = function () { return [this.y4, this.y5]; }; PolarBase.prototype.ku = function (a, b) { var c = this.ni(b); if (c == PolarBase.$$p[3]) { return this.kv(a, b, this.aau); } if (c == PolarBase.$$p[15]) { return this.kv(a, b, this.abc); } if (c == PolarBase.$$p[5]) { return this.kv(a, b, this.aax); } if (c == PolarBase.$$p[6]) { return this.kv(a, b, this.aaz); } return _super.prototype.ku.call(this, a, b); }; PolarBase.prototype.mi = function (a) { var b = this.ni(a); if (b == PolarBase.$$p[3]) { return this.aau; } if (b == PolarBase.$$p[15]) { return this.abc; } if (b == PolarBase.$$p[5]) { return this.aax; } if (b == PolarBase.$$p[6]) { return this.aaz; } return _super.prototype.mi.call(this, a); }; PolarBase.prototype.rh = function (a, b, c, d) { _super.prototype.rh.call(this, a, b, c, d); if (this.y8.dd.g$e(a, b, c, d)) { this.rz(false); this.qs(); } switch (b) { case PolarBase.$$p[1]: case PolarBase.$$p[2]: case PolarBase.$$p[13]: case PolarBase.$$p[14]: this.qm(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.zu); c.deregisterColumn(this.zv); this.zu = null; this.zv = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.zu = this.dl(this.aau); this.zv = this.dl(this.abc); } if ((this.y5 != null && !this.y5.d2()) || (this.y4 != null && !this.y4.d2())) { this.rz(this.gh && c != null); } break; case PolarBase.$$p[0]: if (this.y4 != null && this.y5 != null) { this.y6 = new PolarAxes(this.y5, this.y4); } if (c != null) { c.cq(this); } if (d != null) { d.du(this); } if (this.y4 != null && !this.y4.d2()) { this.rz(false); } else if (c != null && d == null) { this.pb(true, this.cw); } break; case PolarBase.$$p[12]: if (this.y4 != null && this.y5 != null) { this.y6 = new PolarAxes(this.y5, this.y4); } if (c != null) { c.cq(this); } if (d != null) { d.du(this); } if (this.y5 != null && !this.y5.d2()) { this.rz(false); } else if (c != null && d == null) { this.pb(true, this.cw); } if (this.y4 != null && !this.y4.d2()) { this.y4.kz(); } break; case PolarBase.$$p[3]: if (this.dp != null) { this.dp.deregisterColumn(this.zu); this.zu = this.dl(this.aau); } break; case "AngleColumn": this.y8.dd.g$m(); if (this.y4 != null && !this.y4.d2()) { this.rz(this.gh && this.d9); } break; case PolarBase.$$p[15]: if (this.dp != null) { this.dp.deregisterColumn(this.zv); this.zv = this.dl(this.abc); } break; case "RadiusColumn": this.y8.dd.g$m(); if (this.y5 != null && !this.y5.d2()) { this.rz(this.gh && this.d9); } break; case PolarBase.$$p[16]: this.rz(false); this.qs(); break; case PolarBase.$$p[11]: this.rz(false); this.qs(); break; case "TransitionProgress": this.y7 = new PolarAxisInfoCache(this.y4, this.y5, this.dp); this.acq = this.cw.ca; this.acp = this.cw.b9; this.aco = this.cw.getEffectiveViewport(); this.zf.w = this.aaa; this.zf.c(this.ju, this.zd, this.zb); if (this.d7(this.cw)) { return; } if (this.ju == 1) { this.abs(this.zb, this.y8); this.qv(); } else { this.abs(this.zf, this.y8); } if (this.dc != null) { this.dc.r0(this); } break; case "TrendLineBrush": this.rn(b); break; case PolarBase.$$p[4]: this.rz(false); this.qs(); break; case "TrendLineType": this.qs(); break; case PolarBase.$$p[8]: this.zx = this.z6(); this.rz(false); break; case PolarBase.$$p[7]: this.zw = this.z5(); this.rz(false); break; case PolarBase.$$p[9]: this.zi = this.zj(); break; } }; Object.defineProperty(PolarBase.prototype, "zi", { get: function () { return this.zh; }, set: function (a) { var b = this.zh; this.zh = a; if (b != this.zh) { this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.zh)); } }, enumerable: false, configurable: true }); PolarBase.prototype.zj = function () { if (this.zk != 0) { return this.zk; } return this.z4 ? 4 : 1; }; PolarBase.prototype.get_z4 = function () { return false; }; Object.defineProperty(PolarBase.prototype, "z4", { get: function () { return this.get_z4(); }, enumerable: false, configurable: true }); PolarBase.prototype.z6 = function () { return this.z3; }; PolarBase.prototype.z5 = function () { return this.z2; }; PolarBase.prototype.zz = function (a) { if (typeCast(NumericRadiusAxis.$, a) !== null) { return true; } return false; }; PolarBase.prototype.zy = function (a) { if (typeCast(NumericAngleAxis.$, a) !== null) { return true; } return false; }; PolarBase.prototype.pb = function (a, b) { _super.prototype.pb.call(this, a, b); var c = b; if (a) { c.de.clear(); } c.dd.g$h(); }; PolarBase.prototype.y1 = function (a, b) { var c = a.top - 10; var d = a.bottom + 10; var e = a.left - 10; var f = a.right + 10; var g = ((function () { var $ret = new Clipper(1, e, d, f, c, false); $ret.i = b; return $ret; })()); return g; }; PolarBase.prototype.abg = function (a, b, c, d) { a.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, b); var e = this.dp; var _loop_1 = function (f) { var g = a.x._inner[f]; if (!isInfinity(g.x) && !isInfinity(g.y)) { var h_1 = { $type: Point_$type, x: this_1.zu.item(f), y: this_1.zv.item(f) }; var i_1 = { $type: Point_$type, x: g.x, y: g.y }; a.g.addItem(e.item(f), ((function () { var $ret = new OwnedPoint(); $ret.a = e.item(f); $ret.b = h_1; $ret.c = i_1; return $ret; })())); } }; var this_1 = this; for (var f = 0; f < b; f++) { _loop_1(f); } }; PolarBase.prototype.abo = function (a, b) { var _this = this; var c = b.ca; var d = b.b9; var e = b.getEffectiveViewport(); a.j.clear(); a.o.clear(); var f = Math.min(this.zu != null ? this.zu.count : 0, this.zv != null ? this.zv.count : 0); if (f < 1) { return; } this.y7 = new PolarAxisInfoCache(this.y4, this.y5, this.dp); this.y9 = a; this.acp = d; this.acq = c; this.aco = b.getEffectiveViewport(); b.db.l(a.j, this.aak, c, d, this.ie); if (f <= this.aak) { this.abg(a, f, c, d); } var g = this.y1(d, a.o); var h = Math.min(this.y4.pr, this.y4.pq); var i = Math.max(this.y4.pq, this.y4.pr); b.dd.k = this.aaa; b.dd.j = 0; b.dd.m = this.y5.sb; b.dd.l = this.y5.sa; b.dd.n = function (j, k) { return _this.y6.c(j, k, c, d, e, Math.cos); }; b.dd.o = function (j, k) { return _this.y6.d(j, k, c, d, e, Math.sin); }; var j = new List$1(Number_$type, 0); for (var k = 0; k < this.zu.count; k++) { if (this.zu.item(k) >= h && this.zu.item(k) <= i) { j.add(this.zu.item(k)); } } var l = this.zv; if (j.count != this.zu.count) { l = new List$1(Number_$type, 0); for (var m = 0; m < this.zu.count; m++) { if (this.zu.item(m) >= h && this.zu.item(m) <= i) { l.add(this.zv.item(m)); } } } b.dd.p(a.o, this.zm, j, l, this.aal, runOn(this.y4, this.y4.getScaledAngle), runOn(this.y5, this.y5.sh), ((function () { var $ret = new TrendResolutionParams(); $ret.d = _this.ie; $ret.i = d; $ret.h = e; $ret.j = c; return $ret; })()), g, h, i); if (b.aa.count > 0) { a.m.clear(); for (var n = 0; n < b.aa.count; n++) { a.m.add(new List$1(Point_$type, 0)); var o = b.aa._inner[n]; o.k = this.aaa; o.j = 0; o.m = this.y5.sb; o.l = this.y5.sa; o.n = function (p, q) { return _this.y6.c(p, q, c, d, e, Math.cos); }; o.o = function (p, q) { return _this.y6.d(p, q, c, d, e, Math.sin); }; o.p(a.m._inner[n], o.g$b, j, l, o.g$f, runOn(this.y4, this.y4.getScaledAngle), runOn(this.y5, this.y5.sh), ((function () { var $ret = new TrendResolutionParams(); $ret.d = _this.ie; $ret.i = d; $ret.h = e; $ret.j = c; return $ret; })()), g, h, i); } } }; PolarBase.prototype.get_ff = function () { return true; }; PolarBase.prototype.zo = function (a, b, c) { return null; }; PolarBase.prototype.zp = function (a, b, c) { if (this.dp == null) { return null; } var d = this.zc(); var e = this.y8.ce(this.wi(b)); var 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; } var 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; }; PolarBase.prototype.zn = function (a, b, c) { var 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; }; PolarBase.prototype.dh = function (a, b, c) { if (this.ef && this.f0(this.by) && !c) { var d = this.zo(a, b, this.zq); this.zq = d; return d; } else { var e = this.zn(a, b, this.zq); this.zq = e; return e; } }; PolarBase.prototype.di = function (a, b, c) { if (this.f0(this.by) && !c) { var d = this.zp(a, b, this.zr); this.zr = d; return d; } else { var e = this.zn(a, b, this.zr); e.d = true; this.zr = e; return e; } }; PolarBase.prototype.z8 = function () { return (this.assigningPolarStyle != null && this.zx) || (this.by != 1) || this.d3 || (this.cq != 1) || (this.cp != 1); }; PolarBase.prototype.z7 = function () { return (this.assigningPolarMarkerStyle != null && this.zw) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); }; PolarBase.prototype.abs = function (a, b) { this.q4(); var c = b.ca; var d = b.b9; var e = this.getEffectiveViewport1(b); var f = this.wu(b); this.y7 = new PolarAxisInfoCache(this.y4, this.y5, this.dp); if (this.xr()) { b.db.j(a.j, this.xt); if (this.z7()) { this.abi(b, a); } } b.c4(); var g = this.y1(d, b.dd.g$n.an); b.dd.g$l(a.o, g); if (b.aa.count > 0) { for (var h = 0; h < b.aa.count; h++) { var i = b.aa._inner[h]; i.g$l(a.m._inner[h], g); } } this.abf(d, c, e, f, b); }; PolarBase.prototype.yy = function (a, b) { return this.yz(a, b); }; PolarBase.prototype.yz = function (a, b) { if (b < a || a < 0 || a > this.zu.count || b < 0 || b > this.zu.count) { return null; } var c = new Array((b - a) + 1); for (var d = a; d <= b; d++) { var e = d; c[d - a] = this.dp.item(d); } return c; }; PolarBase.prototype.abi = function (a, b) { var _this = this; a.ck = true; this.zg.ay(this, this.z7(), runOn(this, this.yy)); var c = this.zg.d; var d = c != null; var e = this.getEffectiveViewport1(a); var f = this.dp == null ? 0 : this.dp.count; this.y8.cw(function (g) { if (g._visibility == 0) { var h = g.ak; var i = g.content; if (i == null) { i = new DataContext(); g.content = i; } if (d) { _this.abm(h, f, a.t); } _this.zg.ac(g, i); } }); }; PolarBase.prototype.abn = function (a, b, c) { var d = this.by != 1; var e = this.cq != 1; var f = this.cp != 1; this.zg.a0(this.zg.b, a, b, false); this.zg.ab(this.ic); var g = this.zg.ax; var h = null; var i = null; var j = null; var 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) { i = this.dc.d1.getHighlightingInfo(this, k, g.z, g.y, false); if (i == null && this.bo != null) { i = this.dc.d1.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, false); } g.d = i; } if (f && this.dc != null) { j = this.dc.dz.getHighlightingInfo(this, k, g.z, g.y, false); g.b = j; } g.h = c; this.abq(g); this.zg.z(this, h, i, j, c, d, e, f, a < 0); }; PolarBase.prototype.abm = function (a, b, c) { var d = this.by != 1; var e = this.cq != 1; var f = this.cp != 1; this.zg.a0(this.zg.d, a, b, true); this.zg.aa(this.ic); var g = this.zg.aw; var h = null; var i = null; var j = null; var k = this.dp; var l = null; var m = null; var 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 (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.abp(g); this.zg.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); }; PolarBase.prototype.abq = function (a) { if (this.assigningPolarStyle != null && this.zx) { this.assigningPolarStyle(this, a); } }; PolarBase.prototype.abp = function (a) { if (this.assigningPolarMarkerStyle != null && this.zw) { this.assigningPolarMarkerStyle(this, a); } }; PolarBase.prototype.abf = function (a, b, c, d, e) { e.dg(a, b, c, d); }; PolarBase.prototype.sq = function () { _super.prototype.sq.call(this); if (this.index < 0) { return; } this.y8.dj(); }; PolarBase.prototype.r1 = function (a, b) { _super.prototype.r1.call(this, a, b); if (!this.g1) { this.cw.be(b); return; } this.cw.be(b); if (this.d7(this.cv)) { return; } this.r2(); this.g1 = false; }; PolarBase.prototype.r2 = function () { _super.prototype.r2.call(this); var a = this.cv; if (!this.gt) { this.ze = new PolarFrame(); this.abo(this.ze, a); } this.gt = false; this.abs(this.ze, a); }; PolarBase.prototype.ry = function (a, b, c, d, e) { _super.prototype.ry.call(this, a, b, c, d, e); var f = this.ba.a$j.item(d); var g = f; f.bd(c); if (this.d7(g)) { return; } if (this.za == null) { this.za = new PolarFrame(); } this.abo(this.za, g); this.abs(this.za, g); }; PolarBase.prototype.abr = function (a, b) { var e_2, _a, e_3, _b; var c = new List$1(Base.$, 0); try { for (var _c = __values(fromEnum(b.c)), _d = _c.next(); !_d.done; _d = _c.next()) { var d = _d.value; if (!a.containsKey(d)) { c.add1(d); } } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_d && !_d.done && (_a = _c.return)) _a.call(_c); } finally { if (e_2) throw e_2.error; } } try { for (var _e = __values(fromEnum(c)), _f = _e.next(); !_f.done; _f = _e.next()) { var e = _f.value; b.h(e); } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_f && !_f.done && (_b = _e.return)) _b.call(_e); } finally { if (e_3) throw e_3.error; } } }; PolarBase.prototype.yx = function (a, b, c) { this.abj(); return this.y9.x.toArray(); }; PolarBase.prototype.aac = function (a) { var e_4, _a; var b = new List$1(Number_$type, 0); var c = this.dp; try { for (var _b = __values(fromEnum(this.y8.de.c)), _c = _b.next(); !_c.done; _c = _b.next()) { var d = _c.value; b.add(c.indexOf(d)); } } catch (e_4_1) { e_4 = { error: e_4_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_4) throw e_4.error; } } return b; }; PolarBase.prototype.acm = function (a) { return { $type: Point_$type, x: this.zu.item(a), y: this.zv.item(a) }; }; PolarBase.prototype.p5 = function (a) { _super.prototype.p5.call(this, a); this.bc.exportTrendlineData(this, a, this.y8.dd.g$n); }; PolarBase.prototype.getDataLegendSeriesContextAt = function (a, b) { var c = { $type: Point_$type, x: a, y: b }; var d = this.kr(c); var e = d == null ? NaN : this.iz(d, "RadiusMemberPath"); var f = d == null ? NaN : this.iz(d, "AngleMemberPath"); var g = new DataLegendSeriesValueInfo(); g.l = e; g.a = 11; g.r = this.abc != null ? this.abc : "Radius"; g.q = "Radius"; g.s = this.aa8 != null ? this.aa8 : "R:"; g.t = this.aba != null ? this.aba : ""; var h = new DataLegendSeriesValueInfo(); h.l = f; h.a = 10; h.r = this.aau != null ? this.aau : "Angle"; h.q = "Angle"; h.s = this.aaq != null ? this.aaq : "A:"; h.t = this.aas != null ? this.aas : ""; var i = new DataLegendSeriesContext(); i.e = ((function () { var $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(g); $ret.add(h); return $ret; })()); i.h = this.mh(); return i; }; PolarBase.prototype.ak = function (a, b) { var c = new List$1(ChartSelection.$, 0); this.qa(a, c, b); return c.toArray(); }; PolarBase.prototype.qa = function (a, b, c) { var _this = this; var d = this.cw.ca; var e = this.cw.b9; var f = this.getEffectiveViewport1(this.cw); var g = this.dc.xv(this.w3, this.getEffectiveViewport(), d); var h = new CollisionRect(0, this.dc.xs(a)); var i = this.y5.or(e, d, f, g); var _loop_2 = function (j) { var k = this_2.y4.getScaledAngle(this_2.zu.item(j)); var l = this_2.y5.sh(this_2.zv.item(j)); var m = this_2.y6.c(k, l, d, e, f, Math.cos); var n = this_2.y6.d(k, l, d, e, f, Math.sin); if (h.containsLocation(m, n)) { if (c == 7 || c == 6) { b.add(((function () { var $ret = new ChartSelection(); $ret.series = _this; return $ret; })())); return { value: void 0 }; } else if (c == 2 || c == 1) { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dp.item(j); return $ret; })())); } else { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dp.item(j); $ret.series = _this; return $ret; })())); } } }; var this_2 = this; for (var j = 0; j < this.dp.count; j++) { var state_1 = _loop_2(j); if (typeof state_1 === "object") return state_1.value; } }; PolarBase.prototype.bd = function () { return new PolarTrendLineManager(); }; PolarBase.$t = markType(PolarBase, 'PolarBase', MarkerSeries.$); PolarBase.abt = DependencyProperty.i("ActualTrendLineBrush", Brush.$, PolarBase.$, new PropertyMetadata(2, null, function (a, b) { return a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue); })); PolarBase.$$p = markDep(DependencyProperty, PropertyMetadata, PolarBase, 'raisePropertyChanged', ['AngleAxis:y4:abu', [NumericAngleAxis.$, null], 'AngleMemberAsLegendLabel:aaq:abv', [2, null], 'AngleMemberAsLegendUnit:aas:abw', [2, null], 'AngleMemberPath:aau:abx', [2], 'ClipSeriesToBounds:z0:aby', [0, false], 'HighlightedAngleMemberPath:aax:abz', [2, null], 'HighlightedRadiusMemberPath:aaz:ab0', [2, null], 'IsCustomPolarMarkerStyleAllowed:z2:ab1', [0, false], 'IsCustomPolarStyleAllowed:z3:ab2', [0, false], 'ItemSearchMode:zk:ab3', [ScatterItemSearchMode_$type, enumGetBox(ScatterItemSearchMode_$type, 0)], 'ItemSearchThreshold:aaj:ab4', [1, 10000], 'MaximumMarkers:aak:ab5', [1, 400], 'RadiusAxis:y5:ab6', [NumericRadiusAxis.$, null], 'RadiusMemberAsLegendLabel:aa8:ab7', [2, null], 'RadiusMemberAsLegendUnit:aba:ab8', [2, null], 'RadiusMemberPath:abc:ab9', [2], 'UseCartesianInterpolation:aaa:ach', [0, true], 'TrendLineType:zm:acf', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:aai:ace', [1, 1.5], 'TrendLinePeriod:aal:acd', [1, 7], 'TrendLineZIndex:aam:acg', [1, 1], 'TrendLineBrush:acj:aca', [Brush.$, null], 'TrendLineDashArray:ack:acb', [DoubleCollection.$], 'TrendLineDashCap:acl:acc', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]); return PolarBase; }(MarkerSeries)); export { PolarBase }; /** * @hidden */ var PolarSeriesRenderManager = /** @class */ /*@__PURE__*/ (function (_super) { __extends(PolarSeriesRenderManager, _super); function PolarSeriesRenderManager() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.aw = null; _this.ax = null; return _this; } PolarSeriesRenderManager.prototype.c = function () { this.aw = new AssigningPolarMarkerStyleEventArgs(); return this.aw; }; PolarSeriesRenderManager.prototype.a = function () { this.ax = new AssigningPolarStyleEventArgs(); return this.ax; }; PolarSeriesRenderManager.prototype.ay = function (a, b, c) { this.w(a, b, c); }; PolarSeriesRenderManager.prototype.az = function (a, b, c) { this.x(a, b, c); }; PolarSeriesRenderManager.prototype.a0 = function (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 =