igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,315 lines (1,314 loc) • 45.8 kB
JavaScript
/*
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 { 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
*/
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.im;
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.zp;
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.r9(c, d, b));
let g = Math.ceil(e.r8(c, d, b));
if (e.dn) {
g = Math.ceil(e.r9(c, d, b));
f = Math.floor(e.r8(c, d, b));
}
if (g < f) {
g = e.qd + g;
}
let h = this.a.c9.zv;
let i = h != null ? h.ti : 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 {
rj(a) {
super.rj(a);
this.zx = a;
}
constructor() {
super();
this.z4 = null;
this.aab = false;
this.aaa = false;
this.z8 = null;
this.z9 = null;
this.assigningRadialStyle = null;
this.assigningRadialMarkerStyle = null;
this.zi = null;
this.zm = null;
this.zj = null;
this.zl = null;
this.zk = null;
this.z0 = new RadialFrame(4);
this.z1 = new RadialFrame(4);
this.zy = new RadialFrame(4);
this.zw = null;
this.zu = null;
this.zu = new CategoryTransitionSourceFramePreparer();
this.z4 = new RadialSeriesRenderManager();
}
abz() {
if (this.dd.g) {
this.dd.t();
}
}
get categoryAxis() {
return this.zp;
}
a0() {
return this.zp;
}
b3() {
if (this.b4 == 0) {
return 1;
}
else {
return super.b3();
}
}
aan(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.zw.d(0, this.zv.tr, d, e, f);
let i = this.zw.e(0, this.zv.tr, 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.io / 2 + this.i3(c))) {
return true;
}
if (CoreGeometryUtil.i(a, { $type: Point_$type, x: h, y: i }, k[0], this.io / 2 + this.i3(c))) {
return true;
}
if (CoreGeometryUtil.i(a, k[k.length - 1], { $type: Point_$type, x: h, y: i }, this.io / 2 + this.i3(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.io / 2 + this.i3(c))) {
return true;
}
if (CoreGeometryUtil.i(a, { $type: Point_$type, x: h, y: i }, k[0], this.io / 2 + this.i3(c))) {
return true;
}
if (CoreGeometryUtil.i(a, k[1], { $type: Point_$type, x: h, y: i }, this.io / 2 + this.i3(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.zz();
let c = this.cw.ca;
let d = this.cw.b9;
let e = this.cw.getEffectiveViewport();
let f = this.an(this.a0(), b.k, this.aav(this.cw), this.aaw(this.cw), this.w4(a), true);
if (f == null) {
return null;
}
let g = f[0];
let h = f[1];
let i = this.zw.d(g[0], g[2], c, d, e);
let j = this.zw.e(g[0], g[2], c, d, e);
let k = this.zw.d(h[0], h[2], c, d, e);
let l = this.zw.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.zz();
let c = this.cw.ca;
let d = this.cw.b9;
let e = this.cw.getEffectiveViewport();
let f = this.an(this.a0(), b.k, this.aav(this.cw), this.aaw(this.cw), this.w4(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.zw.d(g[0], g[1], c, d, e);
let l = this.zw.e(g[0], g[1], c, d, e);
let m = this.zw.d(h[0], h[1], c, d, e);
let n = this.zw.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;
}
g4(a, b) {
if (this.g3(a, b)) {
return true;
}
if (this.x4(a, b)) {
return true;
}
return false;
}
zd(a, b) {
return null;
}
w3(a) {
let b = this.zp;
let c = this.zv;
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.zw.h(a.x, a.y, this.dc.yv, this.dc.zd, this.getEffectiveViewport(), d, e);
d = f.p5;
e = f.p6;
return { $type: Point_$type, x: d, y: e };
}
p8(a) {
if (this.zp != null && this.zp.ds && this.zp.te(a)) {
if (this.fl) {
this.ba.a$y(this, a, this.zp.qe - 1);
}
return;
}
super.p8(a);
}
eg(a) {
if (this.zp != null && this.zp.ds && this.zp.hasOthersCategory) {
if (this.zp.te(a)) {
return true;
}
}
return super.eg(a);
}
p6(a) {
if (this.zp != null && this.zp.ds && this.zp.te(a)) {
if (this.fl) {
this.ba.a$ao(this, a, this.dp.count - 1);
}
return;
}
super.p6(a);
}
ed(a, b, c, d, e) {
if (!this.hasMarkers) {
return false;
}
let f = this.zp;
let g = new ScalerParams(1, this.dc.yv, this.xf, f.dn);
g.c = this.getEffectiveViewport1(this.cw);
let h = this.zv;
let i = new ScalerParams(1, this.dc.yv, this.xf, h.dn);
i.c = this.getEffectiveViewport1(this.cw);
let j = this.aau;
a.clear();
this.xt.cw((k) => {
if (k._visibility == 0) {
let l = new SeriesPointOfInterest();
let m = k.n;
let n = k.o;
if (!e && (m < this.xf.left || m > this.xf.right || n < this.xf.top || n > this.xf.bottom)) {
return;
}
let o = null;
if (k.content != null) {
o = k.content.item;
}
let p;
let q;
let r = this.zw.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.al;
l.f = this.abw(s, o, t, d, j, c, b, false);
l.b = k.content;
l.g = this.v2;
l.c = k.al;
if (this.hh) {
l.g = this.v9(k.al);
}
l.a = this.ar(k.al, k.am);
a.add(l);
}
});
return true;
}
k3(a, b) {
let c = null;
if (this.dp != null) {
if (a >= 0 && a < this.dp.count) {
c = this.dp.item(a);
}
if (this.zp != null && this.zp.ds && a == this.zp.othersIndex) {
c = this.zp.tr(false);
}
}
let d = NaN;
if (c != null) {
d = this.jm(c);
}
let e = this.abw(d, c, a, this.aat >= 0 ? this.aat : 5, this.aau, false, false, b);
if (e != null) {
return e;
}
return super.k3(a, b);
}
abw(a, b, c, d, e, f, g, h) {
let i = null;
let j = this.zp.ds && this.zp.te(b);
let k = this.z2;
if (h) {
k = this.z3;
}
if (k == 0) {
if (h) {
k = 5;
}
else {
k = 6;
}
}
if ((h && ((this.zj != null) || (j && this.zk != null))) || (!h && ((this.zm != null) || (j && this.zl != null)))) {
let l = this.aaq(a, b, c, d, f);
let m = this.aar(a, b, c, e, f);
let n = this.abb(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.zk;
}
else {
p = this.zl;
}
if (p == null) {
if (h) {
p = this.zj;
}
else {
p = this.zm;
}
}
}
else {
if (h) {
p = this.zj;
}
else {
p = this.zm;
}
}
i = p.i(o);
}
else if (k != 1) {
switch (k) {
case 2:
i = this.abc(a, b, c, d, f);
break;
case 3:
i = this.abd(a, b, c, e, f);
break;
case 4:
{
let q = this.abc(a, b, c, d, f);
let r = this.abd(a, b, c, e, f);
i = q + this.aa2 + r;
}
break;
case 5:
i = this.abb(c);
break;
case 6:
{
let s = this.abc(a, b, c, d, f);
let t = this.abb(c);
i = t + this.aa2 + s;
}
break;
case 7:
{
let u = this.abd(a, b, c, e, f);
let v = this.abb(c);
i = v + this.aa2 + u;
}
break;
case 8:
{
let w = this.abc(a, b, c, d, f);
let x = this.abd(a, b, c, e, f);
let y = this.abb(c);
i = y + this.aa2 + w + this.aa2 + x;
}
break;
}
}
else {
if (g) {
i = this.abc(a, b, c, d, f);
}
else {
i = this.abb(c);
}
}
return i;
}
abb(a) {
let b = this.zp;
let c = this.au(true);
if (this.zp != null && this.zp.ds && this.zp.hasOthersCategory && a == this.zp.othersIndex) {
if (this.zi != null) {
c = this.zi;
}
}
if (c != null) {
let d = super.k3(a, false);
if (d != null) {
return c.i(d);
}
else {
return null;
}
}
else {
return b.ja(a);
}
}
abc(a, b, c, d, e) {
let f = a;
f = this.aay(c, f);
if (e) {
return this.aa0(f, d);
}
else {
a = this.jm(b);
if (!isNaN_(a)) {
return this.aa0(a, d);
}
else {
return this.aa0(f, d);
}
}
}
aaq(a, b, c, d, e) {
let f = a;
f = this.aay(c, f);
if (e) {
return f;
}
else {
a = this.jm(b);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
}
abd(a, b, c, d, e) {
if (this.zp == null || !this.zp.ds) {
return this.abc(a, b, c, d, e);
}
let f = this.zp.tl(c);
if (e) {
return this.aa0(f, d) + "%";
}
else {
a = this.zp.tl(c);
if (!isNaN_(a)) {
return this.aa0(a, d) + "%";
}
else {
return this.aa0(f, d) + "%";
}
}
}
aar(a, b, c, d, e) {
if (this.zp == null || !this.zp.ds) {
return this.aaq(a, b, c, d, e);
}
let f = this.zp.tl(c);
if (e) {
return f;
}
else {
a = this.zp.tl(c);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
}
aay(a, b) {
return b;
}
aa0(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_fx() {
return true;
}
get_fh() {
return true;
}
z5(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;
}
aam() {
return false;
}
h1() {
let a = super.h1();
if (this.aam()) {
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.aam()) {
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.sk));
a.add(c);
}
if (!this.aam()) {
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.sk));
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;
}
k6() {
if (this.d4()) {
return this.bo.z1;
}
else {
return this.bo.zy;
}
}
z6(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.zx.da.c;
let e = this.zx.da.d;
let f = this.zx.da.b;
if (f == 0) {
return null;
}
let g = this.zz();
let h = this.dp.count;
let i = this.zp;
let j = -1;
let k = -1;
let l = this.ke(b);
if (isNaN_(b.x) || isNaN_(b.y)) {
if (a != null && this.dp != null) {
if (this.zp.ds && this.zp.te(a)) {
l = this.zp.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;
}
z7(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.zx.da.c;
let e = this.zx.da.d;
let f = this.zx.da.b;
if (f == 0) {
return null;
}
let g = this.zz();
let h = this.dp.count;
let i = this.zp;
let j = -1;
let k = -1;
let l = this.ke(b);
if (isNaN_(b.x) || isNaN_(b.y)) {
if (a != null && this.dp != null) {
if (this.zp.ds && this.zp.te(a)) {
l = this.zp.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.f3(this.by) && !c) {
let d = this.z6(a, b, this.z8);
this.z8 = d;
return d;
}
else {
let e = this.z5(a, b, this.z8);
this.z8 = e;
return e;
}
}
di(a, b, c) {
if (this.f3(this.by) && !c) {
let d = this.z7(a, b, this.z9);
this.z9 = d;
return d;
}
else {
let e = this.z5(a, b, this.z9);
e.d = true;
this.z9 = e;
return e;
}
}
aal() {
return (this.assigningRadialStyle != null && this.aab) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
}
aak() {
return (this.assigningRadialMarkerStyle != null && this.aaa) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
}
ab2(a) {
if (this.assigningRadialStyle != null && this.aab) {
this.assigningRadialStyle(this, a);
}
}
ab1(a) {
if (this.assigningRadialMarkerStyle != null && this.aaa) {
this.assigningRadialMarkerStyle(this, a);
}
}
aav(a) {
return a.da.b;
}
aaw(a) {
return a.da.c;
}
ai() {
return [this.zp, this.zv];
}
tb(a, b) {
this.zx.da.e(this.im);
this.sa(false);
}
ta(a, b) {
if (this.g9 && this.j1 < 0.05 && (this.dc == null || !this.dc.gj())) {
this.ha = true;
this.hd = false;
this.gs = false;
}
this.zx.da.e(this.im);
this.sa(false);
}
rs(a, b, c, d) {
super.rs(a, b, c, d);
switch (b) {
case RadialBase.$$p[6]:
this.sa(false);
break;
case RadialBase.$$p[14]:
this.pt();
this.sa(false);
break;
case "SeriesViewer":
if (c != null && d == null) {
if (this.zp != null) {
this.zp.cx(this);
}
if (this.zv != null) {
this.zv.cx(this);
}
}
if (c == null && d != null) {
if (this.zp != null) {
this.zp.d4(this);
}
if (this.zv != null) {
this.zv.d4(this);
}
}
this.zx.da.e(this.im);
this.sa(false);
break;
case RadialBase.$$p[0]:
if (this.zp != null && this.zv != null) {
this.zw = new RadialAxes(this.zv, this.zp);
}
if (c != null) {
c.cx(this);
}
if (d != null) {
d.d4(this);
}
this.zx.da.e(this.im);
this.sa(false);
break;
case RadialBase.$$p[24]:
if (this.zp != null && this.zv != null) {
this.zw = new RadialAxes(this.zv, this.zp);
}
if (c != null) {
c.cx(this);
}
if (d != null) {
d.d4(this);
}
this.zx.da.e(this.im);
if (this.zv == null || !this.zv.ee()) {
this.sa(false);
}
break;
case RadialBase.$$p[3]:
case RadialBase.$$p[4]:
if (this.aa4 != null) {
this.zi = new BindingFormatter();
this.zi.j = this.aa4;
this.zi.d = this.zc;
}
else {
this.zi = null;
}
break;
case RadialBase.$$p[21]:
case RadialBase.$$p[22]:
if (this.abt != null) {
this.zm = new BindingFormatter();
this.zm.j = this.abt;
this.zm.d = this.zh;
}
else {
this.zm = null;
}
break;
case RadialBase.$$p[12]:
case RadialBase.$$p[13]:
if (this.abh != null) {
this.zj = new BindingFormatter();
this.zj.j = this.abh;
this.zj.d = this.ze;
}
else {
this.zj = null;
}
break;
case RadialBase.$$p[19]:
case RadialBase.$$p[20]:
if (this.abt != null) {
this.zl = new BindingFormatter();
this.zl.j = this.abq;
this.zl.d = this.zg;
}
else {
this.zl = null;
}
break;
case RadialBase.$$p[17]:
case RadialBase.$$p[18]:
if (this.abh != null) {
this.zk = new BindingFormatter();
this.zk.j = this.abn;
this.zk.d = this.zf;
}
else {
this.zk = null;
}
break;
case "SyncLink":
if (this.c4 != null && this.dc != null) {
this.zx.da.e(this.im);
this.sa(false);
}
break;
case "TransitionProgress":
this.z1.d(this.j1, this.z0, this.zy);
if (this.d7(this.cw)) {
return;
}
if (this.j1 == 1) {
this.zy.ab();
this.ab3(this.zy, this.zx);
if (this.g9) {
this.g9 = false;
this.pl();
this.dd.r = truncate(this.jj());
this.dd.b = this.de;
}
if (this.hc) {
this.hc = false;
this.pl();
this.dd.r = truncate(this.jj());
this.dd.b = this.de;
this.ri();
}
this.q5();
}
else {
this.ab3(this.z1, this.zx);
}
if (this.dc != null) {
this.dc.sv(this);
}
break;
case RadialBase.$$p[8]:
this.sa(false);
this.q2();
break;
case "VisibilityProxy":
if (EnumUtil.getEnumValue(Visibility_$type, c) != 0 && EnumUtil.getEnumValue(Visibility_$type, d) == 0) {
this.zx.da.e(this.im);
}
break;
case RadialBase.$$p[10]:
this.aab = this.aaj();
this.sa(false);
break;
case RadialBase.$$p[9]:
this.aaa = this.aai();
this.sa(false);
break;
}
}
aaj() {
return this.aag;
}
aai() {
return this.aaf;
}
aad(a) {
if (typeCast(NumericRadiusAxis.$, a) !== null) {
return true;
}
return false;
}
aac(a) {
if (typeCast(CategoryAngleAxis.$, a) !== null) {
return true;
}
return false;
}
ky(a) {
let b = this.ke(a);
let c = false;
if (this.zp != null && this.zp.ds) {
let d = this.zp;
let e = d.hasOthersCategory && b == this.zp.qd - 1;
c = e;
}
if (c) {
return this.zp.tr(true);
}
return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
}
aao(a) {
let b = this.cw.ca;
let c = this.cw.b9;
let d = this.cw.getEffectiveViewport();
if (this.zp != null && !b.isEmpty && !c.isEmpty && this.zw != null) {
let e = this.zw.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;
}
i0(a) {
let b = this.cw.ca;
let c = this.cw.b9;
let d = this.getEffectiveViewport1(this.cw);
let e = -1;
if (this.zp != null && !b.isEmpty && !c.isEmpty && this.zw != null) {
let f = this.zw.c(a, b, c, d);
if (f < 0) {
f += Math.PI * 2;
}
if (f > Math.PI * 2) {
f -= Math.PI * 2;
}
let g = this.zp.getUnscaledAngle(f);
if (this.zp.categoryMode != 0) {
g -= 0.5;
}
e = g;
}
return e;
}
aap(a, b, c, d) {
return this.zp.r7(a, b, c, d);
}
ke(a) {
let b = truncate(Math.round(this.i0(a)));
let c = false;
if (this.zp != null && this.zp.ds) {
let d = this.zp;
let e = d.hasOthersCategory && b == this.zp.qd - 1;
c = e;
}
if (c) {
let f = this.zp;
return this.zp.qd - 1;
}
if (this.dp != null && b == this.dp.count) {
b = 0;
}
return b;
}
gl(a) {
return false;
}
zz() {
let a = this.zy;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.z1;
}
return a;
}
qr() {
super.qr();
if (this.zp != null) {
this.zp.l0(false);
}
if (this.zv != null) {
this.zv.l0(false);
}
}
hm(a, b, c) {
let d = true;
let e = c;
if (!super.hm(a, b, c) || !c.r() || b.isEmpty || a.isEmpty || this.zp == null || this.zp.itemsSource == null || this.zv == null || this.zw == null || this.dp == null || this.zp.b7 == null || this.zv.b7 == null || this.zv.qy == this.zv.qx) {
e.da.b = 0;
d = false;
}
return d;
}
zs() {
return 1;
}
aas() {
return Math.max(0, 0.5 * this.zv.th);
}
gv() {
return this.aah;
}
gw() {
return true;
}
sb(a) {
super.sb(a);
this.zx.da.e(this.im);
if (this.d7(this.cw)) {
this.zy.ae();
this.z1.ae();
this.z0.ae();
return;
}
if (this.gz) {
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.ab3(this.z1, this.zx);
}
else {
this.ab3(this.zy, this.zx);
}
return;
}
if (this.gn(a)) {
let b = this.z0;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.z0 = this.z1;
this.z1 = b;
}
else {
this.z0 = this.zy;
this.zy = b;
}
let c = false;
this.ab0(this.zy, this.zx);
if (this.hb) {
this.dd.w();
this.dd.r = truncate(this.jk());
this.dd.b = this.df != null ? this.df : this.de;
if (this.hc) {
let d = this.z1;
this.z1 = this.z0;
this.z0 = d;
c = true;
}
this.zu.x(this, this.z0, this.zy, this.isVertical, this.zp, this.zv, this.zt, this.zs(), this.c6, this.c5(), runOn(this, this.aas), this.zx.b9);
if (this.hc) {
let e = this.z1;
this.z1 = this.z0;
this.z0 = e;
}
this.hc = false;
}
if (this.he) {
this.dd.w();
this.dd.r = truncate(this.jl());
this.dd.b = this.dg != null ? this.dg : this.de;
if (this.g9) {
let f = this.z1;
this.z1 = this.z0;
this.z0 = f;
c = true;
}
this.zu.x(this, this.z0, this.zy, this.isVertical, this.zp, this.zv, this.zt, this.zs(), this.c6, this.c5(), runOn(this, this.aas), this.zx.b9);
let g = this.zy;
this.zy = this.z0;
this.z0 = g;
if (this.g9) {
let h = this.z1;
this.z1 = this.z0;
this.z0 = h;
}
this.g9 = false;
}
this.eb = false;
if (!c) {
this.pg();
}
this.sr();
if (this.hb) {
this.ha = false;
this.g9 = true;
}
if (this.he) {
this.hd = false;
this.hc = true;
}
}
else {
this.ab0(this.zy, this.zx);
this.ab3(this.zy, this.zx);
}
}
aax() {
if (this.bo != null) {
let a = this.bo;
return a.aax();
}
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.zp == this.zp && d.preferredCategoryMode(d.zp) == 2) {
b++;
}
}
return -1;
}
ak(a, b) {
let c = new List$1(ChartSelection.$, 0);
this.qk(a, c, b);
return c.toArray();
}
qk(a, b, c) {
let d = this.cw.ca;
let e = this.cw.b9;
let f = this.cw.getEffectiveViewport();
let g, h;
let i = this.zw.f(this.dc.y0(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.zp.qe - 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.zp.qe);
if (c == 2 || c == 1) {
b.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.zp.po.item(l);
return $ret;
})()));
}
else {
b.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.zp.po.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:zp:ab4', [CategoryAngleAxis.$, null], 'AutoCalloutLabelPrecision:aat:ab5', [1, -1], 'AutoCalloutLabelValueSeparator:aa2:ab6', [2, " - "], 'AutoCalloutOthersLabelFormat:aa4:ab7', [2, null], 'AutoCalloutOthersLabelFormatSpecifiers:zc:ab8', [Array_$type, null], 'AutoCalloutPercentagePrecision:aau:ab9', [1, 2], 'AutoCalloutRadialLabelMode:z2:aca', [RadialLabelMode_$type, /*@__PURE__*/ enumGetBox(RadialLabelMode_$type, 0)], 'CategoryCollisionMode:zq:acb', [CategoryCollisionMode_$type, /*@__PURE__*/ enumGetBox(CategoryCollisionMode_$type, 1)], 'ClipSeriesToBounds:aae:acc', [0, false], 'IsCustomRadialMarkerStyleAllowed:aaf:acd', [0, false], 'IsCustomRadialStyleAllowed:aag:ace', [0, false], 'IsTransitionInEnabled:aah:acf', [0, false], 'LegendProportionalRadialLabelFormat:abh:acg', [2, null], 'LegendProportionalRadialLabelFormatSpecifiers:ze:ach', [Array_$type, null], 'LegendRadialLabelMode:z3:aci', [RadialLabelMode_$type, /*@__PURE__*/ enumGetBox(RadialLabelMode_$type, 0)], 'OthersCategoryBrush:act:acj', [Brush.$, null], 'OthersCategoryOutline:acu:ack', [Brush.$, null], 'OthersLegendProportionalRadialLabelFormat:abn:acl', [2, null], 'OthersLegendProportionalRadialLabelFormatSpecifiers:zf:acm', [Array_$type, null], 'OthersProportionalRadialLabelFormat:abq:acn', [2, null], 'OthersProportionalRadialLabelFormatSpecifiers:zg:aco', [Array_$type, null], 'ProportionalRadialLabelFormat:abt:acp', [2, null], 'ProportionalRadialLabelFormatSpecifiers:zh:acq', [Array_$type, null], 'TransitionInMode:zt:acr', [CategoryTransitionInMode_$type, /*@__PURE__*/ enumGetBox(CategoryTransitionInMode_$type, 0)], 'ValueAxis:zv:acs', [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;
})();