UNPKG

igniteui-react-charts

Version:

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

1,308 lines (1,307 loc) 45.5 kB
/* THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE: https://www.infragistics.com/legal/license/igultimate-la https://www.infragistics.com/legal/license/igultimate-eula GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company. */ import { 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 { 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 */ export let RadialBucketCalculator = /*@__PURE__*/ (() => { class RadialBucketCalculator extends Base { constructor(a) { super(); this.a = null; this.c = 0; this.d = 0; this.b = 0; this.a = a; } getBucket(a) { throw new NotImplementedException(0); } getBucketWithoutUnknowns(a) { return this.getBucket(a); } getErrorBucket(a, b) { return NaN; } getBucketInfo(a, b, c, d) { a = this.c; b = this.d; c = this.b; d = this.a.c9.ik; return { p0: a, p1: b, p2: c, p3: d }; } e(a) { let b = this.a.ca; let c = this.a.b9; let d = this.a.getEffectiveViewport(); let e = this.a.c9.zk; if (b.isEmpty || c.isEmpty || e == null || this.a.c9.dp == null || this.a.c9.dp.count == 0) { this.b = 0; return; } let f = Math.floor(e.r4(c, d, b)); let g = Math.ceil(e.r3(c, d, b)); if (e.dn) { g = Math.ceil(e.r4(c, d, b)); f = Math.floor(e.r3(c, d, b)); } if (g < f) { g = e.qa + g; } let h = this.a.c9.zq; let i = h != null ? h.tg : 0.75; let j = Math.min(c.width, c.height) * 0.5 * (i) * 2 * Math.PI; let 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)); } } cacheValues() { } unCacheValues() { } } RadialBucketCalculator.$t = /*@__PURE__*/ markType(RadialBucketCalculator, 'RadialBucketCalculator', Base.$, [IBucketizer_$type]); return RadialBucketCalculator; })(); /** * @hidden */ export let RadialBase = /*@__PURE__*/ (() => { class RadialBase extends MarkerSeries { rh(a) { super.rh(a); this.zs = a; } constructor() { super(); this.zz = null; this.z6 = false; this.z5 = false; this.z3 = null; this.z4 = null; this.assigningRadialStyle = null; this.assigningRadialMarkerStyle = null; this.zd = null; this.zh = null; this.ze = null; this.zg = null; this.zf = null; this.zv = new RadialFrame(4); this.zw = new RadialFrame(4); this.zt = new RadialFrame(4); this.zr = null; this.zp = null; this.zp = new CategoryTransitionSourceFramePreparer(); this.zz = new RadialSeriesRenderManager(); } abs() { if (this.dd.g) { this.dd.t(); } } get categoryAxis() { return this.zk; } a0() { return this.zk; } b3() { if (this.b4 == 0) { return 1; } else { return super.b3(); } } aai(a, b, c) { let d = this.cw.ca; let e = this.cw.b9; let f = this.cw.getEffectiveViewport(); let g = this.al(a); let h = this.zr.d(0, this.zq.tp, d, e, f); let i = this.zr.e(0, this.zq.tp, d, e, f); if (g == null) { return false; } for (let j = 0; j < g.length; j++) { let k = g[j]; if (k == null) { continue; } if (k.length != 2) { if (CoreGeometryUtil.l(a, k[0], boxArray$1(k), this.il / 2 + this.i1(c))) { return true; } if (CoreGeometryUtil.i(a, { $type: Point_$type, x: h, y: i }, k[0], this.il / 2 + this.i1(c))) { return true; } if (CoreGeometryUtil.i(a, k[k.length - 1], { $type: Point_$type, x: h, y: i }, this.il / 2 + this.i1(c))) { return true; } let l = new Array(k.length + 2); for (let 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.il / 2 + this.i1(c))) { return true; } if (CoreGeometryUtil.i(a, { $type: Point_$type, x: h, y: i }, k[0], this.il / 2 + this.i1(c))) { return true; } if (CoreGeometryUtil.i(a, k[1], { $type: Point_$type, x: h, y: i }, this.il / 2 + this.i1(c))) { return true; } let 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; } aj(a) { let b = this.zu(); let c = this.cw.ca; let d = this.cw.b9; let e = this.cw.getEffectiveViewport(); let f = this.an(this.a0(), b.k, this.aaq(this.cw), this.aar(this.cw), this.w2(a), true); if (f == null) { return null; } let g = f[0]; let h = f[1]; let i = this.zr.d(g[0], g[2], c, d, e); let j = this.zr.e(g[0], g[2], c, d, e); let k = this.zr.d(h[0], h[2], c, d, e); let l = this.zr.e(h[0], h[2], c, d, e); let m = new Array(1); let 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; } al(a) { let b = this.zu(); let c = this.cw.ca; let d = this.cw.b9; let e = this.cw.getEffectiveViewport(); let f = this.an(this.a0(), b.k, this.aaq(this.cw), this.aar(this.cw), this.w2(a), true); if (f == null) { return null; } let g = f[0]; let h = f[1]; let i = new Array(1); let j = new Array(2); let k = this.zr.d(g[0], g[1], c, d, e); let l = this.zr.e(g[0], g[1], c, d, e); let m = this.zr.d(h[0], h[1], c, d, e); let n = this.zr.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; } g2(a, b) { if (this.g1(a, b)) { return true; } if (this.x2(a, b)) { return true; } return false; } y8(a, b) { return null; } w1(a) { let b = this.zk; let c = this.zq; if (b == null || c == null || this.dc == null) { return { $type: Point_$type, x: NaN, y: NaN }; } let d = NaN; let e = NaN; let f = this.zr.h(a.x, a.y, this.dc.yr, this.dc.y9, this.getEffectiveViewport(), d, e); d = f.p5; e = f.p6; return { $type: Point_$type, x: d, y: e }; } p6(a) { if (this.zk != null && this.zk.ds && this.zk.s9(a)) { if (this.fl) { this.ba.a$y(this, a, this.zk.qb - 1); } return; } super.p6(a); } eg(a) { if (this.zk != null && this.zk.ds && this.zk.hasOthersCategory) { if (this.zk.s9(a)) { return true; } } return super.eg(a); } p4(a) { if (this.zk != null && this.zk.ds && this.zk.s9(a)) { if (this.fl) { this.ba.a$ao(this, a, this.dp.count - 1); } return; } super.p4(a); } ed(a, b, c, d, e) { if (!this.hasMarkers) { return false; } let f = this.zk; let g = new ScalerParams(1, this.dc.yr, this.xd, f.dn); g.c = this.getEffectiveViewport1(this.cw); let h = this.zq; let i = new ScalerParams(1, this.dc.yr, this.xd, h.dn); i.c = this.getEffectiveViewport1(this.cw); let j = this.aap; a.clear(); this.xr.cw((k) => { if (k._visibility == 0) { let l = new SeriesPointOfInterest(); let m = k.n; let n = k.o; if (!e && (m < this.xd.left || m > this.xd.right || n < this.xd.top || n > this.xd.bottom)) { return; } let o = null; if (k.content != null) { o = k.content.item; } let p; let q; let r = this.zr.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; let s = l.e; let t = k.ak; l.f = this.abp(s, o, t, d, j, c, b, false); l.b = k.content; l.g = this.v0; l.c = k.ak; if (this.hf) { l.g = this.v7(k.ak); } l.a = this.ar(k.ak, k.al); a.add(l); } }); return true; } k1(a, b) { let c = null; if (this.dp != null) { if (a >= 0 && a < this.dp.count) { c = this.dp.item(a); } if (this.zk != null && this.zk.ds && a == this.zk.othersIndex) { c = this.zk.tm(false); } } let d = NaN; if (c != null) { d = this.jk(c); } let e = this.abp(d, c, a, this.aao >= 0 ? this.aao : 5, this.aap, false, false, b); if (e != null) { return e; } return super.k1(a, b); } abp(a, b, c, d, e, f, g, h) { let i = null; let j = this.zk.ds && this.zk.s9(b); let k = this.zx; if (h) { k = this.zy; } if (k == 0) { if (h) { k = 5; } else { k = 6; } } if ((h && ((this.ze != null) || (j && this.zf != null))) || (!h && ((this.zh != null) || (j && this.zg != null)))) { let l = this.aal(a, b, c, d, f); let m = this.aam(a, b, c, e, f); let n = this.aa6(c); let o = ((() => { let $ret = new ProportionalRadialLabelContext(); $ret.value = l; $ret.percent = m; $ret.label = n; $ret.item = b; return $ret; })()); let p = null; if (j) { if (h) { p = this.zf; } else { p = this.zg; } if (p == null) { if (h) { p = this.ze; } else { p = this.zh; } } } else { if (h) { p = this.ze; } else { p = this.zh; } } i = p.i(o); } else if (k != 1) { switch (k) { case 2: i = this.aa7(a, b, c, d, f); break; case 3: i = this.aa8(a, b, c, e, f); break; case 4: { let q = this.aa7(a, b, c, d, f); let r = this.aa8(a, b, c, e, f); i = q + this.aax + r; } break; case 5: i = this.aa6(c); break; case 6: { let s = this.aa7(a, b, c, d, f); let t = this.aa6(c); i = t + this.aax + s; } break; case 7: { let u = this.aa8(a, b, c, e, f); let v = this.aa6(c); i = v + this.aax + u; } break; case 8: { let w = this.aa7(a, b, c, d, f); let x = this.aa8(a, b, c, e, f); let y = this.aa6(c); i = y + this.aax + w + this.aax + x; } break; } } else { if (g) { i = this.aa7(a, b, c, d, f); } else { i = this.aa6(c); } } return i; } aa6(a) { let b = this.zk; let c = this.au(true); if (this.zk != null && this.zk.ds && this.zk.hasOthersCategory && a == this.zk.othersIndex) { if (this.zd != null) { c = this.zd; } } if (c != null) { let d = super.k1(a, false); if (d != null) { return c.i(d); } else { return null; } } else { return b.i8(a); } } aa7(a, b, c, d, e) { let f = a; f = this.aat(c, f); if (e) { return this.aav(f, d); } else { a = this.jk(b); if (!isNaN_(a)) { return this.aav(a, d); } else { return this.aav(f, d); } } } aal(a, b, c, d, e) { let f = a; f = this.aat(c, f); if (e) { return f; } else { a = this.jk(b); if (!isNaN_(a)) { return a; } else { return f; } } } aa8(a, b, c, d, e) { if (this.zk == null || !this.zk.ds) { return this.aa7(a, b, c, d, e); } let f = this.zk.tg(c); if (e) { return this.aav(f, d) + "%"; } else { a = this.zk.tg(c); if (!isNaN_(a)) { return this.aav(a, d) + "%"; } else { return this.aav(f, d) + "%"; } } } aam(a, b, c, d, e) { if (this.zk == null || !this.zk.ds) { return this.aal(a, b, c, d, e); } let f = this.zk.tg(c); if (e) { return f; } else { a = this.zk.tg(c); if (!isNaN_(a)) { return a; } else { return f; } } } aat(a, b) { return b; } aav(a, b) { let c; if (b >= 0) { c = round10N(a, b); } else { c = a; } let d = this.au(false); if (d != null) { let e = d; return e.i(c); } else { return MathUtil.t(c); } } get_fw() { return true; } get_fh() { return true; } z0(a, b, c) { let d = new HighlightingInfo(); d.i = this; d.g = 0; d.f = this.dp.count - 1; d.c = true; if (c != null && c.g == d.g && c.f == d.f) { return c; } return d; } aah() { return false; } hz() { let a = super.hz(); if (this.aah()) { let b = ((() => { let $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "DashArray"; $ret.p = true; $ret.x = ((() => { let $ret = new DoubleCollection(); $ret.add(5); $ret.add(5); return $ret; })()); $ret.q = true; return $ret; })()); a.add(b); } if (!this.aah()) { let c = ((() => { let $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.si)); a.add(c); } if (!this.aah()) { let d = ((() => { let $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.si)); a.add(d); } let e = ((() => { let $ret = new SeriesLayerPropertyOverlay(); $ret.p = true; $ret.ad = "IsTransitionInEnabled"; $ret.x = true; $ret.q = true; return $ret; })()); a.add(e); let f = ((() => { let $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; } k4() { if (this.d4()) { return this.bo.zw; } else { return this.bo.zt; } } z1(a, b, c) { if (this.dp == null) { return null; } let d = this.zs.da.c; let e = this.zs.da.d; let f = this.zs.da.b; let g = this.zu(); let h = this.dp.count; let i = this.zk; let j = -1; let k = -1; let l = this.kc(b); if (isNaN_(b.x) || isNaN_(b.y)) { if (a != null && this.dp != null) { if (this.zk.ds && this.zk.s9(a)) { l = this.zk.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; } let m = new HighlightingInfo(); m.i = this; m.g = j; m.f = k; return m; } z2(a, b, c) { if (this.dp == null) { return null; } let d = this.zs.da.c; let e = this.zs.da.d; let f = this.zs.da.b; let g = this.zu(); let h = this.dp.count; let i = this.zk; let j = -1; let k = -1; let l = this.kc(b); if (isNaN_(b.x) || isNaN_(b.y)) { if (a != null && this.dp != null) { if (this.zk.ds && this.zk.s9(a)) { l = this.zk.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; } let m = new HighlightingInfo(); m.d = true; m.i = this; m.g = j; m.f = k; return m; } dh(a, b, c) { if (this.ef && this.f2(this.by) && !c) { let d = this.z1(a, b, this.z3); this.z3 = d; return d; } else { let e = this.z0(a, b, this.z3); this.z3 = e; return e; } } di(a, b, c) { if (this.f2(this.by) && !c) { let d = this.z2(a, b, this.z4); this.z4 = d; return d; } else { let e = this.z0(a, b, this.z4); e.d = true; this.z4 = e; return e; } } aag() { return (this.assigningRadialStyle != null && this.z6) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } aaf() { return (this.assigningRadialMarkerStyle != null && this.z5) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1); } abv(a) { if (this.assigningRadialStyle != null && this.z6) { this.assigningRadialStyle(this, a); } } abu(a) { if (this.assigningRadialMarkerStyle != null && this.z5) { this.assigningRadialMarkerStyle(this, a); } } aaq(a) { return a.da.b; } aar(a) { return a.da.c; } ai() { return [this.zk, this.zq]; } s9(a, b) { this.zs.da.e(this.ik); this.r8(false); } s8(a, b) { if (this.g7 && this.jz < 0.05 && (this.dc == null || !this.dc.gi())) { this.g8 = true; this.hb = false; this.gq = false; } this.zs.da.e(this.ik); this.r8(false); } rq(a, b, c, d) { super.rq(a, b, c, d); switch (b) { case RadialBase.$$p[6]: this.r8(false); break; case RadialBase.$$p[14]: this.pr(); this.r8(false); break; case "SeriesViewer": if (c != null && d == null) { if (this.zk != null) { this.zk.cx(this); } if (this.zq != null) { this.zq.cx(this); } } if (c == null && d != null) { if (this.zk != null) { this.zk.d3(this); } if (this.zq != null) { this.zq.d3(this); } } this.zs.da.e(this.ik); this.r8(false); break; case RadialBase.$$p[0]: if (this.zk != null && this.zq != null) { this.zr = new RadialAxes(this.zq, this.zk); } if (c != null) { c.cx(this); } if (d != null) { d.d3(this); } this.zs.da.e(this.ik); this.r8(false); break; case RadialBase.$$p[22]: if (this.zk != null && this.zq != null) { this.zr = new RadialAxes(this.zq, this.zk); } if (c != null) { c.cx(this); } if (d != null) { d.d3(this); } this.zs.da.e(this.ik); if (this.zq == null || !this.zq.ed()) { this.r8(false); } break; case RadialBase.$$p[3]: case RadialBase.$$p[4]: if (this.aaz != null) { this.zd = new BindingFormatter(); this.zd.j = this.aaz; this.zd.d = this.y7; } else { this.zd = null; } break; case RadialBase.$$p[19]: case RadialBase.$$p[20]: if (this.abm != null) { this.zh = new BindingFormatter(); this.zh.j = this.abm; this.zh.d = this.zc; } else { this.zh = null; } break; case RadialBase.$$p[12]: case RadialBase.$$p[13]: if (this.abc != null) { this.ze = new BindingFormatter(); this.ze.j = this.abc; this.ze.d = this.y9; } else { this.ze = null; } break; case RadialBase.$$p[17]: case RadialBase.$$p[18]: if (this.abm != null) { this.zg = new BindingFormatter(); this.zg.j = this.abj; this.zg.d = this.zb; } else { this.zg = null; } break; case RadialBase.$$p[15]: case RadialBase.$$p[16]: if (this.abc != null) { this.zf = new BindingFormatter(); this.zf.j = this.abg; this.zf.d = this.za; } else { this.zf = null; } break; case "SyncLink": if (this.c4 != null && this.dc != null) { this.zs.da.e(this.ik); this.r8(false); } break; case "TransitionProgress": this.zw.d(this.jz, this.zv, this.zt); if (this.d7(this.cw)) { return; } if (this.jz == 1) { this.zt.ab(); this.abw(this.zt, this.zs); if (this.g7) { this.g7 = false; this.pj(); this.dd.r = truncate(this.jh()); this.dd.b = this.de; } if (this.ha) { this.ha = false; this.pj(); this.dd.r = truncate(this.jh()); this.dd.b = this.de; this.rg(); } this.q3(); } else { this.abw(this.zw, this.zs); } if (this.dc != null) { this.dc.st(this); } break; case RadialBase.$$p[8]: this.r8(false); this.q0(); break; case "VisibilityProxy": if (EnumUtil.getEnumValue(Visibility_$type, c) != 0 && EnumUtil.getEnumValue(Visibility_$type, d) == 0) { this.zs.da.e(this.ik); } break; case RadialBase.$$p[10]: this.z6 = this.aae(); this.r8(false); break; case RadialBase.$$p[9]: this.z5 = this.aad(); this.r8(false); break; } } aae() { return this.aab; } aad() { return this.aaa; } z8(a) { if (typeCast(NumericRadiusAxis.$, a) !== null) { return true; } return false; } z7(a) { if (typeCast(CategoryAngleAxis.$, a) !== null) { return true; } return false; } kw(a) { let b = this.kc(a); let c = false; if (this.zk != null && this.zk.ds) { let d = this.zk; let e = d.hasOthersCategory && b == this.zk.qa - 1; c = e; } if (c) { return this.zk.tm(true); } return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; } aaj(a) { let b = this.cw.ca; let c = this.cw.b9; let d = this.cw.getEffectiveViewport(); if (this.zk != null && !b.isEmpty && !c.isEmpty && this.zr != null) { let e = this.zr.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; } iy(a) { let b = this.cw.ca; let c = this.cw.b9; let d = this.getEffectiveViewport1(this.cw); let e = -1; if (this.zk != null && !b.isEmpty && !c.isEmpty && this.zr != null) { let f = this.zr.c(a, b, c, d); if (f < 0) { f += Math.PI * 2; } if (f > Math.PI * 2) { f -= Math.PI * 2; } let g = this.zk.getUnscaledAngle(f); if (this.zk.categoryMode != 0) { g -= 0.5; } e = g; } return e; } aak(a, b, c, d) { return this.zk.r2(a, b, c, d); } kc(a) { let b = truncate(Math.round(this.iy(a))); let c = false; if (this.zk != null && this.zk.ds) { let d = this.zk; let e = d.hasOthersCategory && b == this.zk.qa - 1; c = e; } if (c) { let f = this.zk; return this.zk.qa - 1; } if (this.dp != null && b == this.dp.count) { b = 0; } return b; } gj(a) { return false; } zu() { let a = this.zt; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.zw; } return a; } qp() { super.qp(); if (this.zk != null) { this.zk.ly(false); } if (this.zq != null) { this.zq.ly(false); } } hk(a, b, c) { let d = true; let e = c; if (!super.hk(a, b, c) || !c.r() || b.isEmpty || a.isEmpty || this.zk == null || this.zk.itemsSource == null || this.zq == null || this.zr == null || this.dp == null || this.zk.b7 == null || this.zq.b7 == null || this.zq.qw == this.zq.qv) { e.da.b = 0; d = false; } return d; } zn() { return 1; } aan() { return Math.max(0, 0.5 * this.zq.tf); } gt() { return this.aac; } gu() { return true; } r9(a) { super.r9(a); this.zs.da.e(this.ik); if (this.d7(this.cw)) { this.zt.ae(); this.zw.ae(); this.zv.ae(); return; } if (this.gx) { if (this.d4()) { if (this.dd.g) { this.dd.t(); } this.abw(this.zw, this.zs); } else { this.abw(this.zt, this.zs); } return; } if (this.gl(a)) { let b = this.zv; if (this.d4()) { if (this.dd.g) { this.dd.t(); } this.zv = this.zw; this.zw = b; } else { this.zv = this.zt; this.zt = b; } let c = false; this.abt(this.zt, this.zs); if (this.g9) { this.dd.w(); this.dd.r = truncate(this.ji()); this.dd.b = this.df != null ? this.df : this.de; if (this.ha) { let d = this.zw; this.zw = this.zv; this.zv = d; c = true; } this.zp.x(this, this.zv, this.zt, this.isVertical, this.zk, this.zq, this.zo, this.zn(), this.c6, this.c5(), runOn(this, this.aan), this.zs.b9); if (this.ha) { let e = this.zw; this.zw = this.zv; this.zv = e; } this.ha = false; } if (this.hc) { this.dd.w(); this.dd.r = truncate(this.jj()); this.dd.b = this.dg != null ? this.dg : this.de; if (this.g7) { let f = this.zw; this.zw = this.zv; this.zv = f; c = true; } this.zp.x(this, this.zv, this.zt, this.isVertical, this.zk, this.zq, this.zo, this.zn(), this.c6, this.c5(), runOn(this, this.aan), this.zs.b9); let g = this.zt; this.zt = this.zv; this.zv = g; if (this.g7) { let h = this.zw; this.zw = this.zv; this.zv = h; } this.g7 = false; } this.eb = false; if (!c) { this.pe(); } this.sp(); if (this.g9) { this.g8 = false; this.g7 = true; } if (this.hc) { this.hb = false; this.ha = true; } } else { this.abt(this.zt, this.zs); this.abw(this.zt, this.zs); } } aas() { if (this.bo != null) { let a = this.bo; return a.aas(); } let b = 0; for (let c of fromEnum(this.dc.b9)) { if (c == this || this.bo == c) { return b; } let d = typeCast(RadialBase.$, c); if (d != null && d.zk == this.zk && d.preferredCategoryMode(d.zk) == 2) { b++; } } return -1; } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.qi(a, c, b); return c.toArray(); } qi(a, b, c) { let d = this.cw.ca; let e = this.cw.b9; let f = this.cw.getEffectiveViewport(); let g, h; let i = this.zr.f(this.dc.yw(a), d, e, f, g, h); g = i.p4; h = i.p5; if (g == -1 || h == -1) { return; } let j = h - g + 1; if (g > h) { j = this.zk.qb - g + h + 1; } if (j > 0 && (c == 7 || c == 6)) { b.add(((() => { let $ret = new ChartSelection(); $ret.series = this; return $ret; })())); return; } for (let k = 0; k < j; k++) { let l = (k + g) % (this.zk.qb); if (c == 2 || c == 1) { b.add(((() => { let $ret = new ChartSelection(); $ret.item = this.zk.pm.item(l); return $ret; })())); } else { b.add(((() => { let $ret = new ChartSelection(); $ret.item = this.zk.pm.item(l); $ret.series = this; return $ret; })())); } } } } RadialBase.$t = /*@__PURE__*/ markType(RadialBase, 'RadialBase', MarkerSeries.$, [IHasCategoryModePreference_$type]); RadialBase.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, RadialBase, 'raisePropertyChanged', ['AngleAxis:zk:abx', [CategoryAngleAxis.$, null], 'AutoCalloutLabelPrecision:aao:aby', [1, -1], 'AutoCalloutLabelValueSeparator:aax:abz', [2, " - "], 'AutoCalloutOthersLabelFormat:aaz:ab0', [2, null], 'AutoCalloutOthersLabelFormatSpecifiers:y7:ab1', [Array_$type, null], 'AutoCalloutPercentagePrecision:aap:ab2', [1, 2], 'AutoCalloutRadialLabelMode:zx:ab3', [RadialLabelMode_$type, /*@__PURE__*/ enumGetBox(RadialLabelMode_$type, 0)], 'CategoryCollisionMode:zl:ab4', [CategoryCollisionMode_$type, /*@__PURE__*/ enumGetBox(CategoryCollisionMode_$type, 1)], 'ClipSeriesToBounds:z9:ab5', [0, false], 'IsCustomRadialMarkerStyleAllowed:aaa:ab6', [0, false], 'IsCustomRadialStyleAllowed:aab:ab7', [0, false], 'IsTransitionInEnabled:aac:ab8', [0, false], 'LegendProportionalRadialLabelFormat:abc:ab9', [2, null], 'LegendProportionalRadialLabelFormatSpecifiers:y9:aca', [Array_$type, null], 'LegendRadialLabelMode:zy:acb', [RadialLabelMode_$type, /*@__PURE__*/ enumGetBox(RadialLabelMode_$type, 0)], 'OthersLegendProportionalRadialLabelFormat:abg:acc', [2, null], 'OthersLegendProportionalRadialLabelFormatSpecifiers:za:acd', [Array_$type, null], 'OthersProportionalRadialLabelFormat:abj:ace', [2, null], 'OthersProportionalRadialLabelFormatSpecifiers:zb:acf', [Array_$type, null], 'ProportionalRadialLabelFormat:abm:acg', [2, null], 'ProportionalRadialLabelFormatSpecifiers:zc:ach', [Array_$type, null], 'TransitionInMode:zo:aci', [CategoryTransitionInMode_$type, /*@__PURE__*/ enumGetBox(CategoryTransitionInMode_$type, 0)], 'ValueAxis:zq:acj', [NumericRadiusAxis.$, null]]); return RadialBase; })(); /** * @hidden */ export let RadialBaseView = /*@__PURE__*/ (() => { class RadialBaseView extends MarkerSeriesView { constructor(a) { super(a); 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); } cw(a) { this.db.c(a); } } RadialBaseView.$t = /*@__PURE__*/ markType(RadialBaseView, 'RadialBaseView', MarkerSeriesView.$); return RadialBaseView; })();