UNPKG

igniteui-react-charts

Version:

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

1,003 lines (1,002 loc) 41.2 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 { AnchoredRadialSeries } from "./AnchoredRadialSeries"; import { DependencyProperty } from "igniteui-react-core"; import { enumGetBox, Point_$type, runOn, typeCast, markType, markDep, fromEnum } from "igniteui-react-core"; import { LegendEmptyValuesMode_$type } from "igniteui-react-core"; import { Defaults } from "./Defaults"; import { Pool$1 } from "igniteui-react-core"; import { Path } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { Rect } from "igniteui-react-core"; import { RadialBaseView } from "./RadialBaseView"; import { ScalerParams } from "./ScalerParams"; import { ViewportUtils } from "./ViewportUtils"; import { SliceCoords } from "./SliceCoords"; import { Size } from "igniteui-react-core"; import { GeometryUtil } from "igniteui-react-core"; import { PathFigure } from "igniteui-react-core"; import { PathGeometry } from "igniteui-react-core"; import { LineSegment } from "igniteui-react-core"; import { ArcSegment } from "igniteui-react-core"; import { PieSliceCollisionGeometry } from "igniteui-react-core"; import { MathUtil } from "igniteui-react-core"; import { ProportionalCategoryAngleAxis } from "./ProportionalCategoryAngleAxis"; import { SeriesPointOfInterest } from "./SeriesPointOfInterest"; import { DataContext } from "igniteui-react-core"; import { ChartSelection } from "./ChartSelection"; import { CollisionRect } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; import { intDivide, isNaN_ } from "igniteui-react-core"; import { AnchoredRadialSeriesView } from "./AnchoredRadialSeriesView"; /** * @hidden */ export let RadialPieSeries = /*@__PURE__*/ (() => { class RadialPieSeries extends AnchoredRadialSeries { bk() { return new RadialPieSeries(); } get_fo() { return true; } get_fm() { return true; } jn() { if (!isNaN_(this.jm)) { return super.jn(); } return Defaults.h; } ct() { return new RadialPieSeriesView(this); } q8(a) { super.q8(a); this.ad0 = a; } constructor() { super(); this.ad1 = null; this.ad8 = null; this.ady = 0; this.ad4 = false; this.ab = RadialPieSeries.$; } get ad2() { return this.ad1; } set ad2(a) { if (this.ad1 != a) { let b = this.ad2; this.ad1 = a; this.raisePropertyChanged("LegendLabelColumn", b, this.ad2); } } get aeb() { return this.ad8; } set aeb(a) { if (this.ad8 != a) { let b = this.ad8; this.ad8 = a; this.raisePropertyChanged("LegendLabelMemberPath", b, this.ad8); } } get adz() { return this.ady; } set adz(a) { if (this.ady != a) { let b = this.ady; this.ady = a; this.raisePropertyChanged("LegendEmptyValuesMode", enumGetBox(LegendEmptyValuesMode_$type, b), enumGetBox(LegendEmptyValuesMode_$type, this.ady)); } } get ad5() { return this.ad4; } set ad5(a) { if (this.ad4 != a) { let b = this.ad4; this.ad4 = a; this.raisePropertyChanged("UseInsetOutlines", b, this.ad4); } } preferredCategoryMode(a) { return a != null && a == this.za ? 2 : 0; } pb(a, b) { super.pb(a, b); let c = b; if (a && c.dj != null) { c.dj.count = 0; } } iy() { return this.za.ou(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); } ar(a, b) { let c = new List$1(Rect.$, 0); let d = this.cw.ca; let e = this.cw.b9; let f = this.getEffectiveViewport1(this.cw); let g = this.wu(this.cw); let h = this.zg.or(e, d, f, g); let i = { $type: Point_$type, x: 0.5, y: 0.5 }; let j = this.zg; let k = Math.max(0, 0.5 * j.sa); let l = k; l = Math.max(l, h.minLength); let m = this.za.ou(d, e, f); let n = this.za != null && this.za.dj; let o = this.zj; if (this.d4()) { o = this.zm; } { if (n) { m = this.z9(a, d, e, f); } if (b < 0 || b > o.h.count - 1) { return null; } let p = o.h._inner[b][0]; let q = Math.min(o.h._inner[b][2], h.maxLength); return this.ad3(d, e, f, p - (m * 0.5), p + (m * 0.5), l, q, i); } } get_ef() { return true; } get_acp() { return true; } get_acj() { return true; } iq() { let a = super.iq(); if (this.ad5 && !isNaN_(a)) { a = a * 2; } return a; } abl(a, b) { super.abl(a, b); let c = b; let d = b.ca; let e = b.b9; let f = this.getEffectiveViewport1(b); let g = this.wu(b); let h = this.zg.or(e, d, f, g); let i = a.h; let j = this.zg; let k = Math.max(0, 0.5 * j.sa); let l = k; l = Math.max(l, h.minLength); let m = this.za.ou(d, e, f); let n = this.za.dj; let o = { $type: Point_$type, x: 0.5, y: 0.5 }; let p = this.ad6; let q = this.ad7; let r = (p > 0 && q > 0); let s = this.ach.count; this.zp.a2(this, this.z6(), runOn(this, this.yy), this.aaf(b), this.aag(b)); this.zp.r = this.ad6; this.zp.s = this.ad7; this.zp.k = this.ad6; this.zp.l = this.ad7; this.zp.t = this.ad5 ? this.jt * 2 : this.jt; let t = false; let u = this.zp.b; if (u != null) { t = true; } let v = this.za; let w = new ScalerParams(1, b.ca, b.b9, v.df); w.c = this.getEffectiveViewport(); let x = 0; let y = 0; for (let z = 0; z < i.count; ++z) { let aa = i._inner[z][0]; let ab = Math.min(i._inner[z][2], h.maxLength); let ac = i._inner[z][1]; let ad = i._inner[z][2]; let ae = i._inner[z][3]; if (t) { this.ade(i, z, s, v, w, b.t); } if (n) { if (isNaN_(aa) || isNaN_(ac) || isNaN_(ad)) { continue; } let af = (b.da.c + z) * b.da.b; if ((b.da.c + z) * b.da.b > this.za.o6 - 1) { if ((af) * b.da.b >= this.za.o5) { af = (af) - (intDivide((this.za.o5), b.da.b)); } } m = ae; if (isNaN_(m)) { continue; } } let ag = c.dj.item(x); x++; let ah = this.zp.k; let ai = this.zp.l; r = (ah > 0 && ai > 0); let aj = null; if (r) { aj = this.aej(d, e, f, aa - (m * 0.5), aa + (m * 0.5), l, ab, o, ah, ai); } else { aj = this.aek(d, e, f, aa - (m * 0.5), aa + (m * 0.5), l, ab, o); } ag.an = aj; this.zp.ad(ag, false, false, false, false); let ak = i._inner[z][2]; if (ak > y) { y = ak; } } c.dc = ViewportUtils.f(y, d, e); c.dd = { $type: Point_$type, x: ViewportUtils.e(o.x, d, e, f), y: ViewportUtils.i(o.y, d, e, f) }; c.dj.count = x; c.dp(); } aeg(a, b, c, d, e, f, g) { if (g == 0) { return; } let h = a.l.width > 0 || a.l.height > 0; let i = a.m.width > 0; if (!h) { let j = a.d; let k = a.f; let l = GeometryUtil.k(j, k); let m = { $type: Point_$type, x: (j.x - k.x) / l, y: (j.y - k.y) / l }; let n = { $type: Point_$type, x: -m.y, y: m.x }; let o = a.j; let p = a.h; let q = GeometryUtil.k(o, p); let r = { $type: Point_$type, x: (p.x - o.x) / q, y: (p.y - o.y) / q }; let s = { $type: Point_$type, x: -r.y, y: r.x }; k = { $type: Point_$type, x: k.x + n.x * g, y: k.y + n.y * g }; j = { $type: Point_$type, x: j.x + n.x * g, y: j.y + n.y * g }; o = { $type: Point_$type, x: o.x + s.x * g, y: o.y + s.y * g }; p = { $type: Point_$type, x: p.x + s.x * g, y: p.y + s.y * g }; if (a.m.width > 0 && a.m.height > 0) { let t = { $type: Point_$type, x: j.x + m.x * g, y: j.y + m.y * g }; let u = { $type: Point_$type, x: k.x + m.x * -g, y: k.y + m.y * -g }; let v = { $type: Point_$type, x: p.x + r.x * g, y: p.y + r.y * g }; let w = { $type: Point_$type, x: o.x + r.x * -g, y: o.y + r.y * -g }; a.d = t; a.f = u; a.h = v; a.j = w; if (Math.abs((c - b) - Math.PI) <= 0.0001) { let x = this.zi.ca; let y = this.zi.b9; let z = this.getEffectiveViewport1(this.zi); let aa = ViewportUtils.e(d.x, x, y, z); let ab = ViewportUtils.i(d.y, x, y, z); let ac = { $type: Point_$type, x: aa, y: ab }; let ad = ViewportUtils.d(e, x, y, z); let ae = ViewportUtils.h(e, x, y, z); let af = Math.min(ad, ae); let ag = j; let ah = GeometryUtil.r(ag, k, ac, af - g); if (!isNaN_(ah.c.x) && !isNaN_(ah.c.y) && !isNaN_(ah.d.x) && !isNaN_(ah.d.y)) { if ((Math.pow(ag.x - ah.c.x, 2) + Math.pow(ag.y - ah.c.y, 2)) < (Math.pow(ag.x - ah.d.x, 2) + Math.pow(ag.y - ah.d.y, 2))) { ag = ah.c; } else { ag = ah.d; } a.d = ag; } let ai = o; ah = GeometryUtil.r(ai, p, ac, af - g); if (!isNaN_(ah.c.x) && !isNaN_(ah.c.y) && !isNaN_(ah.d.x) && !isNaN_(ah.d.y)) { if ((Math.pow(ai.x - ah.c.x, 2) + Math.pow(ai.y - ah.c.y, 2)) < (Math.pow(ai.x - ah.d.x, 2) + Math.pow(ai.y - ah.d.y, 2))) { ai = ah.c; } else { ai = ah.d; } a.j = ai; } a.m = new Size(1, a.m.width - g, a.m.height - g); let aj = ViewportUtils.d(f, x, y, z); let ak = ViewportUtils.h(f, x, y, z); let al = Math.min(aj, ak); ah = GeometryUtil.r(j, k, ac, al + g); if (!isNaN_(ah.c.x) && !isNaN_(ah.c.y) && !isNaN_(ah.d.x) && !isNaN_(ah.d.y)) { let am; if ((Math.pow(k.x - ah.c.x, 2) + Math.pow(k.y - ah.c.y, 2)) < (Math.pow(k.x - ah.d.x, 2) + Math.pow(k.y - ah.d.y, 2))) { am = ah.c; } else { am = ah.d; } a.f = am; } ah = GeometryUtil.r(p, o, ac, al + g); if (!isNaN_(ah.c.x) && !isNaN_(ah.c.y) && !isNaN_(ah.d.x) && !isNaN_(ah.d.y)) { let an; if ((Math.pow(p.x - ah.c.x, 2) + Math.pow(p.y - ah.c.y, 2)) < (Math.pow(p.x - ah.d.x, 2) + Math.pow(p.y - ah.d.y, 2))) { an = ah.c; } else { an = ah.d; } a.h = an; } a.n = new Size(1, a.n.width + g, a.n.height + g); } else { if (g < 0) { let ao = GeometryUtil.w(a.d, a.f, a.j, a.h); if (!isNaN_(ao.x)) { a.d = ao; a.j = ao; } } a.m = new Size(1, a.m.width - g, a.m.height - g); a.n = new Size(1, a.n.width + g, a.n.height + g); } } else { a.f = { $type: Point_$type, x: k.x + m.x * -g, y: k.y + m.y * -g }; a.h = { $type: Point_$type, x: p.x + r.x * g, y: p.y + r.y * g }; let ap = c - b; if (Math.abs((c - b) - Math.PI) <= 0.0001) { let aq = this.zi.ca; let ar = this.zi.b9; let as = this.getEffectiveViewport1(this.zi); let at = ViewportUtils.e(d.x, aq, ar, as); let au = ViewportUtils.i(d.y, aq, ar, as); let av = { $type: Point_$type, x: at, y: au }; let aw = ViewportUtils.d(f, aq, ar, as); let ax = ViewportUtils.h(f, aq, ar, as); let ay = Math.min(aw, ax); if (g > 0) { k = { $type: Point_$type, x: k.x + m.x * -g, y: k.y + m.y * -g }; p = { $type: Point_$type, x: p.x + r.x * g, y: p.y + r.y * g }; } let az = GeometryUtil.r(j, k, av, ay + g); if (!isNaN_(az.c.x) && !isNaN_(az.c.y) && !isNaN_(az.d.x) && !isNaN_(az.d.y)) { let a0; if ((Math.pow(k.x - az.c.x, 2) + Math.pow(k.y - az.c.y, 2)) < (Math.pow(k.x - az.d.x, 2) + Math.pow(k.y - az.d.y, 2))) { a0 = az.c; } else { a0 = az.d; } a.f = a0; } az = GeometryUtil.r(p, o, av, ay + g); if (!isNaN_(az.c.x) && !isNaN_(az.c.y) && !isNaN_(az.d.x) && !isNaN_(az.d.y)) { let a1; if ((Math.pow(p.x - az.c.x, 2) + Math.pow(p.y - az.c.y, 2)) < (Math.pow(p.x - az.d.x, 2) + Math.pow(p.y - az.d.y, 2))) { a1 = az.c; } else { a1 = az.d; } a.h = a1; } a.d = j; a.j = o; a.n = new Size(1, a.n.width + g, a.n.height + g); } else if (ap < Math.PI) { let a2 = GeometryUtil.w(k, j, o, p); if (!isNaN_(a2.x)) { a.d = a2; a.j = a2; } else { a.d = j; a.j = o; } a.n = new Size(1, a.n.width + g, a.n.height + g); } else { j = { $type: Point_$type, x: j.x + m.x * 1000, y: j.y + m.y * 1000 }; o = { $type: Point_$type, x: o.x + r.x * -1000, y: o.y + r.y * -1000 }; let a3 = GeometryUtil.w(k, j, o, p); if (!isNaN_(a3.x)) { a.d = a3; a.j = a3; } else { a.d = j; a.j = o; } a.n = new Size(1, a.n.width + g, a.n.height + g); } } } else { let a4 = a.e; let a5 = a.f; let a6 = GeometryUtil.k(a4, a5); let a7 = { $type: Point_$type, x: (a4.x - a5.x) / a6, y: (a4.y - a5.y) / a6 }; let a8 = { $type: Point_$type, x: -a7.y, y: a7.x }; let a9 = a.j; let ba = a.i; let bb = GeometryUtil.k(a9, ba); let bc = { $type: Point_$type, x: (ba.x - a9.x) / bb, y: (ba.y - a9.y) / bb }; let bd = { $type: Point_$type, x: -bc.y, y: bc.x }; a5 = { $type: Point_$type, x: a5.x + a8.x * g, y: a5.y + a8.y * g }; a4 = { $type: Point_$type, x: a4.x + a8.x * g, y: a4.y + a8.y * g }; a9 = { $type: Point_$type, x: a9.x + bd.x * g, y: a9.y + bd.y * g }; ba = { $type: Point_$type, x: ba.x + bd.x * g, y: ba.y + bd.y * g }; let be = { $type: Point_$type, x: a.d.x + a8.x * g, y: a.d.y + a8.y * g }; let bf = { $type: Point_$type, x: a.k.x + bd.x * g, y: a.k.y + bd.y * g }; let bg = { $type: Point_$type, x: a.g.x + a8.x * g, y: a.g.y + a8.y * g }; let bh = { $type: Point_$type, x: a.h.x + bd.x * g, y: a.h.y + bd.y * g }; if (!i) { a5 = { $type: Point_$type, x: a5.x + a7.x * -g, y: a5.y + a7.y * -g }; bg = { $type: Point_$type, x: bg.x + a7.x * -g, y: bg.y + a7.y * -g }; ba = { $type: Point_$type, x: ba.x + bc.x * g, y: ba.y + bc.y * g }; bh = { $type: Point_$type, x: bh.x + bc.x * g, y: bh.y + bc.y * g }; if (Math.abs((c - b) - Math.PI) <= 0.0001) { let bi = this.zi.ca; let bj = this.zi.b9; let bk = this.getEffectiveViewport1(this.zi); let bl = ViewportUtils.e(d.x, bi, bj, bk); let bm = ViewportUtils.i(d.y, bi, bj, bk); let bn = { $type: Point_$type, x: bl, y: bm }; let bo = ViewportUtils.d(f, bi, bj, bk); let bp = ViewportUtils.h(f, bi, bj, bk); let bq = Math.min(bo, bp); let br = this.ael(bg, a.g, bn, bq + g); bg = !isNaN_(br.x) ? br : bg; br = this.ael(bh, a.h, bn, bq + g); bh = !isNaN_(br.x) ? br : bh; } else { a4 = { $type: Point_$type, x: a4.x + a7.x * 1000, y: a4.y + a7.y * 1000 }; a9 = { $type: Point_$type, x: a9.x + bc.x * -1000, y: a9.y + bc.y * -1000 }; let bs = GeometryUtil.w(a5, a4, bf, ba); be = !isNaN_(bs.x) ? bs : be; a9 = !isNaN_(bs.x) ? bs : a9; } a.d = be; a.e = be; a.j = be; a.k = be; a.f = a5; a.g = bg; a.h = bh; a.i = ba; a.n = new Size(1, a.n.width + g, a.n.height + g); } else { a5 = { $type: Point_$type, x: a5.x + a7.x * -g, y: a5.y + a7.y * -g }; bg = { $type: Point_$type, x: bg.x + a7.x * -g, y: bg.y + a7.y * -g }; ba = { $type: Point_$type, x: ba.x + bc.x * g, y: ba.y + bc.y * g }; bh = { $type: Point_$type, x: bh.x + bc.x * g, y: bh.y + bc.y * g }; be = { $type: Point_$type, x: be.x + a7.x * g, y: be.y + a7.y * g }; a4 = { $type: Point_$type, x: a4.x + a7.x * g, y: a4.y + a7.y * g }; a9 = { $type: Point_$type, x: a9.x + bc.x * -g, y: a9.y + bc.y * -g }; bf = { $type: Point_$type, x: bf.x + bc.x * -g, y: bf.y + bc.y * -g }; if (Math.abs((c - b) - Math.PI) <= 0.0001) { let bt = this.zi.ca; let bu = this.zi.b9; let bv = this.getEffectiveViewport1(this.zi); let bw = ViewportUtils.e(d.x, bt, bu, bv); let bx = ViewportUtils.i(d.y, bt, bu, bv); let by = { $type: Point_$type, x: bw, y: bx }; let bz = ViewportUtils.d(e, bt, bu, bv); let b0 = ViewportUtils.h(e, bt, bu, bv); let b1 = Math.min(bz, b0); let b2 = this.ael(be, a.d, by, b1 - g); be = !isNaN_(b2.x) ? b2 : be; b2 = this.ael(bf, a.k, by, b1 - g); bf = !isNaN_(b2.x) ? b2 : bf; let b3 = ViewportUtils.d(f, bt, bu, bv); let b4 = ViewportUtils.h(f, bt, bu, bv); let b5 = Math.min(b3, b4); b2 = this.ael(bg, a.g, by, b5 + g); bg = !isNaN_(b2.x) ? b2 : bg; b2 = this.ael(bh, a.h, by, b5 + g); bh = !isNaN_(b2.x) ? b2 : bh; } else { if (g < 0) { let b6 = GeometryUtil.w(a4, a5, a9, ba); if (!isNaN_(b6.x)) { be = b6; a4 = b6; a9 = b6; bf = b6; } } } a.d = be; a.e = a4; a.j = a9; a.k = bf; a.f = a5; a.g = bg; a.h = bh; a.i = ba; a.m = new Size(1, a.m.width - g, a.m.height - g); a.n = new Size(1, a.n.width + g, a.n.height + g); } } } ael(a, b, c, d) { let e = GeometryUtil.r(a, b, c, d); if (!isNaN_(e.c.x) && !isNaN_(e.c.y) && !isNaN_(e.d.x) && !isNaN_(e.d.y)) { let f; if ((Math.pow(a.x - e.c.x, 2) + Math.pow(a.y - e.c.y, 2)) < (Math.pow(a.x - e.d.x, 2) + Math.pow(a.y - e.d.y, 2))) { return e.c; } else { return e.d; } } return { $type: Point_$type, x: NaN, y: NaN }; } aek(a, b, c, d, e, f, g, h) { let i = SliceCoords.b(a, b, c, d, e, f, g, h); let j = this.zp.m; let k = Math.abs((e - d) - (Math.PI * 2)) <= 0.0001; if (this.ad5 && !k) { this.aeg(i, d, e, h, f, g, 0.5); } let l = new PathFigure(); l._startPoint = i.d; l._isClosed = true; l._segments.add(((() => { let $ret = new LineSegment(1); $ret.c = i.f; return $ret; })())); l._segments.add(((() => { let $ret = new ArcSegment(); $ret.e = i.h; $ret.f = i.n; $ret.d = 1; $ret.b = i.c; return $ret; })())); l._segments.add(((() => { let $ret = new LineSegment(1); $ret.c = i.j; return $ret; })())); if (!this.ad5 || (i.m.width > 0 && i.m.height > 0)) { l._segments.add(((() => { let $ret = new ArcSegment(); $ret.e = i.d; $ret.f = i.m; $ret.d = 0; $ret.b = i.c; return $ret; })())); } let m = new PathGeometry(); m.c.add(l); return m; } ad3(a, b, c, d, e, f, g, h) { let i = SliceCoords.b(a, b, c, d, e, f, g, h); if (isNaN_(i.n.width) || isNaN_(d) || isNaN_(e)) { return null; } let j = ViewportUtils.e(0.5, a, b, c); let k = ViewportUtils.i(0.5, a, b, c); return new PieSliceCollisionGeometry(j, k, i.n.width, i.m.width, d, e); } aej(a, b, c, d, e, f, g, h, i, j) { let k = SliceCoords.a(a, b, c, d, e, f, g, h, i, j); if (k == null) { return this.aek(a, b, c, d, e, f, g, h); } let l = this.zp.m; let m = Math.abs((e - d) - (Math.PI * 2)) <= 0.0001; if (this.ad5 && !m) { this.aeg(k, d, e, h, f, g, 0.5); } let n = new PathFigure(); n._startPoint = k.d; n._isClosed = true; let o = ((d + ((e - d) * 0.5)) * 180 / Math.PI) + 90; let p = new Size(1, k.l.width * (f / g), k.l.height * (f / g)); if (!this.ad5 || (k.m.width > 0 && k.m.height > 0)) { n._segments.add(((() => { let $ret = new ArcSegment(); $ret.e = k.e; $ret.f = p; $ret.c = o; $ret.d = 1; $ret.b = false; return $ret; })())); } n._segments.add(((() => { let $ret = new LineSegment(1); $ret.c = k.f; return $ret; })())); n._segments.add(((() => { let $ret = new ArcSegment(); $ret.e = k.g; $ret.f = k.l; $ret.c = o; $ret.d = 1; $ret.b = false; return $ret; })())); n._segments.add(((() => { let $ret = new ArcSegment(); $ret.e = k.h; $ret.f = k.n; $ret.d = 1; $ret.b = k.c; return $ret; })())); n._segments.add(((() => { let $ret = new ArcSegment(); $ret.e = k.i; $ret.f = k.l; $ret.c = o; $ret.d = 1; $ret.b = false; return $ret; })())); n._segments.add(((() => { let $ret = new LineSegment(1); $ret.c = k.j; return $ret; })())); if (!this.ad5 || (k.m.width > 0 && k.m.height > 0)) { n._segments.add(((() => { let $ret = new ArcSegment(); $ret.e = k.k; $ret.f = p; $ret.c = o; $ret.d = 1; $ret.b = false; return $ret; })())); n._segments.add(((() => { let $ret = new ArcSegment(); $ret.e = k.d; $ret.f = k.m; $ret.d = 0; $ret.b = k.c; return $ret; })())); } let q = new PathGeometry(); q.c.add(n); return q; } rh(a, b, c, d) { super.rh(a, b, c, d); switch (b) { case RadialPieSeries.$$p[0]: case RadialPieSeries.$$p[1]: case "UseInsetOutlines": this.ra(); break; case "FastItemsSource": if (c != null) { if (this.ad2 != null) { c.deregisterColumn(this.ad2); } } if (d != null) { if (this.aeb != null) { this.ad2 = this.dn(this.aeb); } } break; case "LegendLabelMemberPath": if (this.dp != null) { this.dp.deregisterColumn(this.ad2); this.ad2 = this.dn(this.aeb); this.pk(); this.pz(); } break; } } wy(a) { let b = this.ad0.ca; let c = this.ad0.b9; let d = this.getEffectiveViewport1(this.ad0); let e = this.wu(this.ad0); let f = this.zg.or(c, b, d, e); let g = { $type: Point_$type, x: 0.5, y: 0.5 }; let h = GeometryUtil.j(g, a); let i = this.zj.h; let j = 0; for (let k = 0; k < i.count; k++) { let l = i._inner[k][0]; let m = Math.min(i._inner[k][2], f.maxLength); let n = i._inner[k][3]; if (isNaN_(n)) { continue; } l = l % 6.28318531; if (l < 0) { l += 6.28318531; } if (h >= l - (n * 0.5) && h <= l + (n * 0.5)) { let o = Math.max(0, 0.5 * this.zg.sa); let p = o; p = Math.max(p, f.minLength); let q = SliceCoords.b(b, c, d, l - (n * 0.5), l + (n * 0.5), p, m, g); let r = GeometryUtil.u({ $type: Point_$type, x: ViewportUtils.e(g.x, b, c, d), y: ViewportUtils.i(g.y, b, c, d) }, MathUtil.f(l), q.n.width); let s = 1.7976931348623157E+308; let t = 1.7976931348623157E+308; let u = -1.7976931348623157E+308; let v = -1.7976931348623157E+308; s = Math.min(s, q.d.x); s = Math.min(s, q.f.x); s = Math.min(s, q.h.x); s = Math.min(s, q.j.x); s = Math.min(s, r.x); t = Math.min(t, q.d.y); t = Math.min(t, q.f.y); t = Math.min(t, q.h.y); t = Math.min(t, q.j.y); t = Math.min(t, r.y); u = Math.max(u, q.d.x); u = Math.max(u, q.f.x); u = Math.max(u, q.h.x); u = Math.max(u, q.j.x); u = Math.max(u, r.x); v = Math.max(v, q.d.y); v = Math.max(v, q.f.y); v = Math.max(v, q.h.y); v = Math.max(v, q.j.y); v = Math.max(v, r.y); return new Rect(0, s, t, u - s, v - t); } j++; } return new Rect(0, 0, 0, 0, 0); } ky(a) { if (this.za != null && this.za.dj && a == this.za.othersIndex) { return null; } if (this.ad2 != null) { return this.ad2.item(a); } return null; } ed(a, b, c, d, e) { if (super.ed(a, b, c, d, e)) { let f = typeCast(ProportionalCategoryAngleAxis.$, this.za) !== null && this.za.hasOthersCategory; if (e && (this.adz == 1 || (this.adz == 2 && !f))) { let g = this.za; let h = new ScalerParams(1, this.dc.xn, this.w3, g.df); h.c = this.getEffectiveViewport1(this.cw); let i = this.zg; let j = new ScalerParams(1, this.dc.xn, this.w3, i.df); j.c = this.getEffectiveViewport1(this.cw); let k = this.aae; for (let l = 0; l < this.dp.count; l++) { let m = this.dp.item(l); let n = NaN; if (m != null) { n = this.jf(m); } if (n == 0) { let o = new SeriesPointOfInterest(); o.f = this.abe(n, m, l, d, k, c, b, false); o.b = ((() => { let $ret = new DataContext(); $ret.item = m; $ret.series = this; return $ret; })()); o.g = this.vr; o.c = l; if (this.ha) { o.g = this.vy(l); } let p = false; for (let q = 0; q < a.count; q++) { if (o.c < a._inner[q].c) { a.insert(q, o); p = true; break; } } if (!p) { a.add(o); } } } } return true; } return false; } ak(a, b) { let c = new List$1(ChartSelection.$, 0); this.qa(a, c, b); return c.toArray(); } qa(a, b, c) { if (this.zb == 0) { super.qa(a, b, c); return; } let d = this.cw.ca; let e = this.cw.b9; let f = this.getEffectiveViewport1(this.cw); let g = this.dc.xv(this.w3, this.getEffectiveViewport(), d); let h = this.zg.or(e, d, f, g); let i = { $type: Point_$type, x: 0.5, y: 0.5 }; let j = this.zg; let k = Math.max(0, 0.5 * j.sa); let l = k; l = Math.max(l, h.minLength); let m = this.za.ou(d, e, f); let n = this.za != null && this.za.dj; let o = new CollisionRect(0, this.dc.xs(a)); for (let p = 0; p < this.za.o6; p++) { let q = typeCast(RadialBaseView.$, this.cw); let r = q.da.getBucket(p); let s = this.acs(this.za, d, e, f); if (n) { m = this.z9(p, d, e, f); s = this.acr(p, this.za, d, e, f); if (isNaN_(s)) { s = 0; } } r[0] = this.za.getScaledAngle(r[0]) + s; let t = r[0]; let u = Math.min(this.zh.b.sh(r[2]), h.maxLength); let v = this.ad3(d, e, f, t - (m * 0.5), t + (m * 0.5), l, u, i); if (v.collidesWithHeavy(o)) { if (c == 7 || c == 6) { b.add(((() => { let $ret = new ChartSelection(); $ret.series = this; return $ret; })())); return; } if (c == 2 || c == 1) { b.add(((() => { let $ret = new ChartSelection(); $ret.item = this.dp.item(p); return $ret; })())); } else { b.add(((() => { let $ret = new ChartSelection(); $ret.item = this.dp.item(p); $ret.series = this; return $ret; })())); } } } } } RadialPieSeries.$t = /*@__PURE__*/ markType(RadialPieSeries, 'RadialPieSeries', AnchoredRadialSeries.$); RadialPieSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, RadialPieSeries, 'raisePropertyChanged', ['RadiusX:ad6:aeh', [1, 2], 'RadiusY:ad7:aei', [1, 2]]); return RadialPieSeries; })(); /** * @hidden */ export let RadialPieSeriesView = /*@__PURE__*/ (() => { class RadialPieSeriesView extends AnchoredRadialSeriesView { constructor(a) { super(a); this.di = null; this.dj = null; this.dk = null; this.dq = new Path(); this.di = a; this.dj = ((() => { let $ret = new Pool$1(Path.$); $ret.create = runOn(this, this.dr); $ret.activate = runOn(this, this.dl); $ret.disactivate = runOn(this, this.dn); $ret.destroy = runOn(this, this.dm); return $ret; })()); } a4() { super.a4(); this.dk = new List$1(Path.$, 0); if (!this.t) { this.c9.xl = Defaults.c; this.c9.jt = Defaults.i; } } dr() { let a = ((() => { let $ret = new Path(); $ret.dataContext = ((() => { let $ret = new DataContext(); $ret.series = this.f; return $ret; })()); return $ret; })()); this.dk.add(a); a._visibility = 1; return a; } dl(a) { a._visibility = 0; } dn(a) { a._visibility = 1; } dm(a) { this.dk.remove(a); } bs(a, b) { super.bs(a, b); let c = a; } ak(a) { return this.dk._inner[a]; } aj(a) { let b = this.dk._inner[a]; this.dq._visibility = b._visibility; this.dq.an = b.an; let c = this.b4(a); this.dq._fill = c; this.dq._stroke = c; this.dq.ad = this.f.ig; return this.dq; } bj(a, b) { super.bj(a, b); if (a.d) { for (let c = 0; c < this.dk.count; c++) { let d = this.ai(c, b); if (this.di.ad5) { a.aa(); a.ac(d); } a.t(d); if (this.di.ad5) { a.z(); } } } } dp() { this.a2(); } ax(a) { super.ax(a); let b = 0; for (let c of fromEnum(this.dj.a)) { this.f.bc.exportPathData(a, c, "slice" + b, ["Main", "Fill"]); b++; } } } RadialPieSeriesView.$t = /*@__PURE__*/ markType(RadialPieSeriesView, 'RadialPieSeriesView', AnchoredRadialSeriesView.$); return RadialPieSeriesView; })();