UNPKG

igniteui-react-charts

Version:

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

1,448 lines 52.6 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { __extends, __values } from "tslib"; import { MarkerSeries } from "./MarkerSeries"; import { Base, runOn, delegateCombine, Number_$type, enumGetBox, Point_$type, typeCast, fromEnum, 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.y0 = null; _this.yr = null; _this.yy = null; _this.ach = null; _this.acg = null; _this.acf = null; _this.zc = null; _this.zj = null; _this.zk = null; _this.y4 = new PolarFrame(); _this.y6 = new PolarFrame(); _this.y2 = new PolarFrame(); _this.yx = null; _this.z2 = null; _this.y8 = 1; _this.zo = false; _this.zn = false; _this.zh = null; _this.zi = null; _this.assigningPolarStyle = null; _this.assigningPolarMarkerStyle = null; _this.y7 = null; _this.y5 = null; _this.y1 = null; _this.y7 = new PolarSeriesRenderManager(); _this.y9 = _this.za(); _this.y5 = new PolarFrame(); _this.y6.y = runOn(_this, _this.ace); _this.y4.y = runOn(_this, _this.ace); _this.y2.y = runOn(_this, _this.ace); _this.zc = new SeriesRenderer$2(PolarFrame.$, PolarBaseView.$, 0, runOn(_this, _this.abf), runOn(_this, _this.abj), runOn(_this, _this.d4), runOn(_this, _this.r9), runOn(_this, _this.aa8)); return _this; } PolarBase.prototype.ct = function () { return new PolarBaseView(this); }; PolarBase.prototype.q1 = function (a) { _super.prototype.q1.call(this, a); this.yz = a; }; PolarBase.prototype.o2 = function () { _super.prototype.o2.call(this); this.yv = null; this.yw = null; }; PolarBase.prototype.get_fp = function () { return true; }; PolarBase.prototype.ec = function (a, b, c, d, e) { var _this = this; if (!this.hasMarkers) { return false; } var f = this.yv; var g = new ScalerParams(1, this.dc.v5, this.wu, f.ch); g.c = this.getEffectiveViewport1(this.cw); var h = this.yw; var i = new ScalerParams(1, this.dc.v5, this.wu, h.ch); i.c = this.getEffectiveViewport1(this.cw); a.clear(); this.w8.cn(function (j) { if (j._visibility == 0) { var k = new SeriesPointOfInterest(); var l = j.n; var m = j.o; if (l < _this.wu.left || l > _this.wu.right || m < _this.wu.top || m > _this.wu.bottom) { return; } var n = void 0; var o = void 0; var p = _this.yx.f(l, m, _this.cw.b2, _this.cw.b1, _this.cw.getEffectiveViewport(), n, o); n = p.p5; o = p.p6; k.d = n; k.e = o; k.b = j.content; k.g = _this.vi; k.c = j.ak; if (_this.g9) { k.g = _this.vp(j.ak); } a.add(k); } }); return true; }; PolarBase.prototype.aa8 = function () { if (this.dd.g) { this.dd.t(); } }; PolarBase.prototype.aba = function () { this.yx.e(this.y0.x, this.zl, this.zm, this.ach, this.acg, this.acf, function (a, b) { return Math.cos(b); }, function (a, b) { return Math.sin(b); }, true); }; PolarBase.prototype.gb = function () { return this.highlightedItemsSource != null || (this.aaq != null && this.aao != null); }; PolarBase.prototype.z0 = function () { return false; }; PolarBase.prototype.ht = function () { var a = _super.prototype.ht.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.abb)); 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.abc)); a.add(c); } if (this.z0()) { 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.z0()) { 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.r2)); a.add(e); } if (!this.z0()) { 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.r2)); a.add(f); } return a; }; PolarBase.prototype.abc = function (a, b) { if (this.aaq != null) { b.value = this.aaq; return; } b.value = this.aa3; }; PolarBase.prototype.abb = function (a, b) { if (this.aao != null) { b.value = this.aao; return; } b.value = this.aal; }; Object.defineProperty(PolarBase.prototype, "zl", { get: function () { return this.zj; }, set: function (a) { if (this.zj != a) { var b = this.zl; this.zj = a; this.raisePropertyChanged("AngleColumn", b, this.zl); } }, enumerable: false, configurable: true }); Object.defineProperty(PolarBase.prototype, "zm", { get: function () { return this.zk; }, set: function (a) { if (this.zk != a) { var b = this.zm; this.zk = a; this.raisePropertyChanged("RadiusColumn", b, this.zm); } }, enumerable: false, configurable: true }); Object.defineProperty(PolarBase.prototype, "ab9", { get: function () { return this.c(PolarBase.abk); }, set: function (a) { this.h(PolarBase.abk, a); }, enumerable: false, configurable: true }); PolarBase.prototype.y3 = function () { var a = this.y2; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.y6; } return a; }; PolarBase.prototype.qb = function () { _super.prototype.qb.call(this); if (this.yw != null) { this.yw.ib(false); } if (this.yv != null) { this.yv.ib(false); } }; PolarBase.prototype.pb = function (a, b, c, d) { var e = false; this.yz.c4.g$i(a, b, c, d); if (this.yv != null && !this.yv.c1()) { e = true; } if (this.yw != null && !this.yw.c1()) { e = true; } if (e) { this.rs(true); } }; PolarBase.prototype.ss = function (a, b) { this.rs(false); }; PolarBase.prototype.st = function (a, b) { this.rs(false); }; PolarBase.prototype.he = function (a, b, c) { var d = true; if (!_super.prototype.he.call(this, a, b, c) || !c.p() || b.isEmpty || a.isEmpty || this.yv == null || this.yw == null || this.zl == null || this.zm == null || this.zl.count == 0 || this.zm.count == 0 || this.dp == null || this.dp.count != this.zl.count || this.dp.count != this.zm.count || this.yx == null || this.yv.bi == null || this.yw.bi == null || this.yv.l4 == this.yv.l3 || this.yw.l4 == this.yw.l3) { d = false; } return d; }; PolarBase.prototype.rt = function (a) { _super.prototype.rt.call(this, a); var b; var c; var d = this.getViewInfo(c, b); c = d.p0; b = d.p1; if (!this.he(c, b, this.cw)) { this.o5(true, this.cw); return; } this.ach = b; this.acg = c; this.acf = this.cw.getEffectiveViewport(); this.yy = new PolarAxisInfoCache(this.yv, this.yw, this.dp); var e = new SeriesRenderingArguments(this, c, b, a, this.gr); var f = this.zc.g(e, this.y4, this.y2, this.y6, this.yz); this.y4 = f.p1; this.y2 = f.p2; this.y6 = f.p3; }; PolarBase.prototype.ace = function (a) { var b = this.yx.h(a.x, a.y, this.ach, this.acg, this.acf, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.h); return b; }; PolarBase.prototype.ay = function (a) { if (a != null && a == this.yv && this.zl != null) { return new AxisRange(this.zl.minimum, this.zl.maximum); } if (a != null && a == this.yw && this.zm != null) { return new AxisRange(this.zm.minimum, this.zm.maximum); } return null; }; PolarBase.prototype.gd = function (a) { var b = this.cw.b2; b = b.copy(); var c = this.cw.b1; var d = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1; if (this.yv == null || this.zl == null || this.yw == null || this.zm == null) { return false; } if (d < 0 || d > this.zl.count - 1 || d > this.zm.count - 1) { return false; } var e = this.yv.getScaledAngle(this.zl.item(d)); var f = this.yw.od(this.zm.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.kn = function (a) { var b = this.j3(a); if (this.dp != null && b >= 0 && b < this.dp.count) { return this.dp.item(b); } return null; }; PolarBase.prototype.j3 = function (a) { var b = truncate(Math.round(this.ir(a))); return b; }; PolarBase.prototype.ir = function (a) { switch (this.y9) { case 1: return this.z6(a); case 3: return this.z7(a); case 2: return this.z4(a); case 4: return this.z5(a); } return -1; }; PolarBase.prototype.z5 = function (a) { return this.z8(a, false); }; PolarBase.prototype.z4 = function (a) { var b = this.v9(a); var c = b.x; var d = b.y; if (this.dp == null || this.yv == null || this.yw == null || this.zl == null || this.zm == null) { return -1; } if (this.dp.count > this.aaa) { return -1; } if (!this.zs()) { return -1; } var e = this.z2; var f = 1.7976931348623157E+308; var g = -1; for (var h = 0; h < this.zl.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.zs = function () { var a = this.y2; if (this.d4()) { a = this.y6; } if (a == null || a.x.count == 0) { return false; } this.z2 = a.x; return true; }; PolarBase.prototype.z8 = function (a, b) { if (!this.zv) { return -1; } var c = { $type: Point_$type, x: 0, y: 0 }; var d = true; var e = this.y2; if (this.d4()) { e = this.y6; } if (e == null) { return -1; } if (e.n == null) { return -1; } if (this.dp == null || this.dp.count > this.aaa) { return -1; } if (!this.zs()) { return -1; } var f = this.z2; var g = this.v9(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.z7 = function (a) { return this.z8(a, true); }; PolarBase.prototype.z6 = function (a) { var _this = this; var b = null; var c = 1.7976931348623157E+308; var d = this.v9(a); var e = d.x; var f = d.y; if (this.yz.c5.e > this.aaa) { return -1; } this.yz.c8(function (g) { if (g._visibility == 0) { var h = _this.yz.cy(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.we = function (a, b, c) { var _this = this; if (this.yv == null || this.yw == null || this.zl == null || this.zm == null) { return { $type: Point_$type, x: NaN, y: NaN }; } var d = this.cw.b2; var e = this.cw.b1; var f = this.getEffectiveViewport(); var g = new ScalerParams(0, d, e, this.yv.ch, f); var h = ((function () { var $ret = new ScalerParams(0, d, e, _this.yw.ch, f); $ret.b = _this.iy(); return $ret; })()); if (b) { var i = this.ir(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.yx.h(this.zl.item(j), this.zm.item(j), d, e, f, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.h); } var l = i - Math.floor(i); var m = this.yx.h(this.zl.item(j), this.zm.item(j), d, e, f, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.h); var n = this.yx.h(this.zl.item(k), this.zm.item(k), d, e, f, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.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.j3(a); if (u == -1) { return { $type: Point_$type, x: NaN, y: NaN }; } return this.yx.h(this.zl.item(u), this.zm.item(u), d, e, f, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.h); } }; PolarBase.prototype.ai = function () { return [this.yv, this.yw]; }; PolarBase.prototype.kq = function (a, b) { var c = this.nd(b); if (c == PolarBase.$$p[3]) { return this.kr(a, b, this.aal); } if (c == PolarBase.$$p[15]) { return this.kr(a, b, this.aa3); } if (c == PolarBase.$$p[5]) { return this.kr(a, b, this.aao); } if (c == PolarBase.$$p[6]) { return this.kr(a, b, this.aaq); } return _super.prototype.kq.call(this, a, b); }; PolarBase.prototype.md = function (a) { var b = this.nd(a); if (b == PolarBase.$$p[3]) { return this.aal; } if (b == PolarBase.$$p[15]) { return this.aa3; } if (b == PolarBase.$$p[5]) { return this.aao; } if (b == PolarBase.$$p[6]) { return this.aaq; } return _super.prototype.md.call(this, a); }; PolarBase.prototype.ra = function (a, b, c, d) { _super.prototype.ra.call(this, a, b, c, d); if (this.yz.c4.g$e(a, b, c, d)) { this.rs(false); this.ql(); } switch (b) { case PolarBase.$$p[1]: case PolarBase.$$p[2]: case PolarBase.$$p[13]: case PolarBase.$$p[14]: this.qf(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.zl); c.deregisterColumn(this.zm); this.zl = null; this.zm = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.zl = this.dl(this.aal); this.zm = this.dl(this.aa3); } if ((this.yw != null && !this.yw.c1()) || (this.yv != null && !this.yv.c1())) { this.rs(this.gg && c != null); } break; case PolarBase.$$p[0]: if (this.yv != null && this.yw != null) { this.yx = new PolarAxes(this.yw, this.yv); } if (c != null) { c.b0(this); } if (d != null) { d.ct(this); } if (this.yv != null && !this.yv.c1()) { this.rs(false); } else if (c != null && d == null) { this.o5(true, this.cw); } break; case PolarBase.$$p[12]: if (this.yv != null && this.yw != null) { this.yx = new PolarAxes(this.yw, this.yv); } if (c != null) { c.b0(this); } if (d != null) { d.ct(this); } if (this.yw != null && !this.yw.c1()) { this.rs(false); } else if (c != null && d == null) { this.o5(true, this.cw); } if (this.yv != null && !this.yv.c1()) { this.yv.h7(); } break; case PolarBase.$$p[3]: if (this.dp != null) { this.dp.deregisterColumn(this.zl); this.zl = this.dl(this.aal); } break; case "AngleColumn": this.yz.c4.g$m(); if (this.yv != null && !this.yv.c1()) { this.rs(this.gg && this.d8); } break; case PolarBase.$$p[15]: if (this.dp != null) { this.dp.deregisterColumn(this.zm); this.zm = this.dl(this.aa3); } break; case "RadiusColumn": this.yz.c4.g$m(); if (this.yw != null && !this.yw.c1()) { this.rs(this.gg && this.d8); } break; case PolarBase.$$p[16]: this.rs(false); this.ql(); break; case PolarBase.$$p[11]: this.rs(false); this.ql(); break; case "TransitionProgress": this.yy = new PolarAxisInfoCache(this.yv, this.yw, this.dp); this.ach = this.cw.b2; this.acg = this.cw.b1; this.acf = this.cw.getEffectiveViewport(); this.y6.w = this.z1; this.y6.c(this.jq, this.y4, this.y2); if (this.d6(this.cw)) { return; } if (this.jq == 1) { this.abj(this.y2, this.yz); this.qo(); } else { this.abj(this.y6, this.yz); } if (this.dc != null) { this.dc.qp(this); } break; case "TrendLineBrush": this.rg(b); break; case PolarBase.$$p[4]: this.rs(false); this.ql(); break; case "TrendLineType": this.ql(); break; case PolarBase.$$p[8]: this.zo = this.zx(); this.rs(false); break; case PolarBase.$$p[7]: this.zn = this.zw(); this.rs(false); break; case PolarBase.$$p[9]: this.y9 = this.za(); break; } }; Object.defineProperty(PolarBase.prototype, "y9", { get: function () { return this.y8; }, set: function (a) { var b = this.y8; this.y8 = a; if (b != this.y8) { this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.y8)); } }, enumerable: false, configurable: true }); PolarBase.prototype.za = function () { if (this.zb != 0) { return this.zb; } return this.zv ? 4 : 1; }; PolarBase.prototype.get_zv = function () { return false; }; Object.defineProperty(PolarBase.prototype, "zv", { get: function () { return this.get_zv(); }, enumerable: false, configurable: true }); PolarBase.prototype.zx = function () { return this.zu; }; PolarBase.prototype.zw = function () { return this.zt; }; PolarBase.prototype.zq = function (a) { if (typeCast(NumericRadiusAxis.$, a) !== null) { return true; } return false; }; PolarBase.prototype.zp = function (a) { if (typeCast(NumericAngleAxis.$, a) !== null) { return true; } return false; }; PolarBase.prototype.o5 = function (a, b) { _super.prototype.o5.call(this, a, b); var c = b; if (a) { c.c5.clear(); } c.c4.g$h(); }; PolarBase.prototype.ys = 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.aa7 = 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.zl.item(f), y: this_1.zm.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.abf = function (a, b) { var _this = this; var c = b.b2; var d = b.b1; var e = b.getEffectiveViewport(); a.j.clear(); a.o.clear(); var f = Math.min(this.zl != null ? this.zl.count : 0, this.zm != null ? this.zm.count : 0); if (f < 1) { return; } this.yy = new PolarAxisInfoCache(this.yv, this.yw, this.dp); this.y0 = a; this.acg = d; this.ach = c; this.acf = b.getEffectiveViewport(); b.c2.l(a.j, this.aab, c, d, this.id); if (f <= this.aab) { this.aa7(a, f, c, d); } var g = this.ys(d, a.o); var h = Math.min(this.yv.l4, this.yv.l3); var i = Math.max(this.yv.l3, this.yv.l4); b.c4.k = this.z1; b.c4.j = 0; b.c4.m = this.yw.n7; b.c4.l = this.yw.n6; b.c4.n = function (j, k) { return _this.yx.c(j, k, c, d, e, Math.cos); }; b.c4.o = function (j, k) { return _this.yx.d(j, k, c, d, e, Math.sin); }; var j = new List$1(Number_$type, 0); for (var k = 0; k < this.zl.count; k++) { if (this.zl.item(k) >= h && this.zl.item(k) <= i) { j.add(this.zl.item(k)); } } var l = this.zm; if (j.count != this.zl.count) { l = new List$1(Number_$type, 0); for (var m = 0; m < this.zl.count; m++) { if (this.zl.item(m) >= h && this.zl.item(m) <= i) { l.add(this.zm.item(m)); } } } b.c4.p(a.o, this.zd, j, l, this.aac, runOn(this.yv, this.yv.getScaledAngle), runOn(this.yw, this.yw.od), ((function () { var $ret = new TrendResolutionParams(); $ret.d = _this.id; $ret.i = d; $ret.h = e; $ret.j = c; return $ret; })()), g, h, i); if (b.w.count > 0) { a.m.clear(); for (var n = 0; n < b.w.count; n++) { a.m.add(new List$1(Point_$type, 0)); var o = b.w._inner[n]; o.k = this.z1; o.j = 0; o.m = this.yw.n7; o.l = this.yw.n6; o.n = function (p, q) { return _this.yx.c(p, q, c, d, e, Math.cos); }; o.o = function (p, q) { return _this.yx.d(p, q, c, d, e, Math.sin); }; o.p(a.m._inner[n], o.g$b, j, l, o.g$f, runOn(this.yv, this.yv.getScaledAngle), runOn(this.yw, this.yw.od), ((function () { var $ret = new TrendResolutionParams(); $ret.d = _this.id; $ret.i = d; $ret.h = e; $ret.j = c; return $ret; })()), g, h, i); } } }; PolarBase.prototype.get_fe = function () { return true; }; PolarBase.prototype.zf = function (a, b, c) { return null; }; PolarBase.prototype.zg = function (a, b, c) { if (this.dp == null) { return null; } var d = this.y3(); var e = this.yz.b5(this.v9(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.ze = 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.ee && this.fz(this.by) && !c) { var d = this.zf(a, b, this.zh); this.zh = d; return d; } else { var e = this.ze(a, b, this.zh); this.zh = e; return e; } }; PolarBase.prototype.di = function (a, b, c) { if (this.fz(this.by) && !c) { var d = this.zg(a, b, this.zi); this.zi = d; return d; } else { var e = this.ze(a, b, this.zi); e.d = true; this.zi = e; return e; } }; PolarBase.prototype.zz = function () { return (this.assigningPolarStyle != null && this.zo) || (this.by != 1) || this.d3 || (this.cq != 1) || (this.cp != 1); }; PolarBase.prototype.zy = function () { return (this.assigningPolarMarkerStyle != null && this.zn) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); }; PolarBase.prototype.abj = function (a, b) { this.qx(); var c = b.b2; var d = b.b1; var e = this.getEffectiveViewport1(b); var f = this.wl(b); this.yy = new PolarAxisInfoCache(this.yv, this.yw, this.dp); if (this.xi()) { b.c2.j(a.j, this.xk); if (this.zy()) { this.aa9(b, a); } } b.cv(); var g = this.ys(d, b.c4.g$n.an); b.c4.g$l(a.o, g); if (b.w.count > 0) { for (var h = 0; h < b.w.count; h++) { var i = b.w._inner[h]; i.g$l(a.m._inner[h], g); } } this.aa6(d, c, e, f, b); }; PolarBase.prototype.yp = function (a, b) { return this.yq(a, b); }; PolarBase.prototype.yq = function (a, b) { if (b < a || a < 0 || a > this.zl.count || b < 0 || b > this.zl.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.aa9 = function (a, b) { var _this = this; a.cb = true; this.y7.ay(this, this.zy(), runOn(this, this.yp)); var c = this.y7.d; var d = c != null; var e = this.getEffectiveViewport1(a); var f = this.dp == null ? 0 : this.dp.count; this.yz.cn(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.abd(h, f, a.r); } _this.y7.ac(g, i); } }); }; PolarBase.prototype.abe = function (a, b, c) { var d = this.by != 1; var e = this.cq != 1; var f = this.cp != 1; this.y7.a0(this.y7.b, a, b, false); this.y7.ab(this.ib); var g = this.y7.ax; var h = null; var i = null; var j = null; var k = this.dp; if (d && this.dc != null) { h = this.dc.dk.getHighlightingInfo(this, k, g.z, g.y, false); g.c = h; } if (e && this.dc != null) { i = this.dc.dl.getHighlightingInfo(this, k, g.z, g.y, false); if (i == null && this.bo != null) { i = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, false); } g.d = i; } if (f && this.dc != null) { j = this.dc.dj.getHighlightingInfo(this, k, g.z, g.y, false); g.b = j; } g.h = c; this.abh(g); this.y7.z(this, h, i, j, c, d, e, f, a < 0); }; PolarBase.prototype.abd = function (a, b, c) { var d = this.by != 1; var e = this.cq != 1; var f = this.cp != 1; this.y7.a0(this.y7.d, a, b, true); this.y7.aa(this.ib); var g = this.y7.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.dk.getHighlightingInfo(this, k, g.z, g.y, true); if (this.dc.dk.isCrossContextHighlight(this)) { l = this.dc.dk.getHighlightingInfo(this, k, g.z, g.y, true); } g.c = h; } if (e && this.dc != null) { i = this.dc.dl.getHighlightingInfo(this, k, g.z, g.y, true); if (i == null && this.bo != null) { i = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true); } if (this.dc.dl.isCrossContextHighlight(this)) { m = this.dc.dl.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } if (f && this.dc != null) { j = this.dc.dj.getHighlightingInfo(this, k, g.z, g.y, true); if (this.dc.dj.isCrossContextHighlight(this)) { n = this.dc.dj.getHighlightingInfo(this, k, g.z, g.y, true); } g.d = i; } g.h = c; this.abg(g); this.y7.y(this, h, i, j, c, d, e, f, g.v, this.dc.dk.totalHighWaterMark, g.x, this.dc.dl.totalHighWaterMark, g.t, this.dc.dj.totalHighWaterMark); }; PolarBase.prototype.abh = function (a) { if (this.assigningPolarStyle != null && this.zo) { this.assigningPolarStyle(this, a); } }; PolarBase.prototype.abg = function (a) { if (this.assigningPolarMarkerStyle != null && this.zn) { this.assigningPolarMarkerStyle(this, a); } }; PolarBase.prototype.aa6 = function (a, b, c, d, e) { e.c7(a, b, c, d); }; PolarBase.prototype.sj = function () { _super.prototype.sj.call(this); if (this.index < 0) { return; } this.yz.da(); }; PolarBase.prototype.ru = function (a, b) { _super.prototype.ru.call(this, a, b); if (!this.g0) { this.cw.a7(b); return; } this.cw.a7(b); if (this.d6(this.cv)) { return; } this.rv(); this.g0 = false; }; PolarBase.prototype.rv = function () { _super.prototype.rv.call(this); var a = this.cv; if (!this.gs) { this.y5 = new PolarFrame(); this.abf(this.y5, a); } this.gs = false; this.abj(this.y5, a); }; PolarBase.prototype.rr = function (a, b, c, d, e) { _super.prototype.rr.call(this, a, b, c, d, e); var f = this.ba.a$j.item(d); var g = f; f.a6(c); if (this.d6(g)) { return; } if (this.y1 == null) { this.y1 = new PolarFrame(); } this.abf(this.y1, g); this.abj(this.y1, g); }; PolarBase.prototype.abi = function (a, b) { var e_1, _a, e_2, _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_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_d && !_d.done && (_a = _c.return)) _a.call(_c); } finally { if (e_1) throw e_1.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_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_f && !_f.done && (_b = _e.return)) _b.call(_e); } finally { if (e_2) throw e_2.error; } } }; PolarBase.prototype.yo = function (a, b, c) { this.aba(); return this.y0.x.toArray(); }; PolarBase.prototype.z3 = function (a) { var e_3, _a; var b = new List$1(Number_$type, 0); var c = this.dp; try { for (var _b = __values(fromEnum(this.yz.c5.c)), _c = _b.next(); !_c.done; _c = _b.next()) { var d = _c.value; b.add(c.indexOf(d)); } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_3) throw e_3.error; } } return b; }; PolarBase.prototype.acd = function (a) { return { $type: Point_$type, x: this.zl.item(a), y: this.zm.item(a) }; }; PolarBase.prototype.pz = function (a) { _super.prototype.pz.call(this, a); this.bc.exportTrendlineData(this, a, this.yz.c4.g$n); }; PolarBase.prototype.getDataLegendSeriesContextAt = function (a, b) { var c = { $type: Point_$type, x: a, y: b }; var d = this.kn(c); var e = d == null ? NaN : this.ix(d, "RadiusMemberPath"); var f = d == null ? NaN : this.ix(d, "AngleMemberPath"); var g = new DataLegendSeriesValueInfo(); g.l = e; g.a = 11; g.r = this.aa3 != null ? this.aa3 : "Radius"; g.q = "Radius"; g.s = this.aaz != null ? this.aaz : "R:"; g.t = this.aa1 != null ? this.aa1 : ""; var h = new DataLegendSeriesValueInfo(); h.l = f; h.a = 10; h.r = this.aal != null ? this.aal : "Angle"; h.q = "Angle"; h.s = this.aah != null ? this.aah : "A:"; h.t = this.aaj != null ? this.aaj : ""; 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.mc(); return i; }; PolarBase.prototype.ak = function (a, b) { var c = new List$1(ChartSelection.$, 0); this.p4(a, c, b); return c.toArray(); }; PolarBase.prototype.p4 = function (a, b, c) { var _this = this; var d = this.cw.b2; var e = this.cw.b1; var f = this.getEffectiveViewport1(this.cw); var g = this.dc.wd(this.wu, this.getEffectiveViewport(), d); var h = new CollisionRect(0, this.dc.wa(a)); var i = this.yw.k5(e, d, f, g); var _loop_2 = function (j) { var k = this_2.yv.getScaledAngle(this_2.zl.item(j)); var l = this_2.yw.od(this_2.zm.item(j)); var m = this_2.yx.c(k, l, d, e, f, Math.cos); var n = this_2.yx.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.abk = 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:yv:abl', [NumericAngleAxis.$, null], 'AngleMemberAsLegendLabel:aah:abm', [2, null], 'AngleMemberAsLegendUnit:aaj:abn', [2, null], 'AngleMemberPath:aal:abo', [2], 'ClipSeriesToBounds:zr:abp', [0, false], 'HighlightedAngleMemberPath:aao:abq', [2, null], 'HighlightedRadiusMemberPath:aaq:abr', [2, null], 'IsCustomPolarMarkerStyleAllowed:zt:abs', [0, false], 'IsCustomPolarStyleAllowed:zu:abt', [0, false], 'ItemSearchMode:zb:abu', [ScatterItemSearchMode_$type, enumGetBox(ScatterItemSearchMode_$type, 0)], 'ItemSearchThreshold:aaa:abv', [1, 10000], 'MaximumMarkers:aab:abw', [1, 400], 'RadiusAxis:yw:abx', [NumericRadiusAxis.$, null], 'RadiusMemberAsLegendLabel:aaz:aby', [2, null], 'RadiusMemberAsLegendUnit:aa1:abz', [2, null], 'RadiusMemberPath:aa3:ab0', [2], 'UseCartesianInterpolation:z1:ab8', [0, true], 'TrendLineType:zd:ab6', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:z9:ab5', [1, 1.5], 'TrendLinePeriod:aac:ab4', [1, 7], 'TrendLineZIndex:aad:ab7', [1, 1], 'TrendLineBrush:aca:ab1', [Brush.$, null], 'TrendLineDashArray:acb:ab2', [DoubleCollection.$], 'TrendLineDashCap:acc:ab3', [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 = b; } } }; PolarSeriesRenderManager.$t = markType(PolarSeriesRenderManager, 'PolarSeriesRenderManager', SeriesRenderManager.$); return PolarSeriesRenderManager; }(SeriesRenderManager)); export { PolarSeriesRenderManager }; /** * @hidden */ var PolarBaseView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(PolarBaseView, _super); function PolarBaseView(a) { var _this = _super.call(this, a) || this; _this.c3 = null; _this.c2 = null; _this.c4 = null; _this.c5 = null; _this.c3 = a; _this.c5 = new HashPool$2(Base.$, Marker.$); _this.cq(_this.c5); _this.c4 = new PolarTrendLineM