igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
1,306 lines (1,305 loc) • 40.7 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-angular-core";
import { IBucketizer_$type } from "./IBucketizer";
import { NotImplementedException } from "igniteui-angular-core";
import { CategoryAngleAxis } from "./CategoryAngleAxis";
import { NumericRadiusAxis } from "./NumericRadiusAxis";
import { truncate, intDivide, isNaN_ } from "igniteui-angular-core";
import { MarkerSeries } from "./MarkerSeries";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { DependencyProperty } from "igniteui-angular-core";
import { RadialLabelMode_$type } from "igniteui-angular-core";
import { CategoryCollisionMode_$type } from "./CategoryCollisionMode";
import { Brush } from "igniteui-angular-core";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { HighlightingInfo } from "igniteui-angular-core";
import { BindingFormatter } from "igniteui-angular-core";
import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer";
import { RadialFrame } from "./RadialFrame";
import { RadialSeriesRenderManager } from "./RadialSeriesRenderManager";
import { RadialAxes } from "./RadialAxes";
import { CoreGeometryUtil } from "igniteui-angular-core";
import { PolygonUtil } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-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-angular-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { DoubleCollection } from "igniteui-angular-core";
import { Visibility_$type } from "igniteui-angular-core";
import { ChartSelection } from "./ChartSelection";
import { PropertyMetadata } from "igniteui-angular-core";
import { boxArray$1 } from "igniteui-angular-core";
import { round10N } from "igniteui-angular-core";
import { Pool$1 } from "igniteui-angular-core";
/**
* @hidden
*/
export class RadialBucketCalculator extends Base {
static { this.$t = markType(RadialBucketCalculator, 'RadialBucketCalculator', Base.$, [IBucketizer_$type]); }
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.aab;
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.sl(c, d, b));
let g = Math.ceil(e.sk(c, d, b));
if (e.dr) {
g = Math.ceil(e.sl(c, d, b));
f = Math.floor(e.sk(c, d, b));
}
if (g < f) {
g = e.qp + g;
}
let h = this.a.c9.aah;
let i = h != null ? h.tu : 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.dw) {
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() {
}
}
/**
* @hidden
*/
export class RadialBase extends MarkerSeries {
static { this.$t = markType(RadialBase, 'RadialBase', MarkerSeries.$, [IHasCategoryModePreference_$type]); }
rj(a) {
super.rj(a);
this.aaj = a;
}
constructor() {
super();
this.aaq = null;
this.aax = false;
this.aaw = false;
this.aau = null;
this.aav = null;
this.assigningRadialStyle = null;
this.assigningRadialMarkerStyle = null;
this.z4 = null;
this.z8 = null;
this.z5 = null;
this.z7 = null;
this.z6 = null;
this.aam = new RadialFrame(4);
this.aan = new RadialFrame(4);
this.aak = new RadialFrame(4);
this.aai = null;
this.aag = null;
this.aag = new CategoryTransitionSourceFramePreparer();
this.aaq = new RadialSeriesRenderManager();
}
acl() {
if (this.dd.g) {
this.dd.t();
}
}
get categoryAxis() {
return this.aab;
}
a0() {
return this.aab;
}
b3() {
if (this.b4 == 0) {
return 1;
}
else {
return super.b3();
}
}
aa9(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.aai.d(0, this.aah.t3, d, e, f);
let i = this.aai.e(0, this.aah.t3, 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.aal();
let c = this.cw.ca;
let d = this.cw.b9;
let e = this.cw.getEffectiveViewport();
let f = this.an(this.a0(), b.k, this.abh(this.cw), this.abi(this.cw), this.w4(a), true);
if (f == null) {
return null;
}
let g = f[0];
let h = f[1];
let i = this.aai.d(g[0], g[2], c, d, e);
let j = this.aai.e(g[0], g[2], c, d, e);
let k = this.aai.d(h[0], h[2], c, d, e);
let l = this.aai.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.aal();
let c = this.cw.ca;
let d = this.cw.b9;
let e = this.cw.getEffectiveViewport();
let f = this.an(this.a0(), b.k, this.abh(this.cw), this.abi(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.aai.d(g[0], g[1], c, d, e);
let l = this.aai.e(g[0], g[1], c, d, e);
let m = this.aai.d(h[0], h[1], c, d, e);
let n = this.aai.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.x5(a, b)) {
return true;
}
return false;
}
zz(a, b) {
return null;
}
w3(a) {
let b = this.aab;
let c = this.aah;
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.aai.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.aab != null && this.aab.dw && this.aab.tq(a)) {
if (this.fl) {
this.ba.a$y(this, a, this.aab.qq - 1);
}
return;
}
super.p8(a);
}
eg(a) {
if (this.aab != null && this.aab.dw && this.aab.hasOthersCategory) {
if (this.aab.tq(a)) {
return true;
}
}
return super.eg(a);
}
p6(a) {
if (this.aab != null && this.aab.dw && this.aab.tq(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.aab;
let g = new ScalerParams(1, this.dc.yv, this.xf, f.dr);
g.c = this.getEffectiveViewport1(this.cw);
let h = this.aah;
let i = new ScalerParams(1, this.dc.yv, this.xf, h.dr);
i.c = this.getEffectiveViewport1(this.cw);
let j = this.abg;
a.clear();
this.xu.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.aai.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.aci(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.aab != null && this.aab.dw && a == this.aab.othersIndex) {
c = this.aab.t3(false);
}
}
let d = NaN;
if (c != null) {
d = this.jm(c);
}
let e = this.aci(d, c, a, this.abf >= 0 ? this.abf : 5, this.abg, false, false, b);
if (e != null) {
return e;
}
return super.k3(a, b);
}
aci(a, b, c, d, e, f, g, h) {
let i = null;
let j = this.aab.dw && this.aab.tq(b);
let k = this.aao;
if (h) {
k = this.aap;
}
if (k == 0) {
if (h) {
k = 5;
}
else {
k = 6;
}
}
if ((h && ((this.z5 != null) || (j && this.z6 != null))) || (!h && ((this.z8 != null) || (j && this.z7 != null)))) {
let l = this.abc(a, b, c, d, f);
let m = this.abd(a, b, c, e, f);
let n = this.abx(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.z6;
}
else {
p = this.z7;
}
if (p == null) {
if (h) {
p = this.z5;
}
else {
p = this.z8;
}
}
}
else {
if (h) {
p = this.z5;
}
else {
p = this.z8;
}
}
i = p.i(o);
}
else if (k != 1) {
switch (k) {
case 2:
i = this.aby(a, b, c, d, f);
break;
case 3:
i = this.abz(a, b, c, e, f);
break;
case 4:
{
let q = this.aby(a, b, c, d, f);
let r = this.abz(a, b, c, e, f);
i = q + this.abo + r;
}
break;
case 5:
i = this.abx(c);
break;
case 6:
{
let s = this.aby(a, b, c, d, f);
let t = this.abx(c);
i = t + this.abo + s;
}
break;
case 7:
{
let u = this.abz(a, b, c, e, f);
let v = this.abx(c);
i = v + this.abo + u;
}
break;
case 8:
{
let w = this.aby(a, b, c, d, f);
let x = this.abz(a, b, c, e, f);
let y = this.abx(c);
i = y + this.abo + w + this.abo + x;
}
break;
}
}
else {
if (g) {
i = this.aby(a, b, c, d, f);
}
else {
i = this.abx(c);
}
}
return i;
}
abx(a) {
let b = this.aab;
let c = this.au(true);
if (this.aab != null && this.aab.dw && this.aab.hasOthersCategory && a == this.aab.othersIndex) {
if (this.z4 != null) {
c = this.z4;
}
}
if (c != null) {
let d = super.k3(a, false);
if (d != null) {
return c.i(d);
}
else {
return null;
}
}
else {
return b.jh(a);
}
}
aby(a, b, c, d, e) {
let f = a;
f = this.abk(c, f);
if (e) {
return this.abm(f, d);
}
else {
a = this.jm(b);
if (!isNaN_(a)) {
return this.abm(a, d);
}
else {
return this.abm(f, d);
}
}
}
abc(a, b, c, d, e) {
let f = a;
f = this.abk(c, f);
if (e) {
return f;
}
else {
a = this.jm(b);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
}
abz(a, b, c, d, e) {
if (this.aab == null || !this.aab.dw) {
return this.aby(a, b, c, d, e);
}
let f = this.aab.tx(c);
if (e) {
return this.abm(f, d) + "%";
}
else {
a = this.aab.tx(c);
if (!isNaN_(a)) {
return this.abm(a, d) + "%";
}
else {
return this.abm(f, d) + "%";
}
}
}
abd(a, b, c, d, e) {
if (this.aab == null || !this.aab.dw) {
return this.abc(a, b, c, d, e);
}
let f = this.aab.tx(c);
if (e) {
return f;
}
else {
a = this.aab.tx(c);
if (!isNaN_(a)) {
return a;
}
else {
return f;
}
}
}
abk(a, b) {
return b;
}
abm(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;
}
aar(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;
}
aa8() {
return false;
}
h1() {
let a = super.h1();
if (this.aa8()) {
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.aa8()) {
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.aa8()) {
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.aan;
}
else {
return this.bo.aak;
}
}
aas(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.aaj.da.c;
let e = this.aaj.da.d;
let f = this.aaj.da.b;
if (f == 0) {
return null;
}
let g = this.aal();
let h = this.dp.count;
let i = this.aab;
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.aab.dw && this.aab.tq(a)) {
l = this.aab.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;
}
aat(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.aaj.da.c;
let e = this.aaj.da.d;
let f = this.aaj.da.b;
if (f == 0) {
return null;
}
let g = this.aal();
let h = this.dp.count;
let i = this.aab;
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.aab.dw && this.aab.tq(a)) {
l = this.aab.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.aas(a, b, this.aau);
this.aau = d;
return d;
}
else {
let e = this.aar(a, b, this.aau);
this.aau = e;
return e;
}
}
di(a, b, c) {
if (this.f3(this.by) && !c) {
let d = this.aat(a, b, this.aav);
this.aav = d;
return d;
}
else {
let e = this.aar(a, b, this.aav);
e.d = true;
this.aav = e;
return e;
}
}
aa7() {
return (this.assigningRadialStyle != null && this.aax) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
}
aa6() {
return (this.assigningRadialMarkerStyle != null && this.aaw) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
}
aco(a) {
if (this.assigningRadialStyle != null && this.aax) {
this.assigningRadialStyle(this, a);
}
}
acn(a) {
if (this.assigningRadialMarkerStyle != null && this.aaw) {
this.assigningRadialMarkerStyle(this, a);
}
}
abh(a) {
return a.da.b;
}
abi(a) {
return a.da.c;
}
ai() {
return [this.aab, this.aah];
}
tb(a, b) {
this.aaj.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.aaj.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.aab != null) {
this.aab.c0(this);
}
if (this.aah != null) {
this.aah.c0(this);
}
}
if (c == null && d != null) {
if (this.aab != null) {
this.aab.d8(this);
}
if (this.aah != null) {
this.aah.d8(this);
}
}
this.aaj.da.e(this.im);
this.sa(false);
break;
case RadialBase.$$p[0]:
if (this.aab != null && this.aah != null) {
this.aai = new RadialAxes(this.aah, this.aab);
}
if (c != null) {
c.c0(this);
}
if (d != null) {
d.d8(this);
}
this.aaj.da.e(this.im);
this.sa(false);
break;
case RadialBase.$$p[24]:
if (this.aab != null && this.aah != null) {
this.aai = new RadialAxes(this.aah, this.aab);
}
if (c != null) {
c.c0(this);
}
if (d != null) {
d.d8(this);
}
this.aaj.da.e(this.im);
if (this.aah == null || !this.aah.ei()) {
this.sa(false);
}
break;
case RadialBase.$$p[3]:
case RadialBase.$$p[4]:
if (this.abq != null) {
this.z4 = new BindingFormatter();
this.z4.j = this.abq;
this.z4.d = this.zy;
}
else {
this.z4 = null;
}
break;
case RadialBase.$$p[21]:
case RadialBase.$$p[22]:
if (this.acf != null) {
this.z8 = new BindingFormatter();
this.z8.j = this.acf;
this.z8.d = this.z3;
}
else {
this.z8 = null;
}
break;
case RadialBase.$$p[12]:
case RadialBase.$$p[13]:
if (this.ab3 != null) {
this.z5 = new BindingFormatter();
this.z5.j = this.ab3;
this.z5.d = this.z0;
}
else {
this.z5 = null;
}
break;
case RadialBase.$$p[19]:
case RadialBase.$$p[20]:
if (this.acf != null) {
this.z7 = new BindingFormatter();
this.z7.j = this.acc;
this.z7.d = this.z2;
}
else {
this.z7 = null;
}
break;
case RadialBase.$$p[17]:
case RadialBase.$$p[18]:
if (this.ab3 != null) {
this.z6 = new BindingFormatter();
this.z6.j = this.ab9;
this.z6.d = this.z1;
}
else {
this.z6 = null;
}
break;
case "SyncLink":
if (this.c4 != null && this.dc != null) {
this.aaj.da.e(this.im);
this.sa(false);
}
break;
case "TransitionProgress":
this.aan.d(this.j1, this.aam, this.aak);
if (this.d7(this.cw)) {
return;
}
if (this.j1 == 1) {
this.aak.ab();
this.acp(this.aak, this.aaj);
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.acp(this.aan, this.aaj);
}
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.aaj.da.e(this.im);
}
break;
case RadialBase.$$p[10]:
this.aax = this.aa5();
this.sa(false);
break;
case RadialBase.$$p[9]:
this.aaw = this.aa4();
this.sa(false);
break;
}
}
aa5() {
return this.aa2;
}
aa4() {
return this.aa1;
}
aaz(a) {
if (typeCast(NumericRadiusAxis.$, a) !== null) {
return true;
}
return false;
}
aay(a) {
if (typeCast(CategoryAngleAxis.$, a) !== null) {
return true;
}
return false;
}
ky(a) {
let b = this.ke(a);
let c = false;
if (this.aab != null && this.aab.dw) {
let d = this.aab;
let e = d.hasOthersCategory && b == this.aab.qp - 1;
c = e;
}
if (c) {
return this.aab.t3(true);
}
return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
}
aba(a) {
let b = this.cw.ca;
let c = this.cw.b9;
let d = this.cw.getEffectiveViewport();
if (this.aab != null && !b.isEmpty && !c.isEmpty && this.aai != null) {
let e = this.aai.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.aab != null && !b.isEmpty && !c.isEmpty && this.aai != null) {
let f = this.aai.c(a, b, c, d);
if (f < 0) {
f += Math.PI * 2;
}
if (f > Math.PI * 2) {
f -= Math.PI * 2;
}
let g = this.aab.getUnscaledAngle(f);
if (this.aab.categoryMode != 0) {
g -= 0.5;
}
e = g;
}
return e;
}
abb(a, b, c, d) {
return this.aab.sj(a, b, c, d);
}
ke(a) {
let b = truncate(Math.round(this.i0(a)));
let c = false;
if (this.aab != null && this.aab.dw) {
let d = this.aab;
let e = d.hasOthersCategory && b == this.aab.qp - 1;
c = e;
}
if (c) {
let f = this.aab;
return this.aab.qp - 1;
}
if (this.dp != null && b == this.dp.count) {
b = 0;
}
return b;
}
gl(a) {
return false;
}
aal() {
let a = this.aak;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.aan;
}
return a;
}
qr() {
super.qr();
if (this.aab != null) {
this.aab.l8(false);
}
if (this.aah != null) {
this.aah.l8(false);
}
}
hm(a, b, c) {
let d = true;
let e = c;
if (!super.hm(a, b, c) || !c.r() || b.isEmpty || a.isEmpty || this.aab == null || this.aab.itemsSource == null || this.aah == null || this.aai == null || this.dp == null || this.aab.b7 == null || this.aah.b7 == null || this.aah.ra == this.aah.q9) {
e.da.b = 0;
d = false;
}
return d;
}
aae() {
return 1;
}
abe() {
return Math.max(0, 0.5 * this.aah.tt);
}
gv() {
return this.aa3;
}
gw() {
return true;
}
sb(a) {
super.sb(a);
this.aaj.da.e(this.im);
if (this.d7(this.cw)) {
this.aak.ae();
this.aan.ae();
this.aam.ae();
return;
}
if (this.gz) {
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.acp(this.aan, this.aaj);
}
else {
this.acp(this.aak, this.aaj);
}
return;
}
if (this.gn(a)) {
let b = this.aam;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.aam = this.aan;
this.aan = b;
}
else {
this.aam = this.aak;
this.aak = b;
}
let c = false;
this.acm(this.aak, this.aaj);
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.aan;
this.aan = this.aam;
this.aam = d;
c = true;
}
this.aag.x(this, this.aam, this.aak, this.isVertical, this.aab, this.aah, this.aaf, this.aae(), this.c6, this.c5(), runOn(this, this.abe), this.aaj.b9);
if (this.hc) {
let e = this.aan;
this.aan = this.aam;
this.aam = 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.aan;
this.aan = this.aam;
this.aam = f;
c = true;
}
this.aag.x(this, this.aam, this.aak, this.isVertical, this.aab, this.aah, this.aaf, this.aae(), this.c6, this.c5(), runOn(this, this.abe), this.aaj.b9);
let g = this.aak;
this.aak = this.aam;
this.aam = g;
if (this.g9) {
let h = this.aan;
this.aan = this.aam;
this.aam = 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.acm(this.aak, this.aaj);
this.acp(this.aak, this.aaj);
}
}
abj() {
if (this.bo != null) {
let a = this.bo;
return a.abj();
}
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.aab == this.aab && d.preferredCategoryMode(d.aab) == 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.aai.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.aab.qq - 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.aab.qq);
if (c == 2 || c == 1) {
b.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.aab.p0.item(l);
return $ret;
})()));
}
else {
b.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.aab.p0.item(l);
$ret.series = this;
return $ret;
})()));
}
}
}
static { this.$$p = markDep(DependencyProperty, PropertyMetadata, RadialBase, 'raisePropertyChanged', ['AngleAxis:aab:acq', [CategoryAngleAxis.$, null], 'AutoCalloutLabelPrecision:abf:acr', [1, -1], 'AutoCalloutLabelValueSeparator:abo:acs', [2, " - "], 'AutoCalloutOthersLabelFormat:abq:act', [2, null], 'AutoCalloutOthersLabelFormatSpecifiers:zy:acu', [Array_$type, null], 'AutoCalloutPercentagePrecision:abg:acv', [1, 2], 'AutoCalloutRadialLabelMode:aao:acw', [RadialLabelMode_$type, enumGetBox(RadialLabelMode_$type, 0)], 'CategoryCollisionMode:aac:acx', [CategoryCollisionMode_$type, enumGetBox(CategoryCollisionMode_$type, 1)], 'ClipSeriesToBounds:aa0:acy', [0, false], 'IsCustomRadialMarkerStyleAllowed:aa1:acz', [0, false], 'IsCustomRadialStyleAllowed:aa2:ac0', [0, false], 'IsTransitionInEnabled:aa3:ac1', [0, false], 'LegendProportionalRadialLabelFormat:ab3:ac2', [2, null], 'LegendProportionalRadialLabelFormatSpecifiers:z0:ac3', [Array_$type, null], 'LegendRadialLabelMode:aap:ac4', [RadialLabelMode_$type, enumGetBox(RadialLabelMode_$type, 0)], 'OthersCategoryBrush:adf:ac5', [Brush.$, null], 'OthersCategoryOutline:adg:ac6', [Brush.$, null], 'OthersLegendProportionalRadialLabelFormat:ab9:ac7', [2, null], 'OthersLegendProportionalRadialLabelFormatSpecifiers:z1:ac8', [Array_$type, null], 'OthersProportionalRadialLabelFormat:acc:ac9', [2, null], 'OthersProportionalRadialLabelFormatSpecifiers:z2:ada', [Array_$type, null], 'ProportionalRadialLabelFormat:acf:adb', [2, null], 'ProportionalRadialLabelFormatSpecifiers:z3:adc', [Array_$type, null], 'TransitionInMode:aaf:add', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'ValueAxis:aah:ade', [NumericRadiusAxis.$, null]]); }
}
/**
* @hidden
*/
export class RadialBaseView extends MarkerSeriesView {
static { this.$t = markType(RadialBaseView, 'RadialBaseView', 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);
}
}