igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,215 lines (1,214 loc) • 39.9 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, 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 { OthersCategoryContext } from "./OthersCategoryContext";
import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer";
import { RadialFrame } from "./RadialFrame";
import { RadialSeriesRenderManager } from "./RadialSeriesRenderManager";
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 { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { DoubleCollection } from "igniteui-react-core";
import { RadialAxes } from "./RadialAxes";
import { Visibility_$type } from "igniteui-react-core";
import { ChartSelection } from "./ChartSelection";
import { PropertyMetadata } 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.c0.id;
return {
p0: a,
p1: b,
p2: c,
p3: d
};
};
RadialBucketCalculator.prototype.e = function (a) {
var b = this.a.b2;
var c = this.a.b1;
var d = this.a.getEffectiveViewport();
var e = this.a.c0.y1;
if (b.isEmpty || c.isEmpty || e == null || this.a.c0.dp == null || this.a.c0.dp.count == 0) {
this.b = 0;
return;
}
var f = Math.floor(e.m9(c, d, b));
var g = Math.ceil(e.m8(c, d, b));
if (e.ch) {
g = Math.ceil(e.m9(c, d, b));
f = Math.floor(e.m8(c, d, b));
}
if (g < f) {
g = e.lj + g;
}
var h = this.a.c0.y7;
var i = h != null ? h.n7 : 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.cl) {
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.zi = null;
_this.zp = false;
_this.zo = false;
_this.zm = null;
_this.zn = null;
_this.assigningRadialStyle = null;
_this.assigningRadialMarkerStyle = null;
_this.yu = null;
_this.yy = null;
_this.yv = null;
_this.yx = null;
_this.yw = null;
_this.y8 = new OthersCategoryContext();
_this.ze = new RadialFrame(4);
_this.zf = new RadialFrame(4);
_this.zc = new RadialFrame(4);
_this.za = null;
_this.y6 = null;
_this.y6 = new CategoryTransitionSourceFramePreparer();
_this.zi = new RadialSeriesRenderManager();
return _this;
}
RadialBase.prototype.q1 = function (a) {
_super.prototype.q1.call(this, a);
this.zb = a;
};
RadialBase.prototype.aba = function () {
if (this.dd.g) {
this.dd.t();
}
};
Object.defineProperty(RadialBase.prototype, "categoryAxis", {
get: function () {
return this.y1;
},
enumerable: false,
configurable: true
});
RadialBase.prototype.a0 = function () {
return this.y1;
};
RadialBase.prototype.yp = function (a, b) {
return null;
};
RadialBase.prototype.ps = function (a) {
if (a == this.y9) {
if (this.fi) {
this.ba.a$x(this, a, this.y1.lk - 1);
}
return;
}
_super.prototype.ps.call(this, a);
};
RadialBase.prototype.ef = function (a) {
if (a == this.y9 && this.y1 != null && this.y1.cl && this.y1.hasOthersCategory) {
return true;
}
return _super.prototype.ef.call(this, a);
};
RadialBase.prototype.pq = function (a) {
if (a == this.y9) {
if (this.fi) {
this.ba.a$an(this, a, this.dp.count - 1);
}
return;
}
_super.prototype.pq.call(this, a);
};
RadialBase.prototype.ec = function (a, b, c, d, e) {
var _this = this;
if (!this.hasMarkers) {
return false;
}
var f = this.y1;
var g = new ScalerParams(1, this.dc.v5, this.wu, f.ch);
g.c = this.getEffectiveViewport1(this.cw);
var h = this.y7;
var i = new ScalerParams(1, this.dc.v5, this.wu, h.ch);
i.c = this.getEffectiveViewport1(this.cw);
var j = this.z7;
a.clear();
this.w8.cn(function (k) {
if (k._visibility == 0) {
var l = new SeriesPointOfInterest();
var m = k.n;
var n = k.o;
if (m < _this.wu.left || m > _this.wu.right || n < _this.wu.top || n > _this.wu.bottom) {
return;
}
var o = null;
if (k.content != null) {
o = k.content.item;
}
var p = void 0;
var q = void 0;
var r = _this.za.h(m, n, _this.cw.b2, _this.cw.b1, _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.aa7(s, o, t, d, j, c, b, false);
l.b = k.content;
l.g = _this.vi;
l.c = k.ak;
if (_this.g9) {
l.g = _this.vp(k.ak);
}
l.a = _this.ar(k.ak, k.al);
a.add(l);
}
});
return true;
};
RadialBase.prototype.ks = function (a, b) {
var c = null;
if (this.dp != null) {
if (a >= 0 && a < this.dp.count) {
c = this.dp.item(a);
}
if (this.y1 != null && this.y1.cl && a == this.y1.othersIndex) {
c = this.y9;
}
}
var d = NaN;
if (c != null) {
d = this.jc(c);
}
var e = this.aa7(d, c, a, this.z6 >= 0 ? this.z6 : 5, this.z7, false, false, b);
if (e != null) {
return e;
}
return _super.prototype.ks.call(this, a, b);
};
RadialBase.prototype.aa7 = function (a, b, c, d, e, f, g, h) {
var i = null;
var j = (b == this.y9);
var k = this.zg;
if (h) {
k = this.zh;
}
if (k == 0) {
if (h) {
k = 5;
}
else {
k = 6;
}
}
if ((h && ((this.yv != null) || (j && this.yw != null))) || (!h && ((this.yy != null) || (j && this.yx != null)))) {
var l_1 = this.z3(a, b, c, d, f);
var m_1 = this.z4(a, b, c, e, f);
var n_1 = this.aao(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.yw;
}
else {
p = this.yx;
}
if (p == null) {
if (h) {
p = this.yv;
}
else {
p = this.yy;
}
}
}
else {
if (h) {
p = this.yv;
}
else {
p = this.yy;
}
}
i = p.i(o);
}
else if (k != 1) {
switch (k) {
case 2:
i = this.aap(a, b, c, d, f);
break;
case 3:
i = this.aaq(a, b, c, e, f);
break;
case 4:
{
var q = this.aap(a, b, c, d, f);
var r = this.aaq(a, b, c, e, f);
i = q + this.aaf + r;
}
break;
case 5:
i = this.aao(c);
break;
case 6:
{
var s = this.aap(a, b, c, d, f);
var t = this.aao(c);
i = t + this.aaf + s;
}
break;
case 7:
{
var u = this.aaq(a, b, c, e, f);
var v = this.aao(c);
i = v + this.aaf + u;
}
break;
case 8:
{
var w = this.aap(a, b, c, d, f);
var x = this.aaq(a, b, c, e, f);
var y = this.aao(c);
i = y + this.aaf + w + this.aaf + x;
}
break;
}
}
else {
if (g) {
i = this.aap(a, b, c, d, f);
}
else {
i = this.aao(c);
}
}
return i;
};
RadialBase.prototype.aao = function (a) {
var b = this.y1;
var c = this.au(true);
if (this.y1 != null && this.y1.cl && this.y1.hasOthersCategory && a == this.y1.othersIndex) {
if (this.yu != null) {
c = this.yu;
}
}
if (c != null) {
var d = _super.prototype.ks.call(this, a, false);
if (d != null) {
return c.i(d);
}
else {
return null;
}
}
else {
return b.gf(a);
}
};
RadialBase.prototype.aap = function (a, b, c, d, e) {
var f = a;
f = this.aab(c, f);
if (e) {
return this.aad(f, d);
}
else {
a = this.jc(b);
if (!isNaN_(a)) {
return this.aad(a, d);
}
else {
return this.aad(f, d);
}
}
};
RadialBase.prototype.z3 = function (a, b, c, d, e) {
var f = a;
f = this.aab(c, f);
if (e) {
return f;
}
else {
a = this.jc(b);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
};
RadialBase.prototype.aaq = function (a, b, c, d, e) {
if (this.y1 == null || !this.y1.cl) {
return this.aap(a, b, c, d, e);
}
var f = this.y1.oa(c);
if (e) {
return this.aad(f, d) + "%";
}
else {
a = this.y1.oa(c);
if (!isNaN_(a)) {
return this.aad(a, d) + "%";
}
else {
return this.aad(f, d) + "%";
}
}
};
RadialBase.prototype.z4 = function (a, b, c, d, e) {
if (this.y1 == null || !this.y1.cl) {
return this.z3(a, b, c, d, e);
}
var f = this.y1.oa(c);
if (e) {
return f;
}
else {
a = this.y1.oa(c);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
};
RadialBase.prototype.aab = function (a, b) {
return b;
};
RadialBase.prototype.aad = 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 c.toString();
}
};
RadialBase.prototype.get_ft = function () {
return true;
};
RadialBase.prototype.get_fe = function () {
return true;
};
RadialBase.prototype.zj = 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.z0 = function () {
return false;
};
RadialBase.prototype.ht = function () {
var a = _super.prototype.ht.call(this);
if (this.z0()) {
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.z0()) {
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.r2));
a.add(c);
}
if (!this.z0()) {
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.r2));
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.kv = function () {
if (this.d4()) {
return this.bo.zf;
}
else {
return this.bo.zc;
}
};
RadialBase.prototype.zk = function (a, b, c) {
if (this.dp == null) {
return null;
}
var d = this.zb.c1.c;
var e = this.zb.c1.d;
var f = this.zb.c1.b;
var g = this.zd();
var h = this.dp.count;
var i = this.y1;
var j = -1;
var k = -1;
var l = this.j3(b);
if (isNaN_(b.x) || isNaN_(b.y)) {
if (a != null && this.dp != null) {
if (a == this.y9) {
l = this.y1.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.zl = function (a, b, c) {
if (this.dp == null) {
return null;
}
var d = this.zb.c1.c;
var e = this.zb.c1.d;
var f = this.zb.c1.b;
var g = this.zd();
var h = this.dp.count;
var i = this.y1;
var j = -1;
var k = -1;
var l = this.j3(b);
if (isNaN_(b.x) || isNaN_(b.y)) {
if (a != null && this.dp != null) {
if (a == this.y9) {
l = this.y1.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.ee && this.fz(this.by) && !c) {
var d = this.zk(a, b, this.zm);
this.zm = d;
return d;
}
else {
var e = this.zj(a, b, this.zm);
this.zm = e;
return e;
}
};
RadialBase.prototype.di = function (a, b, c) {
if (this.fz(this.by) && !c) {
var d = this.zl(a, b, this.zn);
this.zn = d;
return d;
}
else {
var e = this.zj(a, b, this.zn);
e.d = true;
this.zn = e;
return e;
}
};
RadialBase.prototype.zz = function () {
return (this.assigningRadialStyle != null && this.zp) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
};
RadialBase.prototype.zy = function () {
return (this.assigningRadialMarkerStyle != null && this.zo) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
};
RadialBase.prototype.abd = function (a) {
if (this.assigningRadialStyle != null && this.zp) {
this.assigningRadialStyle(this, a);
}
};
RadialBase.prototype.abc = function (a) {
if (this.assigningRadialMarkerStyle != null && this.zo) {
this.assigningRadialMarkerStyle(this, a);
}
};
RadialBase.prototype.z8 = function (a) {
return a.c1.b;
};
RadialBase.prototype.z9 = function (a) {
return a.c1.c;
};
RadialBase.prototype.ai = function () {
return [this.y1, this.y7];
};
RadialBase.prototype.st = function (a, b) {
this.zb.c1.e(this.id);
this.rs(false);
};
RadialBase.prototype.ss = function (a, b) {
if (this.g1 && this.jq < 0.05 && (this.dc == null || !this.dc.fm())) {
this.g2 = true;
this.g5 = false;
this.gk = false;
}
this.zb.c1.e(this.id);
this.rs(false);
};
RadialBase.prototype.ra = function (a, b, c, d) {
_super.prototype.ra.call(this, a, b, c, d);
switch (b) {
case RadialBase.$$p[6]:
this.rs(false);
break;
case RadialBase.$$p[14]:
this.pe();
this.rs(false);
break;
case "SeriesViewer":
if (c != null && d == null) {
if (this.y1 != null) {
this.y1.b0(this);
}
if (this.y7 != null) {
this.y7.b0(this);
}
}
if (c == null && d != null) {
if (this.y1 != null) {
this.y1.ct(this);
}
if (this.y7 != null) {
this.y7.ct(this);
}
}
this.zb.c1.e(this.id);
this.rs(false);
break;
case RadialBase.$$p[0]:
if (this.y1 != null && this.y7 != null) {
this.za = new RadialAxes(this.y7, this.y1);
}
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
this.zb.c1.e(this.id);
this.rs(false);
break;
case RadialBase.$$p[22]:
if (this.y1 != null && this.y7 != null) {
this.za = new RadialAxes(this.y7, this.y1);
}
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
this.zb.c1.e(this.id);
if (this.y7 == null || !this.y7.c1()) {
this.rs(false);
}
break;
case RadialBase.$$p[3]:
case RadialBase.$$p[4]:
if (this.aah != null) {
this.yu = new BindingFormatter();
this.yu.j = this.aah;
this.yu.d = this.yo;
}
else {
this.yu = null;
}
break;
case RadialBase.$$p[19]:
case RadialBase.$$p[20]:
if (this.aa4 != null) {
this.yy = new BindingFormatter();
this.yy.j = this.aa4;
this.yy.d = this.yt;
}
else {
this.yy = null;
}
break;
case RadialBase.$$p[12]:
case RadialBase.$$p[13]:
if (this.aau != null) {
this.yv = new BindingFormatter();
this.yv.j = this.aau;
this.yv.d = this.yq;
}
else {
this.yv = null;
}
break;
case RadialBase.$$p[17]:
case RadialBase.$$p[18]:
if (this.aa4 != null) {
this.yx = new BindingFormatter();
this.yx.j = this.aa1;
this.yx.d = this.ys;
}
else {
this.yx = null;
}
break;
case RadialBase.$$p[15]:
case RadialBase.$$p[16]:
if (this.aau != null) {
this.yw = new BindingFormatter();
this.yw.j = this.aay;
this.yw.d = this.yr;
}
else {
this.yw = null;
}
break;
case "SyncLink":
if (this.c4 != null && this.dc != null) {
this.zb.c1.e(this.id);
this.rs(false);
}
break;
case "TransitionProgress":
this.zf.c(this.jq, this.ze, this.zc);
if (this.d6(this.cw)) {
return;
}
if (this.jq == 1) {
this.zc.y();
this.abe(this.zc, this.zb);
if (this.g1) {
this.g1 = false;
this.o6();
this.dd.r = truncate(this.i9());
this.dd.b = this.de;
}
if (this.g4) {
this.g4 = false;
this.o6();
this.dd.r = truncate(this.i9());
this.dd.b = this.de;
this.q0();
}
this.qo();
}
else {
this.abe(this.zf, this.zb);
}
if (this.dc != null) {
this.dc.qp(this);
}
break;
case RadialBase.$$p[8]:
this.rs(false);
this.ql();
break;
case "VisibilityProxy":
if (EnumUtil.getEnumValue(Visibility_$type, c) != 0 && EnumUtil.getEnumValue(Visibility_$type, d) == 0) {
this.zb.c1.e(this.id);
}
break;
case RadialBase.$$p[10]:
this.zp = this.zx();
this.rs(false);
break;
case RadialBase.$$p[9]:
this.zo = this.zw();
this.rs(false);
break;
}
};
RadialBase.prototype.zx = function () {
return this.zu;
};
RadialBase.prototype.zw = function () {
return this.zt;
};
RadialBase.prototype.zr = function (a) {
if (typeCast(NumericRadiusAxis.$, a) !== null) {
return true;
}
return false;
};
RadialBase.prototype.zq = function (a) {
if (typeCast(CategoryAngleAxis.$, a) !== null) {
return true;
}
return false;
};
RadialBase.prototype.get_y9 = function () {
return this.y8;
};
Object.defineProperty(RadialBase.prototype, "y9", {
get: function () {
return this.get_y9();
},
enumerable: false,
configurable: true
});
RadialBase.prototype.kn = function (a) {
var b = this.j3(a);
var c = false;
if (this.y1 != null && this.y1.cl) {
var d = this.y1;
var e = d.hasOthersCategory && b == this.y1.lj - 1;
c = e;
}
if (c) {
var f = this.y1;
return this.y9;
}
return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
};
RadialBase.prototype.z1 = function (a) {
var b = this.cw.b2;
var c = this.cw.b1;
var d = this.cw.getEffectiveViewport();
if (this.y1 != null && !b.isEmpty && !c.isEmpty && this.za != null) {
var e = this.za.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.ir = function (a) {
var b = this.cw.b2;
var c = this.cw.b1;
var d = this.getEffectiveViewport1(this.cw);
var e = -1;
if (this.y1 != null && !b.isEmpty && !c.isEmpty && this.za != null) {
var f = this.za.c(a, b, c, d);
if (f < 0) {
f += Math.PI * 2;
}
if (f > Math.PI * 2) {
f -= Math.PI * 2;
}
var g = this.y1.getUnscaledAngle(f);
if (this.y1.categoryMode != 0) {
g -= 0.5;
}
e = g;
}
return e;
};
RadialBase.prototype.z2 = function (a, b, c, d) {
return this.y1.m7(a, b, c, d);
};
RadialBase.prototype.j3 = function (a) {
var b = truncate(Math.round(this.ir(a)));
var c = false;
if (this.y1 != null && this.y1.cl) {
var d = this.y1;
var e = d.hasOthersCategory && b == this.y1.lj - 1;
c = e;
}
if (c) {
var f = this.y1;
return this.y1.lj - 1;
}
if (this.dp != null && b == this.dp.count) {
b = 0;
}
return b;
};
RadialBase.prototype.gd = function (a) {
return false;
};
RadialBase.prototype.zd = function () {
var a = this.zc;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.zf;
}
return a;
};
RadialBase.prototype.qb = function () {
_super.prototype.qb.call(this);
if (this.y1 != null) {
this.y1.ib(false);
}
if (this.y7 != null) {
this.y7.ib(false);
}
};
RadialBase.prototype.he = function (a, b, c) {
var d = true;
var e = c;
if (!_super.prototype.he.call(this, a, b, c) || !c.p() || b.isEmpty || a.isEmpty || this.y1 == null || this.y1.itemsSource == null || this.y7 == null || this.za == null || this.dp == null || this.y1.bi == null || this.y7.bi == null || this.y7.l4 == this.y7.l3) {
e.c1.b = 0;
d = false;
}
return d;
};
RadialBase.prototype.y4 = function () {
return 1;
};
RadialBase.prototype.z5 = function () {
return Math.max(0, 0.5 * this.y7.n6);
};
RadialBase.prototype.gn = function () {
return this.zv;
};
RadialBase.prototype.go = function () {
return true;
};
RadialBase.prototype.rt = function (a) {
_super.prototype.rt.call(this, a);
this.zb.c1.e(this.id);
if (this.d6(this.cw)) {
this.zc.ab();
this.zf.ab();
this.ze.ab();
return;
}
if (this.gr) {
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.abe(this.zf, this.zb);
}
else {
this.abe(this.zc, this.zb);
}
return;
}
if (this.gf(a)) {
var b = this.ze;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.ze = this.zf;
this.zf = b;
}
else {
this.ze = this.zc;
this.zc = b;
}
var c = false;
this.abb(this.zc, this.zb);
if (this.g3) {
this.dd.w();
this.dd.r = truncate(this.ja());
this.dd.b = this.df != null ? this.df : this.de;
if (this.g4) {
var d = this.zf;
this.zf = this.ze;
this.ze = d;
c = true;
}
this.y6.x(this, this.ze, this.zc, this.isVertical, this.y1, this.y7, this.y5, this.y4(), this.c6, this.c5(), runOn(this, this.z5), this.zb.b1);
if (this.g4) {
var e = this.zf;
this.zf = this.ze;
this.ze = e;
}
this.g4 = false;
}
if (this.g6) {
this.dd.w();
this.dd.r = truncate(this.jb());
this.dd.b = this.dg != null ? this.dg : this.de;
if (this.g1) {
var f = this.zf;
this.zf = this.ze;
this.ze = f;
c = true;
}
this.y6.x(this, this.ze, this.zc, this.isVertical, this.y1, this.y7, this.y5, this.y4(), this.c6, this.c5(), runOn(this, this.z5), this.zb.b1);
var g = this.zc;
this.zc = this.ze;
this.ze = g;
if (this.g1) {
var h = this.zf;
this.zf = this.ze;
this.ze = h;
}
this.g1 = false;
}
this.ea = false;
if (!c) {
this.o1();
}
this.r9();
if (this.g3) {
this.g2 = false;
this.g1 = true;
}
if (this.g6) {
this.g5 = false;
this.g4 = true;
}
}
else {
this.abb(this.zc, this.zb);
this.abe(this.zc, this.zb);
}
};
RadialBase.prototype.aaa = function () {
var e_1, _a;
if (this.bo != null) {
var a = this.bo;
return a.aaa();
}
var b = 0;
try {
for (var _b = __values(fromEnum(this.dc.series)), _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.y1 == this.y1 && d.preferredCategoryMode(d.y1) == 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.p4(a, c, b);
return c.toArray();
};
RadialBase.prototype.p4 = function (a, b, c) {
var _this = this;
var d = this.cw.b2;
var e = this.cw.b1;
var f = this.cw.getEffectiveViewport();
var g, h;
var i = this.za.f(this.dc.wa(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.y1.lk - 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.y1.lk);
if (c == 2 || c == 1) {
b.add(((function () {
var $ret = new ChartSelection();
$ret.item = _this.y1.kv.item(l);
return $ret;
})()));
}
else {
b.add(((function () {
var $ret = new ChartSelection();
$ret.item = _this.y1.kv.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:y1:abf', [CategoryAngleAxis.$, null], 'AutoCalloutLabelPrecision:z6:abg', [1, -1], 'AutoCalloutLabelValueSeparator:aaf:abh', [2, " - "], 'AutoCalloutOthersLabelFormat:aah:abi', [2, null], 'AutoCalloutOthersLabelFormatSpecifiers:yo:abj', [Array_$type, null], 'AutoCalloutPercentagePrecision:z7:abk', [1, 2], 'AutoCalloutRadialLabelMode:zg:abl', [RadialLabelMode_$type, enumGetBox(RadialLabelMode_$type, 0)], 'CategoryCollisionMode:y2:abm', [CategoryCollisionMode_$type, enumGetBox(CategoryCollisionMode_$type, 1)], 'ClipSeriesToBounds:zs:abn', [0, false], 'IsCustomRadialMarkerStyleAllowed:zt:abo', [0, false], 'IsCustomRadialStyleAllowed:zu:abp', [0, false], 'IsTransitionInEnabled:zv:abq', [0, false], 'LegendProportionalRadialLabelFormat:aau:abr', [2, null], 'LegendProportionalRadialLabelFormatSpecifiers:yq:abs', [Array_$type, null], 'LegendRadialLabelMode:zh:abt', [RadialLabelMode_$type, enumGetBox(RadialLabelMode_$type, 0)], 'OthersLegendProportionalRadialLabelFormat:aay:abu', [2, null], 'OthersLegendProportionalRadialLabelFormatSpecifiers:yr:abv', [Array_$type, null], 'OthersProportionalRadialLabelFormat:aa1:abw', [2, null], 'OthersProportionalRadialLabelFormatSpecifiers:ys:abx', [Array_$type, null], 'ProportionalRadialLabelFormat:aa4:aby', [2, null], 'ProportionalRadialLabelFormatSpecifiers:yt:abz', [Array_$type, null], 'TransitionInMode:y5:ab0', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'ValueAxis:y7:ab1', [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.c1 = null;
_this.c0 = null;
_this.c2 = null;
_this.c3 = 0;
_this.c4 = null;
_this.c0 = a;
_this.c2 = new Pool$1(Marker.$);
_this.cr(_this.c2);
return _this;
}
RadialBaseView.prototype.cn = function (a) {
this.c2.c(a);
};
RadialBaseView.$t = markType(RadialBaseView, 'RadialBaseView', MarkerSeriesView.$);
return RadialBaseView;
}(MarkerSeriesView));
export { RadialBaseView };