igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
1,373 lines • 51 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 { MarkerSeries } from "./MarkerSeries";
import { Base, runOn, delegateCombine, Number_$type, enumGetBox, Point_$type, typeCast, fromEnum, markType, markDep } from "igniteui-angular-core";
import { PolarAxisInfoCache } from "./PolarAxisInfoCache";
import { SeriesRenderer$2 } from "./SeriesRenderer$2";
import { PolarFrame } from "./PolarFrame";
import { DependencyProperty } from "igniteui-angular-core";
import { NumericAngleAxis } from "./NumericAngleAxis";
import { NumericRadiusAxis } from "./NumericRadiusAxis";
import { TrendLineType_$type } from "igniteui-angular-core";
import { Brush } from "igniteui-angular-core";
import { PenLineCap_$type } from "igniteui-angular-core";
import { DoubleCollection } from "igniteui-angular-core";
import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode";
import { HighlightingInfo } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { SeriesPointOfInterest } from "./SeriesPointOfInterest";
import { ScalerParams } from "./ScalerParams";
import { Rect } from "igniteui-angular-core";
import { Marker } from "./Marker";
import { MarkerSeriesView } from "./MarkerSeriesView";
import { PolarAxes } from "./PolarAxes";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { IFastItemsSource_$type } from "igniteui-angular-core";
import { SeriesRenderingArguments } from "./SeriesRenderingArguments";
import { AxisRange } from "./AxisRange";
import { Dictionary$2 } from "igniteui-angular-core";
import { OwnedPoint } from "./OwnedPoint";
import { GeometryUtil } from "igniteui-angular-core";
import { DataContext } from "igniteui-angular-core";
import { HashPool$2 } from "igniteui-angular-core";
import { Clipper } from "igniteui-angular-core";
import { PolarTrendLineManager } from "./PolarTrendLineManager";
import { TrendResolutionParams } from "./TrendResolutionParams";
import { AssigningPolarStyleEventArgs } from "./AssigningPolarStyleEventArgs";
import { AssigningPolarMarkerStyleEventArgs } from "./AssigningPolarMarkerStyleEventArgs";
import { SeriesRenderManager } from "./SeriesRenderManager";
import { DataLegendSeriesValueInfo } from "igniteui-angular-core";
import { DataLegendSeriesContext } from "igniteui-angular-core";
import { ChartSelection } from "./ChartSelection";
import { CollisionRect } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { truncate, isNaN_, isInfinity } from "igniteui-angular-core";
import { Defaults } from "./Defaults";
import { NumericMarkerManager } from "./NumericMarkerManager";
import { GeometryGroup } from "igniteui-angular-core";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
/**
* @hidden
*/
export let PolarBase = /*@__PURE__*/ (() => {
class PolarBase extends MarkerSeries {
constructor() {
super();
this.yx = null;
this.yo = null;
this.yv = null;
this.ace = null;
this.acd = null;
this.acc = null;
this.y9 = null;
this.zg = null;
this.zh = null;
this.y1 = new PolarFrame();
this.y3 = new PolarFrame();
this.yz = new PolarFrame();
this.yu = null;
this.zz = null;
this.y5 = 1;
this.zl = false;
this.zk = false;
this.ze = null;
this.zf = null;
this.assigningPolarStyle = null;
this.assigningPolarMarkerStyle = null;
this.y4 = null;
this.y2 = null;
this.yy = null;
this.y4 = new PolarSeriesRenderManager();
this.y6 = this.y7();
this.y2 = new PolarFrame();
this.y3.x = runOn(this, this.acb);
this.y1.x = runOn(this, this.acb);
this.yz.x = runOn(this, this.acb);
this.y9 = new SeriesRenderer$2(PolarFrame.$, PolarBaseView.$, 0, runOn(this, this.abc), runOn(this, this.abg), runOn(this, this.d3), runOn(this, this.r6), runOn(this, this.aa5));
}
cs() {
return new PolarBaseView(this);
}
q0(a) {
super.q0(a);
this.yw = a;
}
o1() {
super.o1();
this.ys = null;
this.yt = null;
}
get_fo() {
return true;
}
eb(a, b, c, d, e) {
if (!this.hasMarkers) {
return false;
}
let f = this.ys;
let g = new ScalerParams(1, this.db.v4, this.wr, f.ch);
g.c = this.getEffectiveViewport1(this.cv);
let h = this.yt;
let i = new ScalerParams(1, this.db.v4, this.wr, h.ch);
i.c = this.getEffectiveViewport1(this.cv);
a.clear();
this.w5.cj((j) => {
if (j._visibility == 0) {
let k = new SeriesPointOfInterest();
let l = j.n;
let m = j.o;
if (l < this.wr.left || l > this.wr.right || m < this.wr.top || m > this.wr.bottom) {
return;
}
let n;
let o;
let p = this.yu.f(l, m, this.cv.by, this.cv.bx, this.cv.getEffectiveViewport(), n, o);
n = p.p5;
o = p.p6;
k.d = n;
k.e = o;
k.b = j.content;
k.g = this.vf;
k.c = j.ak;
if (this.g8) {
k.g = this.vm(j.ak);
}
a.add(k);
}
});
return true;
}
aa5() {
if (this.dc.g) {
this.dc.t();
}
}
aa7() {
this.yu.e(this.yx.w, this.zi, this.zj, this.ace, this.acd, this.acc, (a, b) => Math.cos(b), (a, b) => Math.sin(b), true);
}
ga() {
return this.highlightedItemsSource != null || (this.aan != null && this.aal != null);
}
zx() {
return false;
}
hs() {
let a = super.hs();
{
let b = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "AngleMemberPath";
$ret.p = true;
$ret.y = "HighlightedAngleMemberPath";
$ret.q = true;
return $ret;
})());
b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.aa8));
a.add(b);
}
{
let c = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "RadiusMemberPath";
$ret.p = true;
$ret.y = "HighlightedRadiusMemberPath";
$ret.q = true;
return $ret;
})());
c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.aa9));
a.add(c);
}
if (this.zx()) {
let d = ((() => {
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(d);
}
if (!this.zx()) {
let e = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Brush";
$ret.p = true;
$ret.y = "ActualBrush";
$ret.q = true;
return $ret;
})());
e.valueResolving = delegateCombine(e.valueResolving, runOn(this, this.rz));
a.add(e);
}
if (!this.zx()) {
let f = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Outline";
$ret.p = true;
$ret.y = "ActualOutline";
$ret.q = true;
return $ret;
})());
f.valueResolving = delegateCombine(f.valueResolving, runOn(this, this.rz));
a.add(f);
}
return a;
}
aa9(a, b) {
if (this.aan != null) {
b.value = this.aan;
return;
}
b.value = this.aa0;
}
aa8(a, b) {
if (this.aal != null) {
b.value = this.aal;
return;
}
b.value = this.aai;
}
get zi() {
return this.zg;
}
set zi(a) {
if (this.zg != a) {
let b = this.zi;
this.zg = a;
this.raisePropertyChanged("AngleColumn", b, this.zi);
}
}
get zj() {
return this.zh;
}
set zj(a) {
if (this.zh != a) {
let b = this.zj;
this.zh = a;
this.raisePropertyChanged("RadiusColumn", b, this.zj);
}
}
get ab6() {
return this.c(PolarBase.abh);
}
set ab6(a) {
this.h(PolarBase.abh, a);
}
y0() {
let a = this.yz;
if (this.d3()) {
if (this.dc.g) {
this.dc.t();
}
a = this.y3;
}
return a;
}
qa() {
super.qa();
if (this.yt != null) {
this.yt.ib(false);
}
if (this.ys != null) {
this.ys.ib(false);
}
}
pa(a, b, c, d) {
let e = false;
this.yw.c0.g$e(a, b, c, d);
if (this.ys != null && !this.ys.c1()) {
e = true;
}
if (this.yt != null && !this.yt.c1()) {
e = true;
}
if (e) {
this.rq(true);
}
}
sp(a, b) {
this.rq(false);
}
sq(a, b) {
this.rq(false);
}
hd(a, b, c) {
let d = true;
if (!super.hd(a, b, c) || !c.o() || b.isEmpty || a.isEmpty || this.ys == null || this.yt == null || this.zi == null || this.zj == null || this.zi.count == 0 || this.zj.count == 0 || this.dn == null || this.dn.count != this.zi.count || this.dn.count != this.zj.count || this.yu == null || this.ys.bi == null || this.yt.bi == null || this.ys.l4 == this.ys.l3 || this.yt.l4 == this.yt.l3) {
d = false;
}
return d;
}
rr(a) {
super.rr(a);
let b;
let c;
let d = this.getViewInfo(c, b);
c = d.p0;
b = d.p1;
if (!this.hd(c, b, this.cv)) {
this.o4(true, this.cv);
return;
}
this.ace = b;
this.acd = c;
this.acc = this.cv.getEffectiveViewport();
this.yv = new PolarAxisInfoCache(this.ys, this.yt, this.dn);
let e = new SeriesRenderingArguments(this, c, b, a, this.gq);
let f = this.y9.g(e, this.y1, this.yz, this.y3, this.yw);
this.y1 = f.p1;
this.yz = f.p2;
this.y3 = f.p3;
}
acb(a) {
let b = this.yu.h(a.x, a.y, this.ace, this.acd, this.acc, this.yv.e, this.yv.d, this.yv.g, this.yv.f, this.yv.i, this.yv.h);
return b;
}
ay(a) {
if (a != null && a == this.ys && this.zi != null) {
return new AxisRange(this.zi.minimum, this.zi.maximum);
}
if (a != null && a == this.yt && this.zj != null) {
return new AxisRange(this.zj.minimum, this.zj.maximum);
}
return null;
}
gc(a) {
let b = this.cv.by;
b = b.copy();
let c = this.cv.bx;
let d = !b.isEmpty && !c.isEmpty && this.dn != null ? this.dn.indexOf(a) : -1;
if (this.ys == null || this.zi == null || this.yt == null || this.zj == null) {
return false;
}
if (d < 0 || d > this.zi.count - 1 || d > this.zj.count - 1) {
return false;
}
let e = this.ys.getScaledAngle(this.zi.item(d));
let f = this.yt.od(this.zj.item(d));
let g = 0.5 + (Math.cos(e) * f);
let h = 0.5 + (Math.sin(e) * f);
if (!isNaN_(g)) {
if (g < b.left + 0.1 * b.width) {
g = g + 0.4 * b.width;
b.x = g - 0.5 * b.width;
}
if (g > b.right - 0.1 * b.width) {
g = g - 0.4 * b.width;
b.x = g - 0.5 * b.width;
}
}
if (!isNaN_(h)) {
if (h < b.top + 0.1 * b.height) {
h = h + 0.4 * b.height;
b.y = h - 0.5 * b.height;
}
if (h > b.bottom - 0.1 * b.height) {
h = h - 0.4 * b.height;
b.y = h - 0.5 * b.height;
}
}
if (this.c3 != null) {
this.c3.au(this.db, b, true);
}
return d >= 0;
}
km(a) {
let b = this.j2(a);
if (this.dn != null && b >= 0 && b < this.dn.count) {
return this.dn.item(b);
}
return null;
}
j2(a) {
let b = truncate(Math.round(this.iq(a)));
return b;
}
iq(a) {
switch (this.y6) {
case 1: return this.z3(a);
case 3: return this.z4(a);
case 2: return this.z1(a);
case 4: return this.z2(a);
}
return -1;
}
z2(a) {
return this.z5(a, false);
}
z1(a) {
let b = this.v6(a);
let c = b.x;
let d = b.y;
if (this.dn == null || this.ys == null || this.yt == null || this.zi == null || this.zj == null) {
return -1;
}
if (this.dn.count > this.z7) {
return -1;
}
if (!this.zp()) {
return -1;
}
let e = this.zz;
let f = 1.7976931348623157E+308;
let g = -1;
for (let h = 0; h < this.zi.count; h++) {
let i = e._inner[h].x;
let j = e._inner[h].y;
let k = (c - i) * (c - i) + (d - j) * (d - j);
if (k < f) {
f = k;
g = h;
}
}
return g;
}
zp() {
let a = this.yz;
if (this.d3()) {
a = this.y3;
}
if (a == null || a.w.count == 0) {
return false;
}
this.zz = a.w;
return true;
}
z5(a, b) {
if (!this.zs) {
return -1;
}
let c = { $type: Point_$type, x: 0, y: 0 };
let d = true;
let e = this.yz;
if (this.d3()) {
e = this.y3;
}
if (e == null) {
return -1;
}
if (e.m == null) {
return -1;
}
if (this.dn == null || this.dn.count > this.z7) {
return -1;
}
if (!this.zp()) {
return -1;
}
let f = this.zz;
let g = this.v6(a);
let h = 1.7976931348623157E+308;
let i = -1;
for (let j = 0; j < f.count; j++) {
let k = f._inner[j];
if (j > 0) {
if (isNaN_(k.x) || isNaN_(k.y) || isNaN_(c.x) || isNaN_(c.y)) {
c = k;
continue;
}
if (!b || e.j.containsKey(this.dn.item(j)) || e.j.containsKey(this.dn.item(j - 1))) {
let l = GeometryUtil.h(g, c, k);
if (l < h) {
h = l;
i = j;
}
}
}
c = k;
}
if (i >= 0) {
let m = f._inner[i];
let n = f._inner[i - 1];
if (!b || (e.j.containsKey(this.dn.item(i)) && e.j.containsKey(this.dn.item(i - 1)))) {
let o = GeometryUtil.m(g, n, m);
return (i - 1) + o;
}
else if (e.j.containsKey(this.dn.item(i))) {
return i;
}
else {
return i - 1;
}
}
return -1;
}
z4(a) {
return this.z5(a, true);
}
z3(a) {
let b = null;
let c = 1.7976931348623157E+308;
let d = this.v6(a);
let e = d.x;
let f = d.y;
if (this.yw.c1.e > this.z7) {
return -1;
}
this.yw.c4((g) => {
if (g._visibility == 0) {
let h = this.yw.cu(g);
let i = h.left + h.width / 2;
let j = h.top + h.height / 2;
let k = (e - i) * (e - i) + (f - j) * (f - j);
if (k < c) {
c = k;
b = g;
}
}
});
if (b != null) {
return b.ak;
}
return -1;
}
wb(a, b, c) {
if (this.ys == null || this.yt == null || this.zi == null || this.zj == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
let d = this.cv.by;
let e = this.cv.bx;
let f = this.getEffectiveViewport();
let g = new ScalerParams(0, d, e, this.ys.ch, f);
let h = ((() => {
let $ret = new ScalerParams(0, d, e, this.yt.ch, f);
$ret.b = this.ix();
return $ret;
})());
if (b) {
let i = this.iq(a);
if (i == -1) {
return { $type: Point_$type, x: NaN, y: NaN };
}
let j = truncate(Math.floor(i));
let k = truncate(Math.ceil(i));
if (j < 0) {
j = 0;
}
if (k < 0) {
k = 0;
}
if (k > this.dn.count - 1) {
k = this.dn.count - 1;
}
if (j > this.dn.count - 1) {
j = this.dn.count - 1;
}
if (k == j) {
return this.yu.h(this.zi.item(j), this.zj.item(j), d, e, f, this.yv.e, this.yv.d, this.yv.g, this.yv.f, this.yv.i, this.yv.h);
}
let l = i - Math.floor(i);
let m = this.yu.h(this.zi.item(j), this.zj.item(j), d, e, f, this.yv.e, this.yv.d, this.yv.g, this.yv.f, this.yv.i, this.yv.h);
let n = this.yu.h(this.zi.item(k), this.zj.item(k), d, e, f, this.yv.e, this.yv.d, this.yv.g, this.yv.f, this.yv.i, this.yv.h);
let o = m.x;
let p = m.y;
let q = n.x;
let r = n.y;
let s = q - o;
let t = r - p;
return { $type: Point_$type, x: o + s * l, y: p + t * l };
}
else {
let u = this.j2(a);
if (u == -1) {
return { $type: Point_$type, x: NaN, y: NaN };
}
return this.yu.h(this.zi.item(u), this.zj.item(u), d, e, f, this.yv.e, this.yv.d, this.yv.g, this.yv.f, this.yv.i, this.yv.h);
}
}
ai() {
return [this.ys, this.yt];
}
kp(a, b) {
let c = this.nc(b);
if (c == PolarBase.$$p[3]) {
return this.kq(a, b, this.aai);
}
if (c == PolarBase.$$p[15]) {
return this.kq(a, b, this.aa0);
}
if (c == PolarBase.$$p[5]) {
return this.kq(a, b, this.aal);
}
if (c == PolarBase.$$p[6]) {
return this.kq(a, b, this.aan);
}
return super.kp(a, b);
}
mc(a) {
let b = this.nc(a);
if (b == PolarBase.$$p[3]) {
return this.aai;
}
if (b == PolarBase.$$p[15]) {
return this.aa0;
}
if (b == PolarBase.$$p[5]) {
return this.aal;
}
if (b == PolarBase.$$p[6]) {
return this.aan;
}
return super.mc(a);
}
q8(a, b, c, d) {
super.q8(a, b, c, d);
if (this.yw.c0.g$b(a, b, c, d)) {
this.rq(false);
this.qk();
}
switch (b) {
case PolarBase.$$p[1]:
case PolarBase.$$p[2]:
case PolarBase.$$p[13]:
case PolarBase.$$p[14]:
this.qe();
break;
case "FastItemsSource":
if (typeCast(IFastItemsSource_$type, c) != null) {
c.deregisterColumn(this.zi);
c.deregisterColumn(this.zj);
this.zi = null;
this.zj = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
this.zi = this.dk(this.aai);
this.zj = this.dk(this.aa0);
}
if ((this.yt != null && !this.yt.c1()) || (this.ys != null && !this.ys.c1())) {
this.rq(this.gf && c != null);
}
break;
case PolarBase.$$p[0]:
if (this.ys != null && this.yt != null) {
this.yu = new PolarAxes(this.yt, this.ys);
}
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
if (this.ys != null && !this.ys.c1()) {
this.rq(false);
}
else if (c != null && d == null) {
this.o4(true, this.cv);
}
break;
case PolarBase.$$p[12]:
if (this.ys != null && this.yt != null) {
this.yu = new PolarAxes(this.yt, this.ys);
}
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
if (this.yt != null && !this.yt.c1()) {
this.rq(false);
}
else if (c != null && d == null) {
this.o4(true, this.cv);
}
if (this.ys != null && !this.ys.c1()) {
this.ys.h7();
}
break;
case PolarBase.$$p[3]:
if (this.dn != null) {
this.dn.deregisterColumn(this.zi);
this.zi = this.dk(this.aai);
}
break;
case "AngleColumn":
this.yw.c0.g$i();
if (this.ys != null && !this.ys.c1()) {
this.rq(this.gf && this.d7);
}
break;
case PolarBase.$$p[15]:
if (this.dn != null) {
this.dn.deregisterColumn(this.zj);
this.zj = this.dk(this.aa0);
}
break;
case "RadiusColumn":
this.yw.c0.g$i();
if (this.yt != null && !this.yt.c1()) {
this.rq(this.gf && this.d7);
}
break;
case PolarBase.$$p[16]:
this.rq(false);
this.qk();
break;
case PolarBase.$$p[11]:
this.rq(false);
this.qk();
break;
case "TransitionProgress":
this.yv = new PolarAxisInfoCache(this.ys, this.yt, this.dn);
this.ace = this.cv.by;
this.acd = this.cv.bx;
this.acc = this.cv.getEffectiveViewport();
this.y3.v = this.zy;
this.y3.c(this.jp, this.y1, this.yz);
if (this.d5(this.cv)) {
return;
}
if (this.jp == 1) {
this.abg(this.yz, this.yw);
this.qn();
}
else {
this.abg(this.y3, this.yw);
}
if (this.db != null) {
this.db.qo(this);
}
break;
case "TrendLineBrush":
this.re(b);
break;
case PolarBase.$$p[4]:
this.rq(false);
this.qk();
break;
case "TrendLineType":
this.qk();
break;
case PolarBase.$$p[8]:
this.zl = this.zu();
this.rq(false);
break;
case PolarBase.$$p[7]:
this.zk = this.zt();
this.rq(false);
break;
case PolarBase.$$p[9]:
this.y6 = this.y7();
break;
}
}
get y6() {
return this.y5;
}
set y6(a) {
let b = this.y5;
this.y5 = a;
if (b != this.y5) {
this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.y5));
}
}
y7() {
if (this.y8 != 0) {
return this.y8;
}
return this.zs ? 4 : 1;
}
get_zs() {
return false;
}
get zs() {
return this.get_zs();
}
zu() {
return this.zr;
}
zt() {
return this.zq;
}
zn(a) {
if (typeCast(NumericRadiusAxis.$, a) !== null) {
return true;
}
return false;
}
zm(a) {
if (typeCast(NumericAngleAxis.$, a) !== null) {
return true;
}
return false;
}
o4(a, b) {
super.o4(a, b);
let c = b;
if (a) {
c.c1.clear();
}
c.c0.g$d();
}
yp(a, b) {
let c = a.top - 10;
let d = a.bottom + 10;
let e = a.left - 10;
let f = a.right + 10;
let g = ((() => {
let $ret = new Clipper(1, e, d, f, c, false);
$ret.i = b;
return $ret;
})());
return g;
}
aa4(a, b, c, d) {
a.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, b);
let e = this.dn;
for (let f = 0; f < b; f++) {
let g = a.w._inner[f];
if (!isInfinity(g.x) && !isInfinity(g.y)) {
let h = { $type: Point_$type, x: this.zi.item(f), y: this.zj.item(f) };
let i = { $type: Point_$type, x: g.x, y: g.y };
a.g.addItem(e.item(f), ((() => {
let $ret = new OwnedPoint();
$ret.a = e.item(f);
$ret.b = h;
$ret.c = i;
return $ret;
})()));
}
}
}
abc(a, b) {
let c = b.by;
let d = b.bx;
let e = b.getEffectiveViewport();
a.j.clear();
a.n.clear();
let f = Math.min(this.zi != null ? this.zi.count : 0, this.zj != null ? this.zj.count : 0);
if (f < 1) {
return;
}
this.yv = new PolarAxisInfoCache(this.ys, this.yt, this.dn);
this.yx = a;
this.acd = d;
this.ace = c;
this.acc = b.getEffectiveViewport();
b.cy.l(a.j, this.z8, c, d, this.ic);
if (f <= this.z8) {
this.aa4(a, f, c, d);
}
let g = this.yp(d, a.n);
let h = Math.min(this.ys.l4, this.ys.l3);
let i = Math.max(this.ys.l3, this.ys.l4);
b.c0.i = this.zy;
b.c0.h = 0;
b.c0.k = this.yt.n7;
b.c0.j = this.yt.n6;
b.c0.l = (j, k) => this.yu.c(j, k, c, d, e, Math.cos);
b.c0.m = (j, k) => this.yu.d(j, k, c, d, e, Math.sin);
let j = new List$1(Number_$type, 0);
for (let k = 0; k < this.zi.count; k++) {
if (this.zi.item(k) >= h && this.zi.item(k) <= i) {
j.add(this.zi.item(k));
}
}
let l = this.zj;
if (j.count != this.zi.count) {
l = new List$1(Number_$type, 0);
for (let m = 0; m < this.zi.count; m++) {
if (this.zi.item(m) >= h && this.zi.item(m) <= i) {
l.add(this.zj.item(m));
}
}
}
b.c0.n(a.n, this.za, j, l, this.z9, runOn(this.ys, this.ys.getScaledAngle), runOn(this.yt, this.yt.od), ((() => {
let $ret = new TrendResolutionParams();
$ret.d = this.ic;
$ret.i = d;
$ret.h = e;
$ret.j = c;
return $ret;
})()), g, h, i);
}
get_fd() {
return true;
}
zc(a, b, c) {
return null;
}
zd(a, b, c) {
if (this.dn == null) {
return null;
}
let d = this.y0();
let e = this.yw.b1(this.v6(b));
let f = -1;
if (e == null) {
if (a != null) {
f = this.dn.indexOf(a);
}
else {
return null;
}
}
else {
f = e.ak;
}
if (f == -1) {
return null;
}
let g = new HighlightingInfo();
g.i = this;
g.g = f;
g.f = f;
g.c = false;
g.d = true;
if (c != null && c.g == g.g && c.f == g.f) {
return c;
}
return g;
}
zb(a, b, c) {
let d = new HighlightingInfo();
d.i = this;
d.g = 0;
d.f = this.dn.count - 1;
d.c = true;
if (c != null && c.g == d.g && c.f == d.f) {
return c;
}
return d;
}
dg(a, b, c) {
if (this.ed && this.fy(this.bx) && !c) {
let d = this.zc(a, b, this.ze);
this.ze = d;
return d;
}
else {
let e = this.zb(a, b, this.ze);
this.ze = e;
return e;
}
}
dh(a, b, c) {
if (this.fy(this.bx) && !c) {
let d = this.zd(a, b, this.zf);
this.zf = d;
return d;
}
else {
let e = this.zb(a, b, this.zf);
e.d = true;
this.zf = e;
return e;
}
}
zw() {
return (this.assigningPolarStyle != null && this.zl) || (this.bx != 1) || this.d2 || (this.cp != 1) || (this.co != 1);
}
zv() {
return (this.assigningPolarMarkerStyle != null && this.zk) || this.d2 || (this.bx != 1) || (this.cp != 1) || (this.co != 1);
}
abg(a, b) {
this.qw();
let c = b.by;
let d = b.bx;
let e = this.getEffectiveViewport1(b);
let f = this.wi(b);
this.yv = new PolarAxisInfoCache(this.ys, this.yt, this.dn);
if (this.xf()) {
b.cy.j(a.j, this.xh);
if (this.zv()) {
this.aa6(b, a);
}
}
b.cr();
let g = this.yp(d, b.c0.g$j.an);
b.c0.g$h(a.n, g);
this.aa3(d, c, e, f, b);
}
ym(a, b) {
return this.yn(a, b);
}
yn(a, b) {
if (b < a || a < 0 || a > this.zi.count || b < 0 || b > this.zi.count) {
return null;
}
let c = new Array((b - a) + 1);
for (let d = a; d <= b; d++) {
let e = d;
c[d - a] = this.dn.item(d);
}
return c;
}
aa6(a, b) {
a.b7 = true;
this.y4.ay(this, this.zv(), runOn(this, this.ym));
let c = this.y4.d;
let d = c != null;
let e = this.getEffectiveViewport1(a);
let f = this.dn == null ? 0 : this.dn.count;
this.yw.cj((g) => {
if (g._visibility == 0) {
let h = g.ak;
let i = g.content;
if (i == null) {
i = new DataContext();
g.content = i;
}
if (d) {
this.aba(h, f, a.q);
}
this.y4.ac(g, i);
}
});
}
abb(a, b, c) {
let d = this.bx != 1;
let e = this.cp != 1;
let f = this.co != 1;
this.y4.a0(this.y4.b, a, b, false);
this.y4.ab(this.ia);
let g = this.y4.ax;
let h = null;
let i = null;
let j = null;
let k = this.dn;
if (d && this.db != null) {
h = this.db.dl.getHighlightingInfo(this, k, g.z, g.y, false);
g.c = h;
}
if (e && this.db != null) {
i = this.db.dm.getHighlightingInfo(this, k, g.z, g.y, false);
if (i == null && this.bn != null) {
i = this.db.dm.getHighlightingInfo(this.bn, this.bn.dn, g.z, g.y, false);
}
g.d = i;
}
if (f && this.db != null) {
j = this.db.dk.getHighlightingInfo(this, k, g.z, g.y, false);
g.b = j;
}
g.h = c;
this.abe(g);
this.y4.z(this, h, i, j, c, d, e, f, a < 0);
}
aba(a, b, c) {
let d = this.bx != 1;
let e = this.cp != 1;
let f = this.co != 1;
this.y4.a0(this.y4.d, a, b, true);
this.y4.aa(this.ia);
let g = this.y4.aw;
let h = null;
let i = null;
let j = null;
let k = this.dn;
let l = null;
let m = null;
let n = null;
if (d && this.db != null) {
h = this.db.dl.getHighlightingInfo(this, k, g.z, g.y, true);
if (this.db.dl.isCrossContextHighlight(this)) {
l = this.db.dl.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.c = h;
}
if (e && this.db != null) {
i = this.db.dm.getHighlightingInfo(this, k, g.z, g.y, true);
if (i == null && this.bn != null) {
i = this.db.dm.getHighlightingInfo(this.bn, this.bn.dn, g.z, g.y, true);
}
if (this.db.dm.isCrossContextHighlight(this)) {
m = this.db.dm.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.d = i;
}
if (f && this.db != null) {
j = this.db.dk.getHighlightingInfo(this, k, g.z, g.y, true);
if (this.db.dk.isCrossContextHighlight(this)) {
n = this.db.dk.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.d = i;
}
g.h = c;
this.abd(g);
this.y4.y(this, h, i, j, c, d, e, f, g.v, this.db.dl.totalHighWaterMark, g.x, this.db.dm.totalHighWaterMark, g.t, this.db.dk.totalHighWaterMark);
}
abe(a) {
if (this.assigningPolarStyle != null && this.zl) {
this.assigningPolarStyle(this, a);
}
}
abd(a) {
if (this.assigningPolarMarkerStyle != null && this.zk) {
this.assigningPolarMarkerStyle(this, a);
}
}
aa3(a, b, c, d, e) {
e.c3(a, b, c, d);
}
sg() {
super.sg();
if (this.index < 0) {
return;
}
this.yw.c6();
}
rs(a, b) {
super.rs(a, b);
if (!this.gz) {
this.cv.a4(b);
return;
}
this.cv.a4(b);
if (this.d5(this.cu)) {
return;
}
let c = this.cu;
if (!this.gr) {
this.y2 = new PolarFrame();
this.abc(this.y2, c);
}
this.gr = false;
this.abg(this.y2, c);
this.gz = false;
}
rp(a, b, c, d, e) {
super.rp(a, b, c, d, e);
let f = this.ba.a$j.item(d);
let g = f;
f.a3(c);
if (this.d5(g)) {
return;
}
if (this.yy == null) {
this.yy = new PolarFrame();
}
this.abc(this.yy, g);
this.abg(this.yy, g);
}
abf(a, b) {
let c = new List$1(Base.$, 0);
for (let d of fromEnum(b.c)) {
if (!a.containsKey(d)) {
c.add1(d);
}
}
for (let e of fromEnum(c)) {
b.h(e);
}
}
yl(a, b, c) {
this.aa7();
return this.yx.w.toArray();
}
z0(a) {
let b = new List$1(Number_$type, 0);
let c = this.dn;
for (let d of fromEnum(this.yw.c1.c)) {
b.add(c.indexOf(d));
}
return b;
}
aca(a) {
return { $type: Point_$type, x: this.zi.item(a), y: this.zj.item(a) };
}
py(a) {
super.py(a);
this.bc.exportTrendlineData(this, a, this.yw.c0.g$j);
}
getDataLegendSeriesContextAt(a, b) {
let c = { $type: Point_$type, x: a, y: b };
let d = this.km(c);
let e = d == null ? NaN : this.iw(d, "RadiusMemberPath");
let f = d == null ? NaN : this.iw(d, "AngleMemberPath");
let g = new DataLegendSeriesValueInfo();
g.l = e;
g.a = 11;
g.r = this.aa0 != null ? this.aa0 : "Radius";
g.q = "Radius";
g.s = this.aaw != null ? this.aaw : "R:";
g.t = this.aay != null ? this.aay : "";
let h = new DataLegendSeriesValueInfo();
h.l = f;
h.a = 10;
h.r = this.aai != null ? this.aai : "Angle";
h.q = "Angle";
h.s = this.aae != null ? this.aae : "A:";
h.t = this.aag != null ? this.aag : "";
let i = new DataLegendSeriesContext();
i.e = ((() => {
let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
$ret.add(g);
$ret.add(h);
return $ret;
})());
i.h = this.mb();
return i;
}
ak(a, b) {
let c = new List$1(ChartSelection.$, 0);
this.p3(a, c, b);
return c.toArray();
}
p3(a, b, c) {
let d = this.cv.by;
let e = this.cv.bx;
let f = this.getEffectiveViewport1(this.cv);
let g = this.wi(this.cv);
let h = new CollisionRect(0, a);
let i = this.yt.k5(e, d, f, g);
for (let j = 0; j < this.dn.count; j++) {
let k = this.ys.getScaledAngle(this.zi.item(j));
let l = this.yt.od(this.zj.item(j));
let m = this.yu.c(k, l, d, e, f, Math.cos);
let n = this.yu.d(k, l, d, e, f, Math.sin);
if (h.containsLocation(m, n)) {
if (c == 7 || c == 6) {
b.add(((() => {
let $ret = new ChartSelection();
$ret.series = this;
return $ret;
})()));
return;
}
else if (c == 2 || c == 1) {
b.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.dn.item(j);
return $ret;
})()));
}
else {
b.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.dn.item(j);
$ret.series = this;
return $ret;
})()));
}
}
}
}
}
PolarBase.$t = markType(PolarBase, 'PolarBase', MarkerSeries.$);
PolarBase.abh = DependencyProperty.i("ActualTrendLineBrush", Brush.$, PolarBase.$, new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue)));
PolarBase.$$p = markDep(DependencyProperty, PropertyMetadata, PolarBase, 'raisePropertyChanged', ['AngleAxis:ys:abi', [NumericAngleAxis.$, null], 'AngleMemberAsLegendLabel:aae:abj', [2, null], 'AngleMemberAsLegendUnit:aag:abk', [2, null], 'AngleMemberPath:aai:abl', [2], 'ClipSeriesToBounds:zo:abm', [0, false], 'HighlightedAngleMemberPath:aal:abn', [2, null], 'HighlightedRadiusMemberPath:aan:abo', [2, null], 'IsCustomPolarMarkerStyleAllowed:zq:abp', [0, false], 'IsCustomPolarStyleAllowed:zr:abq', [0, false], 'ItemSearchMode:y8:abr', [ScatterItemSearchMode_$type, enumGetBox(ScatterItemSearchMode_$type, 0)], 'ItemSearchThreshold:z7:abs', [1, 10000], 'MaximumMarkers:z8:abt', [1, 400], 'RadiusAxis:yt:abu', [NumericRadiusAxis.$, null], 'RadiusMemberAsLegendLabel:aaw:abv', [2, null], 'RadiusMemberAsLegendUnit:aay:abw', [2, null], 'RadiusMemberPath:aa0:abx', [2], 'UseCartesianInterpolation:zy:ab5', [0, true], 'TrendLineType:za:ab3', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:z6:ab2', [1, 1.5], 'TrendLinePeriod:z9:ab1', [1, 7], 'TrendLineZIndex:aaa:ab4', [1, 1], 'TrendLineBrush:ab7:aby', [Brush.$, null], 'TrendLineDashArray:ab8:abz', [DoubleCollection.$], 'TrendLineDashCap:ab9:ab0', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]);
return PolarBase;
})();
/**
* @hidden
*/
export let PolarSeriesRenderManager = /*@__PURE__*/ (() => {
class PolarSeriesRenderManager extends SeriesRenderManager {
constructor() {
super(...arguments);
this.aw = null;
this.ax = null;
}
c() {
this.aw = new AssigningPolarMarkerStyleEventArgs();
return this.aw;
}
a() {
this.ax = new AssigningPolarStyleEventArgs();
return this.ax;
}
ay(a, b, c) {
this.w(a, b, c);
}
az(a, b, c) {
this.x(a, b, c);
}
a0(a, b, c, d) {
if (b == -1) {
a.e = false;
a.z = 0;
a.y = c - 1;
}
else {
if (d) {
a.z = b;
a.y = b;
}
else {
a.e = false;
a.z = b;
a.y = b;
}
}
}
}
PolarSeriesRenderManager.$t = markType(PolarSeriesRenderManager, 'PolarSeriesRenderManager', SeriesRenderManager.$);
return PolarSeriesRenderManager;
})();
/**
* @hidden
*/
export let PolarBaseView = /*@__PURE__*/ (() => {
class PolarBaseView extends MarkerSeriesView {
constructor(a) {
super(a);
this.cz = null;
this.cy = null;
this.c0 = null;
this.c1 = null;
this.cz = a;
this.c1 = new HashPool$2(Base.$, Marker.$);
this.cm(this.c1);
this.c0 = new PolarTrendLineManager();
}
au() {
super.au();
this.cy = this.cx();
if (!this.q) {
this.cz.z8 = 1000;
this.b4.w9 = Defaults.e;
}
}
c4(a) {
this.c1.g(a);
}
cx() {
let a = new NumericMarkerManager(0, (b) => this.c1.item(b), (b) => this.cz.yv.c.item(b), runOn(this, this.c5), runOn(this, this.cw), runOn(this, this.c2));
a.n = true;
a.p = runOn(this.cz, this.cz.aca);
return a;
}
c5(a) {
this.cz.abf(a, this.c1);
}
cw() {
return this.cz.yl(this.c1, this.by, this.bx);
}
c2() {
return this.cz.z0(this.c1);
}
c3(a, b, c, d) {
if (this.cz.zo) {
let e = new GeometryGroup();
this.cz.yt.ol(e, a, b, c, d);
}
else {
}
}
c6() {
if (this.cz.ab7 != null) {
this.cz.ab6 = this.cz.ab7;
}
else {
this.cz.ab6 = this.cz.u8;
}
}
cj(a) {
this.c1.f(a);
}
a7(a, b) {
if