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.il;
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.zl;
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.r6(c, d, b));
let 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;
}
let h = this.a.c9.zr;
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 {
ri(a) {
super.ri(a);
this.zt = a;
}
constructor() {
super();
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();
}
abv() {
if (this.dd.g) {
this.dd.t();
}
}
get categoryAxis() {
return this.zl;
}
a0() {
return this.zl;
}
b3() {
if (this.b4 == 0) {
return 1;
}
else {
return super.b3();
}
}
aaj(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.zs.d(0, this.zr.tr, d, e, f);
let i = this.zs.e(0, this.zr.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.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;
}
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.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;
}
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.zv();
let c = this.cw.ca;
let d = this.cw.b9;
let e = this.cw.getEffectiveViewport();
let f = this.an(this.a0(), b.k, this.aar(this.cw), this.aas(this.cw), this.w3(a), true);
if (f == null) {
return null;
}
let g = f[0];
let h = f[1];
let i = this.zs.d(g[0], g[2], c, d, e);
let j = this.zs.e(g[0], g[2], c, d, e);
let k = this.zs.d(h[0], h[2], c, d, e);
let l = this.zs.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.zv();
let c = this.cw.ca;
let d = this.cw.b9;
let e = this.cw.getEffectiveViewport();
let f = this.an(this.a0(), b.k, this.aar(this.cw), this.aas(this.cw), this.w3(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.zs.d(g[0], g[1], c, d, e);
let l = this.zs.e(g[0], g[1], c, d, e);
let m = this.zs.d(h[0], h[1], c, d, e);
let 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;
}
g3(a, b) {
if (this.g2(a, b)) {
return true;
}
if (this.x3(a, b)) {
return true;
}
return false;
}
y9(a, b) {
return null;
}
w2(a) {
let b = this.zl;
let c = this.zr;
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.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 };
}
p7(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.p7(a);
}
eg(a) {
if (this.zl != null && this.zl.ds && this.zl.hasOthersCategory) {
if (this.zl.tb(a)) {
return true;
}
}
return super.eg(a);
}
p5(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.p5(a);
}
ed(a, b, c, d, e) {
if (!this.hasMarkers) {
return false;
}
let f = this.zl;
let g = new ScalerParams(1, this.dc.ys, this.xe, f.dn);
g.c = this.getEffectiveViewport1(this.cw);
let h = this.zr;
let i = new ScalerParams(1, this.dc.ys, this.xe, h.dn);
i.c = this.getEffectiveViewport1(this.cw);
let j = this.aaq;
a.clear();
this.xs.cw((k) => {
if (k._visibility == 0) {
let l = new SeriesPointOfInterest();
let m = k.n;
let n = k.o;
if (!e && (m < this.xe.left || m > this.xe.right || n < this.xe.top || n > this.xe.bottom)) {
return;
}
let o = null;
if (k.content != null) {
o = k.content.item;
}
let p;
let q;
let 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;
let s = l.e;
let 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;
}
k2(a, b) {
let 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);
}
}
let d = NaN;
if (c != null) {
d = this.jl(c);
}
let e = this.abs(d, c, a, this.aap >= 0 ? this.aap : 5, this.aaq, false, false, b);
if (e != null) {
return e;
}
return super.k2(a, b);
}
abs(a, b, c, d, e, f, g, h) {
let i = null;
let j = this.zl.ds && this.zl.tb(b);
let 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)))) {
let l = this.aam(a, b, c, d, f);
let m = this.aan(a, b, c, e, f);
let n = this.aa7(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.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:
{
let q = this.aa8(a, b, c, d, f);
let r = this.aa9(a, b, c, e, f);
i = q + this.aay + r;
}
break;
case 5:
i = this.aa7(c);
break;
case 6:
{
let s = this.aa8(a, b, c, d, f);
let t = this.aa7(c);
i = t + this.aay + s;
}
break;
case 7:
{
let u = this.aa9(a, b, c, e, f);
let v = this.aa7(c);
i = v + this.aay + u;
}
break;
case 8:
{
let w = this.aa8(a, b, c, d, f);
let x = this.aa9(a, b, c, e, f);
let 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;
}
aa7(a) {
let b = this.zl;
let 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) {
let d = super.k2(a, false);
if (d != null) {
return c.i(d);
}
else {
return null;
}
}
else {
return b.ja(a);
}
}
aa8(a, b, c, d, e) {
let 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);
}
}
}
aam(a, b, c, d, e) {
let f = a;
f = this.aau(c, f);
if (e) {
return f;
}
else {
a = this.jl(b);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
}
aa9(a, b, c, d, e) {
if (this.zl == null || !this.zl.ds) {
return this.aa8(a, b, c, d, e);
}
let 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) + "%";
}
}
}
aan(a, b, c, d, e) {
if (this.zl == null || !this.zl.ds) {
return this.aam(a, b, c, d, e);
}
let f = this.zl.ti(c);
if (e) {
return f;
}
else {
a = this.zl.ti(c);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
}
aau(a, b) {
return b;
}
aaw(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;
}
z1(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;
}
aai() {
return false;
}
h0() {
let a = super.h0();
if (this.aai()) {
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.aai()) {
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.sj));
a.add(c);
}
if (!this.aai()) {
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.sj));
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;
}
k5() {
if (this.d4()) {
return this.bo.zx;
}
else {
return this.bo.zu;
}
}
z2(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.zt.da.c;
let e = this.zt.da.d;
let f = this.zt.da.b;
if (f == 0) {
return null;
}
let g = this.zv();
let h = this.dp.count;
let i = this.zl;
let j = -1;
let k = -1;
let 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;
}
let m = new HighlightingInfo();
m.i = this;
m.g = j;
m.f = k;
return m;
}
z3(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.zt.da.c;
let e = this.zt.da.d;
let f = this.zt.da.b;
if (f == 0) {
return null;
}
let g = this.zv();
let h = this.dp.count;
let i = this.zl;
let j = -1;
let k = -1;
let 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;
}
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.z2(a, b, this.z4);
this.z4 = d;
return d;
}
else {
let e = this.z1(a, b, this.z4);
this.z4 = e;
return e;
}
}
di(a, b, c) {
if (this.f3(this.by) && !c) {
let d = this.z3(a, b, this.z5);
this.z5 = d;
return d;
}
else {
let e = this.z1(a, b, this.z5);
e.d = true;
this.z5 = e;
return e;
}
}
aah() {
return (this.assigningRadialStyle != null && this.z7) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
}
aag() {
return (this.assigningRadialMarkerStyle != null && this.z6) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
}
aby(a) {
if (this.assigningRadialStyle != null && this.z7) {
this.assigningRadialStyle(this, a);
}
}
abx(a) {
if (this.assigningRadialMarkerStyle != null && this.z6) {
this.assigningRadialMarkerStyle(this, a);
}
}
aar(a) {
return a.da.b;
}
aas(a) {
return a.da.c;
}
ai() {
return [this.zl, this.zr];
}
ta(a, b) {
this.zt.da.e(this.il);
this.r9(false);
}
s9(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);
}
rr(a, b, c, d) {
super.rr(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;
}
}
aaf() {
return this.aac;
}
aae() {
return this.aab;
}
z9(a) {
if (typeCast(NumericRadiusAxis.$, a) !== null) {
return true;
}
return false;
}
z8(a) {
if (typeCast(CategoryAngleAxis.$, a) !== null) {
return true;
}
return false;
}
kx(a) {
let b = this.kd(a);
let c = false;
if (this.zl != null && this.zl.ds) {
let d = this.zl;
let 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;
}
aak(a) {
let b = this.cw.ca;
let c = this.cw.b9;
let d = this.cw.getEffectiveViewport();
if (this.zl != null && !b.isEmpty && !c.isEmpty && this.zs != null) {
let 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;
}
iz(a) {
let b = this.cw.ca;
let c = this.cw.b9;
let d = this.getEffectiveViewport1(this.cw);
let e = -1;
if (this.zl != null && !b.isEmpty && !c.isEmpty && this.zs != null) {
let f = this.zs.c(a, b, c, d);
if (f < 0) {
f += Math.PI * 2;
}
if (f > Math.PI * 2) {
f -= Math.PI * 2;
}
let g = this.zl.getUnscaledAngle(f);
if (this.zl.categoryMode != 0) {
g -= 0.5;
}
e = g;
}
return e;
}
aal(a, b, c, d) {
return this.zl.r4(a, b, c, d);
}
kd(a) {
let b = truncate(Math.round(this.iz(a)));
let c = false;
if (this.zl != null && this.zl.ds) {
let d = this.zl;
let e = d.hasOthersCategory && b == this.zl.qc - 1;
c = e;
}
if (c) {
let f = this.zl;
return this.zl.qc - 1;
}
if (this.dp != null && b == this.dp.count) {
b = 0;
}
return b;
}
gk(a) {
return false;
}
zv() {
let a = this.zu;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.zx;
}
return a;
}
qq() {
super.qq();
if (this.zl != null) {
this.zl.l0(false);
}
if (this.zr != null) {
this.zr.l0(false);
}
}
hl(a, b, c) {
let d = true;
let e = c;
if (!super.hl(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;
}
zo() {
return 1;
}
aao() {
return Math.max(0, 0.5 * this.zr.th);
}
gu() {
return this.aad;
}
gv() {
return true;
}
sa(a) {
super.sa(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)) {
let 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;
}
let 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) {
let 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) {
let 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) {
let 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);
let g = this.zu;
this.zu = this.zw;
this.zw = g;
if (this.g8) {
let 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);
}
}
aat() {
if (this.bo != null) {
let a = this.bo;
return a.aat();
}
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.zl == this.zl && d.preferredCategoryMode(d.zl) == 2) {
b++;
}
}
return -1;
}
ak(a, b) {
let c = new List$1(ChartSelection.$, 0);
this.qj(a, c, b);
return c.toArray();
}
qj(a, b, c) {
let d = this.cw.ca;
let e = this.cw.b9;
let f = this.cw.getEffectiveViewport();
let g, h;
let 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;
}
let j = h - g + 1;
if (g > h) {
j = this.zl.qd - 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.zl.qd);
if (c == 2 || c == 1) {
b.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.zl.po.item(l);
return $ret;
})()));
}
else {
b.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.zl.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: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, /*@__PURE__*/ enumGetBox(RadialLabelMode_$type, 0)], 'CategoryCollisionMode:zm:ab7', [CategoryCollisionMode_$type, /*@__PURE__*/ 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, /*@__PURE__*/ 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, /*@__PURE__*/ enumGetBox(CategoryTransitionInMode_$type, 0)], 'ValueAxis:zr:aco', [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;
})();