UNPKG

igniteui-react-charts

Version:

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

1,346 lines (1,345 loc) 44.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 { __extends, __values } from "tslib"; import { Base, markType, Point_$type, enumGetBox, EnumUtil, Array_$type, runOn, delegateCombine, typeCast, fromEnum, markDep } from "igniteui-react-core"; import { IBucketizer_$type } from "./IBucketizer"; import { NotImplementedException } from "igniteui-react-core"; import { CategoryAngleAxis } from "./CategoryAngleAxis"; import { NumericRadiusAxis } from "./NumericRadiusAxis"; import { truncate, intDivide, isNaN_ } from "igniteui-react-core"; import { MarkerSeries } from "./MarkerSeries"; import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference"; import { DependencyProperty } from "igniteui-react-core"; import { RadialLabelMode_$type } from "igniteui-react-core"; import { CategoryCollisionMode_$type } from "./CategoryCollisionMode"; import { Brush } from "igniteui-react-core"; import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode"; import { HighlightingInfo } from "igniteui-react-core"; import { BindingFormatter } from "igniteui-react-core"; import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer"; import { RadialFrame } from "./RadialFrame"; import { RadialSeriesRenderManager } from "./RadialSeriesRenderManager"; import { RadialAxes } from "./RadialAxes"; import { CoreGeometryUtil } from "igniteui-react-core"; import { PolygonUtil } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { SeriesPointOfInterest } from "./SeriesPointOfInterest"; import { ScalerParams } from "./ScalerParams"; import { Marker } from "./Marker"; import { MarkerSeriesView } from "./MarkerSeriesView"; import { ProportionalRadialLabelContext } from "./ProportionalRadialLabelContext"; import { MathUtil } from "igniteui-react-core"; import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay"; import { DoubleCollection } from "igniteui-react-core"; import { Visibility_$type } from "igniteui-react-core"; import { ChartSelection } from "./ChartSelection"; import { PropertyMetadata } from "igniteui-react-core"; import { boxArray$1 } from "igniteui-react-core"; import { round10N } from "igniteui-react-core"; import { Pool$1 } from "igniteui-react-core"; /** * @hidden */ var RadialBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(RadialBucketCalculator, _super); function RadialBucketCalculator(a) { var _this = _super.call(this) || this; _this.a = null; _this.c = 0; _this.d = 0; _this.b = 0; _this.a = a; return _this; } RadialBucketCalculator.prototype.getBucket = function (a) { throw new NotImplementedException(0); }; RadialBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) { return this.getBucket(a); }; RadialBucketCalculator.prototype.getErrorBucket = function (a, b) { return NaN; }; RadialBucketCalculator.prototype.getBucketInfo = function (a, b, c, d) { a = this.c; b = this.d; c = this.b; d = this.a.c9.il; return { p0: a, p1: b, p2: c, p3: d }; }; RadialBucketCalculator.prototype.e = function (a) { var b = this.a.ca; var c = this.a.b9; var d = this.a.getEffectiveViewport(); var e = this.a.c9.zl; if (b.isEmpty || c.isEmpty || e == null || this.a.c9.dp == null || this.a.c9.dp.count == 0) { this.b = 0; return; } var f = Math.floor(e.r6(c, d, b)); var g = Math.ceil(e.r5(c, d, b)); if (e.dn) { g = Math.ceil(e.r6(c, d, b)); f = Math.floor(e.r5(c, d, b)); } if (g < f) { g = e.qc + g; } var h = this.a.c9.zr; var i = h != null ? h.ti : 0.75; var j = Math.min(c.width, c.height) * 0.5 * (i) * 2 * Math.PI; var k = Math.floor((g - f + 1) * a / j); this.b = truncate(Math.max(1, k)); this.c = truncate(Math.max(0, Math.floor(f / this.b) - 1)); this.d = truncate(Math.ceil(g / this.b)); if (e.ds) { this.b = 1; this.c = truncate(Math.max(0, Math.floor(f / this.b) - 1)); this.d = truncate(Math.ceil(g / this.b)); } }; RadialBucketCalculator.prototype.cacheValues = function () { }; RadialBucketCalculator.prototype.unCacheValues = function () { }; RadialBucketCalculator.$t = markType(RadialBucketCalculator, 'RadialBucketCalculator', Base.$, [IBucketizer_$type]); return RadialBucketCalculator; }(Base)); export { RadialBucketCalculator }; /** * @hidden */ var RadialBase = /** @class */ /*@__PURE__*/ (function (_super) { __extends(RadialBase, _super); function RadialBase() { var _this = _super.call(this) || this; _this.z0 = null; _this.z7 = false; _this.z6 = false; _this.z4 = null; _this.z5 = null; _this.assigningRadialStyle = null; _this.assigningRadialMarkerStyle = null; _this.ze = null; _this.zi = null; _this.zf = null; _this.zh = null; _this.zg = null; _this.zw = new RadialFrame(4); _this.zx = new RadialFrame(4); _this.zu = new RadialFrame(4); _this.zs = null; _this.zq = null; _this.zq = new CategoryTransitionSourceFramePreparer(); _this.z0 = new RadialSeriesRenderManager(); return _this; } RadialBase.prototype.ri = function (a) { _super.prototype.ri.call(this, a); this.zt = a; }; RadialBase.prototype.abv = function () { if (this.dd.g) { this.dd.t(); } }; Object.defineProperty(RadialBase.prototype, "categoryAxis", { get: function () { return this.zl; }, enumerable: false, configurable: true }); RadialBase.prototype.a0 = function () { return this.zl; }; RadialBase.prototype.b3 = function () { if (this.b4 == 0) { return 1; } else { return _super.prototype.b3.call(this); } }; RadialBase.prototype.aaj = function (a, b, c) { var d = this.cw.ca; var e = this.cw.b9; var f = this.cw.getEffectiveViewport(); var g = this.al(a); var h = this.zs.d(0, this.zr.tr, d, e, f); var i = this.zs.e(0, this.zr.tr, d, e, f); if (g == null) { return false; } for (var j = 0; j < g.length; j++) { var k = g[j]; if (k == null) { continue; } if (k.length != 2) { if (CoreGeometryUtil.l(a, k[0], boxArray$1(k), this.im / 2 + this.i2(c))) { return true; } if (CoreGeometryUtil.i(a, { $type: Point_$type, x: h, y: i }, k[0], this.im / 2 + this.i2(c))) { return true; } if (CoreGeometryUtil.i(a, k[k.length - 1], { $type: Point_$type, x: h, y: i }, this.im / 2 + this.i2(c))) { return true; } var l = new Array(k.length + 2); for (var m = 0; m < k.length; m++) { l[m] = k[m]; } l[l.length - 2] = { $type: Point_$type, x: h, y: i }; l[l.length - 1] = k[0]; if (PolygonUtil.b(boxArray$1(l), a)) { return true; } } else { if (CoreGeometryUtil.i(a, k[0], k[1], this.im / 2 + this.i2(c))) { return true; } if (CoreGeometryUtil.i(a, { $type: Point_$type, x: h, y: i }, k[0], this.im / 2 + this.i2(c))) { return true; } if (CoreGeometryUtil.i(a, k[1], { $type: Point_$type, x: h, y: i }, this.im / 2 + this.i2(c))) { return true; } var n = new Array(4); n[0] = k[0]; n[1] = k[1]; n[2] = { $type: Point_$type, x: h, y: i }; n[3] = k[0]; if (PolygonUtil.b(boxArray$1(n), a)) { return true; } } } return false; }; RadialBase.prototype.aj = function (a) { var b = this.zv(); var c = this.cw.ca; var d = this.cw.b9; var e = this.cw.getEffectiveViewport(); var f = this.an(this.a0(), b.k, this.aar(this.cw), this.aas(this.cw), this.w3(a), true); if (f == null) { return null; } var g = f[0]; var h = f[1]; var i = this.zs.d(g[0], g[2], c, d, e); var j = this.zs.e(g[0], g[2], c, d, e); var k = this.zs.d(h[0], h[2], c, d, e); var l = this.zs.e(h[0], h[2], c, d, e); var m = new Array(1); var n = new Array(2); n[0] = { $type: Point_$type, x: i, y: j }; n[1] = { $type: Point_$type, x: k, y: l }; m[0] = n; return m; }; RadialBase.prototype.al = function (a) { var b = this.zv(); var c = this.cw.ca; var d = this.cw.b9; var e = this.cw.getEffectiveViewport(); var f = this.an(this.a0(), b.k, this.aar(this.cw), this.aas(this.cw), this.w3(a), true); if (f == null) { return null; } var g = f[0]; var h = f[1]; var i = new Array(1); var j = new Array(2); var k = this.zs.d(g[0], g[1], c, d, e); var l = this.zs.e(g[0], g[1], c, d, e); var m = this.zs.d(h[0], h[1], c, d, e); var n = this.zs.e(h[0], h[1], c, d, e); j[0] = { $type: Point_$type, x: k, y: l }; j[1] = { $type: Point_$type, x: m, y: n }; i[0] = j; return i; }; RadialBase.prototype.g3 = function (a, b) { if (this.g2(a, b)) { return true; } if (this.x3(a, b)) { return true; } return false; }; RadialBase.prototype.y9 = function (a, b) { return null; }; RadialBase.prototype.w2 = function (a) { var b = this.zl; var c = this.zr; if (b == null || c == null || this.dc == null) { return { $type: Point_$type, x: NaN, y: NaN }; } var d = NaN; var e = NaN; var f = this.zs.h(a.x, a.y, this.dc.ys, this.dc.za, this.getEffectiveViewport(), d, e); d = f.p5; e = f.p6; return { $type: Point_$type, x: d, y: e }; }; RadialBase.prototype.p7 = function (a) { if (this.zl != null && this.zl.ds && this.zl.tb(a)) { if (this.fl) { this.ba.a$y(this, a, this.zl.qd - 1); } return; } _super.prototype.p7.call(this, a); }; RadialBase.prototype.eg = function (a) { if (this.zl != null && this.zl.ds && this.zl.hasOthersCategory) { if (this.zl.tb(a)) { return true; } } return _super.prototype.eg.call(this, a); }; RadialBase.prototype.p5 = function (a) { if (this.zl != null && this.zl.ds && this.zl.tb(a)) { if (this.fl) { this.ba.a$ao(this, a, this.dp.count - 1); } return; } _super.prototype.p5.call(this, a); }; RadialBase.prototype.ed = function (a, b, c, d, e) { var _this = this; if (!this.hasMarkers) { return false; } var f = this.zl; var g = new ScalerParams(1, this.dc.ys, this.xe, f.dn); g.c = this.getEffectiveViewport1(this.cw); var h = this.zr; var i = new ScalerParams(1, this.dc.ys, this.xe, h.dn); i.c = this.getEffectiveViewport1(this.cw); var j = this.aaq; a.clear(); this.xs.cw(function (k) { if (k._visibility == 0) { var l = new SeriesPointOfInterest(); var m = k.n; var n = k.o; if (!e && (m < _this.xe.left || m > _this.xe.right || n < _this.xe.top || n > _this.xe.bottom)) { return; } var o = null; if (k.content != null) { o = k.content.item; } var p = void 0; var q = void 0; var r = _this.zs.h(m, n, _this.cw.ca, _this.cw.b9, _this.cw.getEffectiveViewport(), p, q); p = r.p5; q = r.p6; l.d = p; l.e = q; var s = l.e; var t = k.ak; l.f = _this.abs(s, o, t, d, j, c, b, false); l.b = k.content; l.g = _this.v1; l.c = k.ak; if (_this.hg) { l.g = _this.v8(k.ak); } l.a = _this.ar(k.ak, k.al); a.add(l); } }); return true; }; RadialBase.prototype.k2 = function (a, b) { var c = null; if (this.dp != null) { if (a >= 0 && a < this.dp.count) { c = this.dp.item(a); } if (this.zl != null && this.zl.ds && a == this.zl.othersIndex) { c = this.zl.to(false); } } var d = NaN; if (c != null) { d = this.jl(c); } var e = this.abs(d, c, a, this.aap >= 0 ? this.aap : 5, this.aaq, false, false, b); if (e != null) { return e; } return _super.prototype.k2.call(this, a, b); }; RadialBase.prototype.abs = function (a, b, c, d, e, f, g, h) { var i = null; var j = this.zl.ds && this.zl.tb(b); var k = this.zy; if (h) { k = this.zz; } if (k == 0) { if (h) { k = 5; } else { k = 6; } } if ((h && ((this.zf != null) || (j && this.zg != null))) || (!h && ((this.zi != null) || (j && this.zh != null)))) { var l_1 = this.aam(a, b, c, d, f); var m_1 = this.aan(a, b, c, e, f); var n_1 = this.aa7(c); var o = ((function () { var $ret = new ProportionalRadialLabelContext(); $ret.value = l_1; $ret.percent = m_1; $ret.label = n_1; $ret.item = b; return $ret; })()); var p = null; if (j) { if (h) { p = this.zg; } else { p = this.zh; } if (p == null) { if (h) { p = this.zf; } else { p = this.zi; } } } else { if (h) { p = this.zf; } else { p = this.zi; } } i = p.i(o); } else if (k != 1) { switch (k) { case 2: i = this.aa8(a, b, c, d, f); break; case 3: i = this.aa9(a, b, c, e, f); break; case 4: { var q = this.aa8(a, b, c, d, f); var r = this.aa9(a, b, c, e, f); i = q + this.aay + r; } break; case 5: i = this.aa7(c); break; case 6: { var s = this.aa8(a, b, c, d, f); var t = this.aa7(c); i = t + this.aay + s; } break; case 7: { var u = this.aa9(a, b, c, e, f); var v = this.aa7(c); i = v + this.aay + u; } break; case 8: { var w = this.aa8(a, b, c, d, f); var x = this.aa9(a, b, c, e, f); var y = this.aa7(c); i = y + this.aay + w + this.aay + x; } break; } } else { if (g) { i = this.aa8(a, b, c, d, f); } else { i = this.aa7(c); } } return i; }; RadialBase.prototype.aa7 = function (a) { var b = this.zl; var c = this.au(true); if (this.zl != null && this.zl.ds && this.zl.hasOthersCategory && a == this.zl.othersIndex) { if (this.ze != null) { c = this.ze; } } if (c != null) { var d = _super.prototype.k2.call(this, a, false); if (d != null) { return c.i(d); } else { return null; } } else { return b.ja(a); } }; RadialBase.prototype.aa8 = function (a, b, c, d, e) { var f = a; f = this.aau(c, f); if (e) { return this.aaw(f, d); } else { a = this.jl(b); if (!isNaN_(a)) { return this.aaw(a, d); } else { return this.aaw(f, d); } } }; RadialBase.prototype.aam = function (a, b, c, d, e) { var f = a; f = this.aau(c, f); if (e) { return f; } else { a = this.jl(b); if (!isNaN_(a)) { return a; } else { return f; } } }; RadialBase.prototype.aa9 = function (a, b, c, d, e) { if (this.zl == null || !this.zl.ds) { return this.aa8(a, b, c, d, e); } var f = this.zl.ti(c); if (e) { return this.aaw(f, d) + "%"; } else { a = this.zl.ti(c); if (!isNaN_(a)) { return this.aaw(a, d) + "%"; } else { return this.aaw(f, d) + "%"; } } }; RadialBase.prototype.aan = function (a, b, c, d, e) { if (this.zl == null || !this.zl.ds) { return this.aam(a, b, c, d, e); } var f = this.zl.ti(c); if (e) { return f; } else { a = this.zl.ti(c); if (!isNaN_(a)) { return a; } else { return f; } } }; RadialBase.prototype.aau = function (a, b) { return b; }; RadialBase.prototype.aaw = function (a, b) { var c; if (b >= 0) { c = round10N(a, b); } else { c = a; } var d = this.au(false); if (d != null) { var e = d; return e.i(c); } else { return MathUtil.t(c); } }; RadialBase.prototype.get_fx = function () { return true; }; RadialBase.prototype.get_fh = function () { return true; }; RadialBase.prototype.z1 = 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; }; RadialBase.prototype.aai = function () { return false; }; RadialBase.prototype.h0 = function () { var a = _super.prototype.h0.call(this); if (this.aai()) { var b = ((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(b); } if (!this.aai()) { var c = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "Brush"; $ret.p = true; $ret.y = "ActualBrush"; $ret.q = true; return $ret; })()); c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.sj)); a.add(c); } if (!this.aai()) { var d = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "Outline"; $ret.p = true; $ret.y = "ActualOutline"; $ret.q = true; return $ret; })()); d.valueResolving = delegateCombine(d.valueResolving, runOn(this, this.sj)); a.add(d); } var e = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.p = true; $ret.ad = "IsTransitionInEnabled"; $ret.x = true; $ret.q = true; return $ret; })()); a.add(e); var f = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.p = true; $ret.ad = "TransitionInMode"; $ret.x = enumGetBox(CategoryTransitionInMode_$type, 20); $ret.q = true; return $ret; })()); a.add(f); return a; }; RadialBase.prototype.k5 = function () { if (this.d4()) { return this.bo.zx; } else { return this.bo.zu; } }; RadialBase.prototype.z2 = function (a, b, c) { if (this.dp == null) { return null; } var d = this.zt.da.c; var e = this.zt.da.d; var f = this.zt.da.b; if (f == 0) { return null; } var g = this.zv(); var h = this.dp.count; var i = this.zl; var j = -1; var k = -1; var l = this.kd(b); if (isNaN_(b.x) || isNaN_(b.y)) { if (a != null && this.dp != null) { if (this.zl.ds && this.zl.tb(a)) { l = this.zl.othersIndex; } else { l = this.dp.indexOf(a); } } } j = truncate(Math.floor((intDivide(l, f)))) * f; k = j + (f - 1); if (c != null && c.g == j && c.f == k) { return c; } var m = new HighlightingInfo(); m.i = this; m.g = j; m.f = k; return m; }; RadialBase.prototype.z3 = function (a, b, c) { if (this.dp == null) { return null; } var d = this.zt.da.c; var e = this.zt.da.d; var f = this.zt.da.b; if (f == 0) { return null; } var g = this.zv(); var h = this.dp.count; var i = this.zl; var j = -1; var k = -1; var l = this.kd(b); if (isNaN_(b.x) || isNaN_(b.y)) { if (a != null && this.dp != null) { if (this.zl.ds && this.zl.tb(a)) { l = this.zl.othersIndex; } else { l = this.dp.indexOf(a); } } } j = truncate(Math.floor((intDivide(l, f)))) * f; k = j + (f - 1); if (c != null && c.g == j && c.f == k) { return c; } var m = new HighlightingInfo(); m.d = true; m.i = this; m.g = j; m.f = k; return m; }; RadialBase.prototype.dh = function (a, b, c) { if (this.ef && this.f3(this.by) && !c) { var d = this.z2(a, b, this.z4); this.z4 = d; return d; } else { var e = this.z1(a, b, this.z4); this.z4 = e; return e; } }; RadialBase.prototype.di = function (a, b, c) { if (this.f3(this.by) && !c) { var d = this.z3(a, b, this.z5); this.z5 = d; return d; } else { var e = this.z1(a, b, this.z5); e.d = true; this.z5 = e; return e; } }; RadialBase.prototype.aah = function () { return (this.assigningRadialStyle != null && this.z7) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); }; RadialBase.prototype.aag = function () { return (this.assigningRadialMarkerStyle != null && this.z6) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); }; RadialBase.prototype.aby = function (a) { if (this.assigningRadialStyle != null && this.z7) { this.assigningRadialStyle(this, a); } }; RadialBase.prototype.abx = function (a) { if (this.assigningRadialMarkerStyle != null && this.z6) { this.assigningRadialMarkerStyle(this, a); } }; RadialBase.prototype.aar = function (a) { return a.da.b; }; RadialBase.prototype.aas = function (a) { return a.da.c; }; RadialBase.prototype.ai = function () { return [this.zl, this.zr]; }; RadialBase.prototype.ta = function (a, b) { this.zt.da.e(this.il); this.r9(false); }; RadialBase.prototype.s9 = function (a, b) { if (this.g8 && this.j0 < 0.05 && (this.dc == null || !this.dc.gj())) { this.g9 = true; this.hc = false; this.gr = false; } this.zt.da.e(this.il); this.r9(false); }; RadialBase.prototype.rr = function (a, b, c, d) { _super.prototype.rr.call(this, a, b, c, d); switch (b) { case RadialBase.$$p[6]: this.r9(false); break; case RadialBase.$$p[14]: this.ps(); this.r9(false); break; case "SeriesViewer": if (c != null && d == null) { if (this.zl != null) { this.zl.cx(this); } if (this.zr != null) { this.zr.cx(this); } } if (c == null && d != null) { if (this.zl != null) { this.zl.d4(this); } if (this.zr != null) { this.zr.d4(this); } } this.zt.da.e(this.il); this.r9(false); break; case RadialBase.$$p[0]: if (this.zl != null && this.zr != null) { this.zs = new RadialAxes(this.zr, this.zl); } if (c != null) { c.cx(this); } if (d != null) { d.d4(this); } this.zt.da.e(this.il); this.r9(false); break; case RadialBase.$$p[24]: if (this.zl != null && this.zr != null) { this.zs = new RadialAxes(this.zr, this.zl); } if (c != null) { c.cx(this); } if (d != null) { d.d4(this); } this.zt.da.e(this.il); if (this.zr == null || !this.zr.ee()) { this.r9(false); } break; case RadialBase.$$p[3]: case RadialBase.$$p[4]: if (this.aa0 != null) { this.ze = new BindingFormatter(); this.ze.j = this.aa0; this.ze.d = this.y8; } else { this.ze = null; } break; case RadialBase.$$p[21]: case RadialBase.$$p[22]: if (this.abp != null) { this.zi = new BindingFormatter(); this.zi.j = this.abp; this.zi.d = this.zd; } else { this.zi = null; } break; case RadialBase.$$p[12]: case RadialBase.$$p[13]: if (this.abd != null) { this.zf = new BindingFormatter(); this.zf.j = this.abd; this.zf.d = this.za; } else { this.zf = null; } break; case RadialBase.$$p[19]: case RadialBase.$$p[20]: if (this.abp != null) { this.zh = new BindingFormatter(); this.zh.j = this.abm; this.zh.d = this.zc; } else { this.zh = null; } break; case RadialBase.$$p[17]: case RadialBase.$$p[18]: if (this.abd != null) { this.zg = new BindingFormatter(); this.zg.j = this.abj; this.zg.d = this.zb; } else { this.zg = null; } break; case "SyncLink": if (this.c4 != null && this.dc != null) { this.zt.da.e(this.il); this.r9(false); } break; case "TransitionProgress": this.zx.d(this.j0, this.zw, this.zu); if (this.d7(this.cw)) { return; } if (this.j0 == 1) { this.zu.ab(); this.abz(this.zu, this.zt); if (this.g8) { this.g8 = false; this.pk(); this.dd.r = truncate(this.ji()); this.dd.b = this.de; } if (this.hb) { this.hb = false; this.pk(); this.dd.r = truncate(this.ji()); this.dd.b = this.de; this.rh(); } this.q4(); } else { this.abz(this.zx, this.zt); } if (this.dc != null) { this.dc.su(this); } break; case RadialBase.$$p[8]: this.r9(false); this.q1(); break; case "VisibilityProxy": if (EnumUtil.getEnumValue(Visibility_$type, c) != 0 && EnumUtil.getEnumValue(Visibility_$type, d) == 0) { this.zt.da.e(this.il); } break; case RadialBase.$$p[10]: this.z7 = this.aaf(); this.r9(false); break; case RadialBase.$$p[9]: this.z6 = this.aae(); this.r9(false); break; } }; RadialBase.prototype.aaf = function () { return this.aac; }; RadialBase.prototype.aae = function () { return this.aab; }; RadialBase.prototype.z9 = function (a) { if (typeCast(NumericRadiusAxis.$, a) !== null) { return true; } return false; }; RadialBase.prototype.z8 = function (a) { if (typeCast(CategoryAngleAxis.$, a) !== null) { return true; } return false; }; RadialBase.prototype.kx = function (a) { var b = this.kd(a); var c = false; if (this.zl != null && this.zl.ds) { var d = this.zl; var e = d.hasOthersCategory && b == this.zl.qc - 1; c = e; } if (c) { return this.zl.to(true); } return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; }; RadialBase.prototype.aak = function (a) { var b = this.cw.ca; var c = this.cw.b9; var d = this.cw.getEffectiveViewport(); if (this.zl != null && !b.isEmpty && !c.isEmpty && this.zs != null) { var e = this.zs.c(a, b, c, d); if (e < 0) { e += Math.PI * 2; } if (e > Math.PI * 2) { e -= Math.PI * 2; } return e; } return NaN; }; RadialBase.prototype.iz = function (a) { var b = this.cw.ca; var c = this.cw.b9; var d = this.getEffectiveViewport1(this.cw); var e = -1; if (this.zl != null && !b.isEmpty && !c.isEmpty && this.zs != null) { var f = this.zs.c(a, b, c, d); if (f < 0) { f += Math.PI * 2; } if (f > Math.PI * 2) { f -= Math.PI * 2; } var g = this.zl.getUnscaledAngle(f); if (this.zl.categoryMode != 0) { g -= 0.5; } e = g; } return e; }; RadialBase.prototype.aal = function (a, b, c, d) { return this.zl.r4(a, b, c, d); }; RadialBase.prototype.kd = function (a) { var b = truncate(Math.round(this.iz(a))); var c = false; if (this.zl != null && this.zl.ds) { var d = this.zl; var e = d.hasOthersCategory && b == this.zl.qc - 1; c = e; } if (c) { var f = this.zl; return this.zl.qc - 1; } if (this.dp != null && b == this.dp.count) { b = 0; } return b; }; RadialBase.prototype.gk = function (a) { return false; }; RadialBase.prototype.zv = function () { var a = this.zu; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.zx; } return a; }; RadialBase.prototype.qq = function () { _super.prototype.qq.call(this); if (this.zl != null) { this.zl.l0(false); } if (this.zr != null) { this.zr.l0(false); } }; RadialBase.prototype.hl = function (a, b, c) { var d = true; var e = c; if (!_super.prototype.hl.call(this, a, b, c) || !c.r() || b.isEmpty || a.isEmpty || this.zl == null || this.zl.itemsSource == null || this.zr == null || this.zs == null || this.dp == null || this.zl.b7 == null || this.zr.b7 == null || this.zr.qy == this.zr.qx) { e.da.b = 0; d = false; } return d; }; RadialBase.prototype.zo = function () { return 1; }; RadialBase.prototype.aao = function () { return Math.max(0, 0.5 * this.zr.th); }; RadialBase.prototype.gu = function () { return this.aad; }; RadialBase.prototype.gv = function () { return true; }; RadialBase.prototype.sa = function (a) { _super.prototype.sa.call(this, a); this.zt.da.e(this.il); if (this.d7(this.cw)) { this.zu.ae(); this.zx.ae(); this.zw.ae(); return; } if (this.gy) { if (this.d4()) { if (this.dd.g) { this.dd.t(); } this.abz(this.zx, this.zt); } else { this.abz(this.zu, this.zt); } return; } if (this.gm(a)) { var b = this.zw; if (this.d4()) { if (this.dd.g) { this.dd.t(); } this.zw = this.zx; this.zx = b; } else { this.zw = this.zu; this.zu = b; } var c = false; this.abw(this.zu, this.zt); if (this.ha) { this.dd.w(); this.dd.r = truncate(this.jj()); this.dd.b = this.df != null ? this.df : this.de; if (this.hb) { var d = this.zx; this.zx = this.zw; this.zw = d; c = true; } this.zq.x(this, this.zw, this.zu, this.isVertical, this.zl, this.zr, this.zp, this.zo(), this.c6, this.c5(), runOn(this, this.aao), this.zt.b9); if (this.hb) { var e = this.zx; this.zx = this.zw; this.zw = e; } this.hb = false; } if (this.hd) { this.dd.w(); this.dd.r = truncate(this.jk()); this.dd.b = this.dg != null ? this.dg : this.de; if (this.g8) { var f = this.zx; this.zx = this.zw; this.zw = f; c = true; } this.zq.x(this, this.zw, this.zu, this.isVertical, this.zl, this.zr, this.zp, this.zo(), this.c6, this.c5(), runOn(this, this.aao), this.zt.b9); var g = this.zu; this.zu = this.zw; this.zw = g; if (this.g8) { var h = this.zx; this.zx = this.zw; this.zw = h; } this.g8 = false; } this.eb = false; if (!c) { this.pf(); } this.sq(); if (this.ha) { this.g9 = false; this.g8 = true; } if (this.hd) { this.hc = false; this.hb = true; } } else { this.abw(this.zu, this.zt); this.abz(this.zu, this.zt); } }; RadialBase.prototype.aat = function () { var e_1, _a; if (this.bo != null) { var a = this.bo; return a.aat(); } var b = 0; try { for (var _b = __values(fromEnum(this.dc.b9)), _c = _b.next(); !_c.done; _c = _b.next()) { var c = _c.value; if (c == this || this.bo == c) { return b; } var d = typeCast(RadialBase.$, c); if (d != null && d.zl == this.zl && d.preferredCategoryMode(d.zl) == 2) { b++; } } } 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; } } return -1; }; RadialBase.prototype.ak = function (a, b) { var c = new List$1(ChartSelection.$, 0); this.qj(a, c, b); return c.toArray(); }; RadialBase.prototype.qj = function (a, b, c) { var _this = this; var d = this.cw.ca; var e = this.cw.b9; var f = this.cw.getEffectiveViewport(); var g, h; var i = this.zs.f(this.dc.yx(a), d, e, f, g, h); g = i.p4; h = i.p5; if (g == -1 || h == -1) { return; } var j = h - g + 1; if (g > h) { j = this.zl.qd - g + h + 1; } if (j > 0 && (c == 7 || c == 6)) { b.add(((function () { var $ret = new ChartSelection(); $ret.series = _this; return $ret; })())); return; } var _loop_1 = function (k) { var l = (k + g) % (this_1.zl.qd); if (c == 2 || c == 1) { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.zl.po.item(l); return $ret; })())); } else { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.zl.po.item(l); $ret.series = _this; return $ret; })())); } }; var this_1 = this; for (var k = 0; k < j; k++) { _loop_1(k); } }; RadialBase.$t = markType(RadialBase, 'RadialBase', MarkerSeries.$, [IHasCategoryModePreference_$type]); RadialBase.$$p = markDep(DependencyProperty, PropertyMetadata, RadialBase, 'raisePropertyChanged', ['AngleAxis:zl:ab0', [CategoryAngleAxis.$, null], 'AutoCalloutLabelPrecision:aap:ab1', [1, -1], 'AutoCalloutLabelValueSeparator:aay:ab2', [2, " - "], 'AutoCalloutOthersLabelFormat:aa0:ab3', [2, null], 'AutoCalloutOthersLabelFormatSpecifiers:y8:ab4', [Array_$type, null], 'AutoCalloutPercentagePrecision:aaq:ab5', [1, 2], 'AutoCalloutRadialLabelMode:zy:ab6', [RadialLabelMode_$type, enumGetBox(RadialLabelMode_$type, 0)], 'CategoryCollisionMode:zm:ab7', [CategoryCollisionMode_$type, enumGetBox(CategoryCollisionMode_$type, 1)], 'ClipSeriesToBounds:aaa:ab8', [0, false], 'IsCustomRadialMarkerStyleAllowed:aab:ab9', [0, false], 'IsCustomRadialStyleAllowed:aac:aca', [0, false], 'IsTransitionInEnabled:aad:acb', [0, false], 'LegendProportionalRadialLabelFormat:abd:acc', [2, null], 'LegendProportionalRadialLabelFormatSpecifiers:za:acd', [Array_$type, null], 'LegendRadialLabelMode:zz:ace', [RadialLabelMode_$type, enumGetBox(RadialLabelMode_$type, 0)], 'OthersCategoryBrush:acp:acf', [Brush.$, null], 'OthersCategoryOutline:acq:acg', [Brush.$, null], 'OthersLegendProportionalRadialLabelFormat:abj:ach', [2, null], 'OthersLegendProportionalRadialLabelFormatSpecifiers:zb:aci', [Array_$type, null], 'OthersProportionalRadialLabelFormat:abm:acj', [2, null], 'OthersProportionalRadialLabelFormatSpecifiers:zc:ack', [Array_$type, null], 'ProportionalRadialLabelFormat:abp:acl', [2, null], 'ProportionalRadialLabelFormatSpecifiers:zd:acm', [Array_$type, null], 'TransitionInMode:zp:acn', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'ValueAxis:zr:aco', [NumericRadiusAxis.$, null]]); return RadialBase; }(MarkerSeries)); export { RadialBase }; /** * @hidden */ var RadialBaseView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(RadialBaseView, _super); function RadialBaseView(a) { var _this = _super.call(this, a) || this; _this.da = null; _this.c9 = null; _this.db = null; _this.dc = 0; _this.dd = null; _this.c9 = a; _this.db = new Pool$1(Marker.$); _this.c0(_this.db); return _this; } RadialBaseView.prototype.cw = function (a) { this.db.c(a); }; RadialBaseView.$t = markType(RadialBaseView, 'RadialBaseView', MarkerSeriesView.$); return RadialBaseView; }(MarkerSeriesView)); export { RadialBaseView };