igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,339 lines (1,338 loc) • 44.5 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 { __extends, __values } from "tslib";
import { Base, markType, Point_$type, enumGetBox, EnumUtil, Array_$type, runOn, delegateCombine, typeCast, fromEnum, markDep } from "igniteui-react-core";
import { IBucketizer_$type } from "./IBucketizer";
import { NotImplementedException } from "igniteui-react-core";
import { CategoryAngleAxis } from "./CategoryAngleAxis";
import { NumericRadiusAxis } from "./NumericRadiusAxis";
import { truncate, intDivide, isNaN_ } from "igniteui-react-core";
import { MarkerSeries } from "./MarkerSeries";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { DependencyProperty } from "igniteui-react-core";
import { RadialLabelMode_$type } from "igniteui-react-core";
import { CategoryCollisionMode_$type } from "./CategoryCollisionMode";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { HighlightingInfo } from "igniteui-react-core";
import { BindingFormatter } from "igniteui-react-core";
import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer";
import { RadialFrame } from "./RadialFrame";
import { RadialSeriesRenderManager } from "./RadialSeriesRenderManager";
import { RadialAxes } from "./RadialAxes";
import { CoreGeometryUtil } from "igniteui-react-core";
import { PolygonUtil } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { SeriesPointOfInterest } from "./SeriesPointOfInterest";
import { ScalerParams } from "./ScalerParams";
import { Marker } from "./Marker";
import { MarkerSeriesView } from "./MarkerSeriesView";
import { ProportionalRadialLabelContext } from "./ProportionalRadialLabelContext";
import { MathUtil } from "igniteui-react-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { DoubleCollection } from "igniteui-react-core";
import { Visibility_$type } from "igniteui-react-core";
import { ChartSelection } from "./ChartSelection";
import { PropertyMetadata } from "igniteui-react-core";
import { boxArray$1 } from "igniteui-react-core";
import { round10N } from "igniteui-react-core";
import { Pool$1 } from "igniteui-react-core";
/**
* @hidden
*/
var RadialBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(RadialBucketCalculator, _super);
function RadialBucketCalculator(a) {
var _this = _super.call(this) || this;
_this.a = null;
_this.c = 0;
_this.d = 0;
_this.b = 0;
_this.a = a;
return _this;
}
RadialBucketCalculator.prototype.getBucket = function (a) {
throw new NotImplementedException(0);
};
RadialBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) {
return this.getBucket(a);
};
RadialBucketCalculator.prototype.getErrorBucket = function (a, b) {
return NaN;
};
RadialBucketCalculator.prototype.getBucketInfo = function (a, b, c, d) {
a = this.c;
b = this.d;
c = this.b;
d = this.a.c9.ik;
return {
p0: a,
p1: b,
p2: c,
p3: d
};
};
RadialBucketCalculator.prototype.e = function (a) {
var b = this.a.ca;
var c = this.a.b9;
var d = this.a.getEffectiveViewport();
var e = this.a.c9.zk;
if (b.isEmpty || c.isEmpty || e == null || this.a.c9.dp == null || this.a.c9.dp.count == 0) {
this.b = 0;
return;
}
var f = Math.floor(e.r4(c, d, b));
var 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;
}
var h = this.a.c9.zq;
var i = h != null ? h.tg : 0.75;
var j = Math.min(c.width, c.height) * 0.5 * (i) * 2 * Math.PI;
var k = Math.floor((g - f + 1) * a / j);
this.b = truncate(Math.max(1, k));
this.c = truncate(Math.max(0, Math.floor(f / this.b) - 1));
this.d = truncate(Math.ceil(g / this.b));
if (e.ds) {
this.b = 1;
this.c = truncate(Math.max(0, Math.floor(f / this.b) - 1));
this.d = truncate(Math.ceil(g / this.b));
}
};
RadialBucketCalculator.prototype.cacheValues = function () {
};
RadialBucketCalculator.prototype.unCacheValues = function () {
};
RadialBucketCalculator.$t = markType(RadialBucketCalculator, 'RadialBucketCalculator', Base.$, [IBucketizer_$type]);
return RadialBucketCalculator;
}(Base));
export { RadialBucketCalculator };
/**
* @hidden
*/
var RadialBase = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(RadialBase, _super);
function RadialBase() {
var _this = _super.call(this) || this;
_this.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();
return _this;
}
RadialBase.prototype.rh = function (a) {
_super.prototype.rh.call(this, a);
this.zs = a;
};
RadialBase.prototype.abs = function () {
if (this.dd.g) {
this.dd.t();
}
};
Object.defineProperty(RadialBase.prototype, "categoryAxis", {
get: function () {
return this.zk;
},
enumerable: false,
configurable: true
});
RadialBase.prototype.a0 = function () {
return this.zk;
};
RadialBase.prototype.b3 = function () {
if (this.b4 == 0) {
return 1;
}
else {
return _super.prototype.b3.call(this);
}
};
RadialBase.prototype.aai = function (a, b, c) {
var d = this.cw.ca;
var e = this.cw.b9;
var f = this.cw.getEffectiveViewport();
var g = this.al(a);
var h = this.zr.d(0, this.zq.tp, d, e, f);
var i = this.zr.e(0, this.zq.tp, d, e, f);
if (g == null) {
return false;
}
for (var j = 0; j < g.length; j++) {
var k = g[j];
if (k == null) {
continue;
}
if (k.length != 2) {
if (CoreGeometryUtil.l(a, k[0], boxArray$1(k), this.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;
}
var l = new Array(k.length + 2);
for (var m = 0; m < k.length; m++) {
l[m] = k[m];
}
l[l.length - 2] = { $type: Point_$type, x: h, y: i };
l[l.length - 1] = k[0];
if (PolygonUtil.b(boxArray$1(l), a)) {
return true;
}
}
else {
if (CoreGeometryUtil.i(a, k[0], k[1], this.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;
}
var n = new Array(4);
n[0] = k[0];
n[1] = k[1];
n[2] = { $type: Point_$type, x: h, y: i };
n[3] = k[0];
if (PolygonUtil.b(boxArray$1(n), a)) {
return true;
}
}
}
return false;
};
RadialBase.prototype.aj = function (a) {
var b = this.zu();
var c = this.cw.ca;
var d = this.cw.b9;
var e = this.cw.getEffectiveViewport();
var f = this.an(this.a0(), b.k, this.aaq(this.cw), this.aar(this.cw), this.w2(a), true);
if (f == null) {
return null;
}
var g = f[0];
var h = f[1];
var i = this.zr.d(g[0], g[2], c, d, e);
var j = this.zr.e(g[0], g[2], c, d, e);
var k = this.zr.d(h[0], h[2], c, d, e);
var l = this.zr.e(h[0], h[2], c, d, e);
var m = new Array(1);
var n = new Array(2);
n[0] = { $type: Point_$type, x: i, y: j };
n[1] = { $type: Point_$type, x: k, y: l };
m[0] = n;
return m;
};
RadialBase.prototype.al = function (a) {
var b = this.zu();
var c = this.cw.ca;
var d = this.cw.b9;
var e = this.cw.getEffectiveViewport();
var f = this.an(this.a0(), b.k, this.aaq(this.cw), this.aar(this.cw), this.w2(a), true);
if (f == null) {
return null;
}
var g = f[0];
var h = f[1];
var i = new Array(1);
var j = new Array(2);
var k = this.zr.d(g[0], g[1], c, d, e);
var l = this.zr.e(g[0], g[1], c, d, e);
var m = this.zr.d(h[0], h[1], c, d, e);
var 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;
};
RadialBase.prototype.g2 = function (a, b) {
if (this.g1(a, b)) {
return true;
}
if (this.x2(a, b)) {
return true;
}
return false;
};
RadialBase.prototype.y8 = function (a, b) {
return null;
};
RadialBase.prototype.w1 = function (a) {
var b = this.zk;
var c = this.zq;
if (b == null || c == null || this.dc == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
var d = NaN;
var e = NaN;
var f = this.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 };
};
RadialBase.prototype.p6 = function (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.prototype.p6.call(this, a);
};
RadialBase.prototype.eg = function (a) {
if (this.zk != null && this.zk.ds && this.zk.hasOthersCategory) {
if (this.zk.s9(a)) {
return true;
}
}
return _super.prototype.eg.call(this, a);
};
RadialBase.prototype.p4 = function (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.prototype.p4.call(this, a);
};
RadialBase.prototype.ed = function (a, b, c, d, e) {
var _this = this;
if (!this.hasMarkers) {
return false;
}
var f = this.zk;
var g = new ScalerParams(1, this.dc.yr, this.xd, f.dn);
g.c = this.getEffectiveViewport1(this.cw);
var h = this.zq;
var i = new ScalerParams(1, this.dc.yr, this.xd, h.dn);
i.c = this.getEffectiveViewport1(this.cw);
var j = this.aap;
a.clear();
this.xr.cw(function (k) {
if (k._visibility == 0) {
var l = new SeriesPointOfInterest();
var m = k.n;
var n = k.o;
if (!e && (m < _this.xd.left || m > _this.xd.right || n < _this.xd.top || n > _this.xd.bottom)) {
return;
}
var o = null;
if (k.content != null) {
o = k.content.item;
}
var p = void 0;
var q = void 0;
var 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;
var s = l.e;
var 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;
};
RadialBase.prototype.k1 = function (a, b) {
var 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);
}
}
var d = NaN;
if (c != null) {
d = this.jk(c);
}
var e = this.abp(d, c, a, this.aao >= 0 ? this.aao : 5, this.aap, false, false, b);
if (e != null) {
return e;
}
return _super.prototype.k1.call(this, a, b);
};
RadialBase.prototype.abp = function (a, b, c, d, e, f, g, h) {
var i = null;
var j = this.zk.ds && this.zk.s9(b);
var 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)))) {
var l_1 = this.aal(a, b, c, d, f);
var m_1 = this.aam(a, b, c, e, f);
var n_1 = this.aa6(c);
var o = ((function () {
var $ret = new ProportionalRadialLabelContext();
$ret.value = l_1;
$ret.percent = m_1;
$ret.label = n_1;
$ret.item = b;
return $ret;
})());
var p = null;
if (j) {
if (h) {
p = this.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:
{
var q = this.aa7(a, b, c, d, f);
var r = this.aa8(a, b, c, e, f);
i = q + this.aax + r;
}
break;
case 5:
i = this.aa6(c);
break;
case 6:
{
var s = this.aa7(a, b, c, d, f);
var t = this.aa6(c);
i = t + this.aax + s;
}
break;
case 7:
{
var u = this.aa8(a, b, c, e, f);
var v = this.aa6(c);
i = v + this.aax + u;
}
break;
case 8:
{
var w = this.aa7(a, b, c, d, f);
var x = this.aa8(a, b, c, e, f);
var 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;
};
RadialBase.prototype.aa6 = function (a) {
var b = this.zk;
var 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) {
var d = _super.prototype.k1.call(this, a, false);
if (d != null) {
return c.i(d);
}
else {
return null;
}
}
else {
return b.i8(a);
}
};
RadialBase.prototype.aa7 = function (a, b, c, d, e) {
var 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);
}
}
};
RadialBase.prototype.aal = function (a, b, c, d, e) {
var f = a;
f = this.aat(c, f);
if (e) {
return f;
}
else {
a = this.jk(b);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
};
RadialBase.prototype.aa8 = function (a, b, c, d, e) {
if (this.zk == null || !this.zk.ds) {
return this.aa7(a, b, c, d, e);
}
var 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) + "%";
}
}
};
RadialBase.prototype.aam = function (a, b, c, d, e) {
if (this.zk == null || !this.zk.ds) {
return this.aal(a, b, c, d, e);
}
var f = this.zk.tg(c);
if (e) {
return f;
}
else {
a = this.zk.tg(c);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
};
RadialBase.prototype.aat = function (a, b) {
return b;
};
RadialBase.prototype.aav = function (a, b) {
var c;
if (b >= 0) {
c = round10N(a, b);
}
else {
c = a;
}
var d = this.au(false);
if (d != null) {
var e = d;
return e.i(c);
}
else {
return MathUtil.t(c);
}
};
RadialBase.prototype.get_fw = function () {
return true;
};
RadialBase.prototype.get_fh = function () {
return true;
};
RadialBase.prototype.z0 = function (a, b, c) {
var d = new HighlightingInfo();
d.i = this;
d.g = 0;
d.f = this.dp.count - 1;
d.c = true;
if (c != null && c.g == d.g && c.f == d.f) {
return c;
}
return d;
};
RadialBase.prototype.aah = function () {
return false;
};
RadialBase.prototype.hz = function () {
var a = _super.prototype.hz.call(this);
if (this.aah()) {
var b = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "DashArray";
$ret.p = true;
$ret.x = ((function () {
var $ret = new DoubleCollection();
$ret.add(5);
$ret.add(5);
return $ret;
})());
$ret.q = true;
return $ret;
})());
a.add(b);
}
if (!this.aah()) {
var c = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Brush";
$ret.p = true;
$ret.y = "ActualBrush";
$ret.q = true;
return $ret;
})());
c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.si));
a.add(c);
}
if (!this.aah()) {
var d = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Outline";
$ret.p = true;
$ret.y = "ActualOutline";
$ret.q = true;
return $ret;
})());
d.valueResolving = delegateCombine(d.valueResolving, runOn(this, this.si));
a.add(d);
}
var e = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.p = true;
$ret.ad = "IsTransitionInEnabled";
$ret.x = true;
$ret.q = true;
return $ret;
})());
a.add(e);
var f = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.p = true;
$ret.ad = "TransitionInMode";
$ret.x = enumGetBox(CategoryTransitionInMode_$type, 20);
$ret.q = true;
return $ret;
})());
a.add(f);
return a;
};
RadialBase.prototype.k4 = function () {
if (this.d4()) {
return this.bo.zw;
}
else {
return this.bo.zt;
}
};
RadialBase.prototype.z1 = function (a, b, c) {
if (this.dp == null) {
return null;
}
var d = this.zs.da.c;
var e = this.zs.da.d;
var f = this.zs.da.b;
var g = this.zu();
var h = this.dp.count;
var i = this.zk;
var j = -1;
var k = -1;
var 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;
}
var m = new HighlightingInfo();
m.i = this;
m.g = j;
m.f = k;
return m;
};
RadialBase.prototype.z2 = function (a, b, c) {
if (this.dp == null) {
return null;
}
var d = this.zs.da.c;
var e = this.zs.da.d;
var f = this.zs.da.b;
var g = this.zu();
var h = this.dp.count;
var i = this.zk;
var j = -1;
var k = -1;
var 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;
}
var m = new HighlightingInfo();
m.d = true;
m.i = this;
m.g = j;
m.f = k;
return m;
};
RadialBase.prototype.dh = function (a, b, c) {
if (this.ef && this.f2(this.by) && !c) {
var d = this.z1(a, b, this.z3);
this.z3 = d;
return d;
}
else {
var e = this.z0(a, b, this.z3);
this.z3 = e;
return e;
}
};
RadialBase.prototype.di = function (a, b, c) {
if (this.f2(this.by) && !c) {
var d = this.z2(a, b, this.z4);
this.z4 = d;
return d;
}
else {
var e = this.z0(a, b, this.z4);
e.d = true;
this.z4 = e;
return e;
}
};
RadialBase.prototype.aag = function () {
return (this.assigningRadialStyle != null && this.z6) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
};
RadialBase.prototype.aaf = function () {
return (this.assigningRadialMarkerStyle != null && this.z5) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
};
RadialBase.prototype.abv = function (a) {
if (this.assigningRadialStyle != null && this.z6) {
this.assigningRadialStyle(this, a);
}
};
RadialBase.prototype.abu = function (a) {
if (this.assigningRadialMarkerStyle != null && this.z5) {
this.assigningRadialMarkerStyle(this, a);
}
};
RadialBase.prototype.aaq = function (a) {
return a.da.b;
};
RadialBase.prototype.aar = function (a) {
return a.da.c;
};
RadialBase.prototype.ai = function () {
return [this.zk, this.zq];
};
RadialBase.prototype.s9 = function (a, b) {
this.zs.da.e(this.ik);
this.r8(false);
};
RadialBase.prototype.s8 = function (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);
};
RadialBase.prototype.rq = function (a, b, c, d) {
_super.prototype.rq.call(this, 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;
}
};
RadialBase.prototype.aae = function () {
return this.aab;
};
RadialBase.prototype.aad = function () {
return this.aaa;
};
RadialBase.prototype.z8 = function (a) {
if (typeCast(NumericRadiusAxis.$, a) !== null) {
return true;
}
return false;
};
RadialBase.prototype.z7 = function (a) {
if (typeCast(CategoryAngleAxis.$, a) !== null) {
return true;
}
return false;
};
RadialBase.prototype.kw = function (a) {
var b = this.kc(a);
var c = false;
if (this.zk != null && this.zk.ds) {
var d = this.zk;
var 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;
};
RadialBase.prototype.aaj = function (a) {
var b = this.cw.ca;
var c = this.cw.b9;
var d = this.cw.getEffectiveViewport();
if (this.zk != null && !b.isEmpty && !c.isEmpty && this.zr != null) {
var 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;
};
RadialBase.prototype.iy = function (a) {
var b = this.cw.ca;
var c = this.cw.b9;
var d = this.getEffectiveViewport1(this.cw);
var e = -1;
if (this.zk != null && !b.isEmpty && !c.isEmpty && this.zr != null) {
var f = this.zr.c(a, b, c, d);
if (f < 0) {
f += Math.PI * 2;
}
if (f > Math.PI * 2) {
f -= Math.PI * 2;
}
var g = this.zk.getUnscaledAngle(f);
if (this.zk.categoryMode != 0) {
g -= 0.5;
}
e = g;
}
return e;
};
RadialBase.prototype.aak = function (a, b, c, d) {
return this.zk.r2(a, b, c, d);
};
RadialBase.prototype.kc = function (a) {
var b = truncate(Math.round(this.iy(a)));
var c = false;
if (this.zk != null && this.zk.ds) {
var d = this.zk;
var e = d.hasOthersCategory && b == this.zk.qa - 1;
c = e;
}
if (c) {
var f = this.zk;
return this.zk.qa - 1;
}
if (this.dp != null && b == this.dp.count) {
b = 0;
}
return b;
};
RadialBase.prototype.gj = function (a) {
return false;
};
RadialBase.prototype.zu = function () {
var a = this.zt;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.zw;
}
return a;
};
RadialBase.prototype.qp = function () {
_super.prototype.qp.call(this);
if (this.zk != null) {
this.zk.ly(false);
}
if (this.zq != null) {
this.zq.ly(false);
}
};
RadialBase.prototype.hk = function (a, b, c) {
var d = true;
var e = c;
if (!_super.prototype.hk.call(this, 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;
};
RadialBase.prototype.zn = function () {
return 1;
};
RadialBase.prototype.aan = function () {
return Math.max(0, 0.5 * this.zq.tf);
};
RadialBase.prototype.gt = function () {
return this.aac;
};
RadialBase.prototype.gu = function () {
return true;
};
RadialBase.prototype.r9 = function (a) {
_super.prototype.r9.call(this, 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)) {
var 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;
}
var 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) {
var 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) {
var 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) {
var 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);
var g = this.zt;
this.zt = this.zv;
this.zv = g;
if (this.g7) {
var 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);
}
};
RadialBase.prototype.aas = function () {
var e_1, _a;
if (this.bo != null) {
var a = this.bo;
return a.aas();
}
var b = 0;
try {
for (var _b = __values(fromEnum(this.dc.b9)), _c = _b.next(); !_c.done; _c = _b.next()) {
var c = _c.value;
if (c == this || this.bo == c) {
return b;
}
var d = typeCast(RadialBase.$, c);
if (d != null && d.zk == this.zk && d.preferredCategoryMode(d.zk) == 2) {
b++;
}
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
return -1;
};
RadialBase.prototype.ak = function (a, b) {
var c = new List$1(ChartSelection.$, 0);
this.qi(a, c, b);
return c.toArray();
};
RadialBase.prototype.qi = function (a, b, c) {
var _this = this;
var d = this.cw.ca;
var e = this.cw.b9;
var f = this.cw.getEffectiveViewport();
var g, h;
var i = this.zr.f(this.dc.yw(a), d, e, f, g, h);
g = i.p4;
h = i.p5;
if (g == -1 || h == -1) {
return;
}
var j = h - g + 1;
if (g > h) {
j = this.zk.qb - g + h + 1;
}
if (j > 0 && (c == 7 || c == 6)) {
b.add(((function () {
var $ret = new ChartSelection();
$ret.series = _this;
return $ret;
})()));
return;
}
var _loop_1 = function (k) {
var l = (k + g) % (this_1.zk.qb);
if (c == 2 || c == 1) {
b.add(((function () {
var $ret = new ChartSelection();
$ret.item = _this.zk.pm.item(l);
return $ret;
})()));
}
else {
b.add(((function () {
var $ret = new ChartSelection();
$ret.item = _this.zk.pm.item(l);
$ret.series = _this;
return $ret;
})()));
}
};
var this_1 = this;
for (var k = 0; k < j; k++) {
_loop_1(k);
}
};
RadialBase.$t = markType(RadialBase, 'RadialBase', MarkerSeries.$, [IHasCategoryModePreference_$type]);
RadialBase.$$p = markDep(DependencyProperty, PropertyMetadata, RadialBase, 'raisePropertyChanged', ['AngleAxis: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, enumGetBox(RadialLabelMode_$type, 0)], 'CategoryCollisionMode:zl:ab4', [CategoryCollisionMode_$type, 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, 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, enumGetBox(CategoryTransitionInMode_$type, 0)], 'ValueAxis:zq:acj', [NumericRadiusAxis.$, null]]);
return RadialBase;
}(MarkerSeries));
export { RadialBase };
/**
* @hidden
*/
var RadialBaseView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(RadialBaseView, _super);
function RadialBaseView(a) {
var _this = _super.call(this, a) || this;
_this.da = null;
_this.c9 = null;
_this.db = null;
_this.dc = 0;
_this.dd = null;
_this.c9 = a;
_this.db = new Pool$1(Marker.$);
_this.c0(_this.db);
return _this;
}
RadialBaseView.prototype.cw = function (a) {
this.db.c(a);
};
RadialBaseView.$t = markType(RadialBaseView, 'RadialBaseView', MarkerSeriesView.$);
return RadialBaseView;
}(MarkerSeriesView));
export { RadialBaseView };