igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,404 lines (1,403 loc) • 51.1 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-react-core";
import { PolarAxisInfoCache } from "./PolarAxisInfoCache";
import { SeriesRenderer$2 } from "./SeriesRenderer$2";
import { PolarFrame } from "./PolarFrame";
import { DependencyProperty } from "igniteui-react-core";
import { NumericAngleAxis } from "./NumericAngleAxis";
import { NumericRadiusAxis } from "./NumericRadiusAxis";
import { TrendLineType_$type } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { PenLineCap_$type } from "igniteui-react-core";
import { DoubleCollection } from "igniteui-react-core";
import { ScatterItemSearchMode_$type } from "./ScatterItemSearchMode";
import { HighlightingInfo } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { SeriesPointOfInterest } from "./SeriesPointOfInterest";
import { ScalerParams } from "./ScalerParams";
import { Rect } from "igniteui-react-core";
import { Marker } from "./Marker";
import { MarkerSeriesView } from "./MarkerSeriesView";
import { PolarAxes } from "./PolarAxes";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { IFastItemsSource_$type } from "igniteui-react-core";
import { SeriesRenderingArguments } from "./SeriesRenderingArguments";
import { AxisRange } from "./AxisRange";
import { Dictionary$2 } from "igniteui-react-core";
import { OwnedPoint } from "./OwnedPoint";
import { GeometryUtil } from "igniteui-react-core";
import { DataContext } from "igniteui-react-core";
import { HashPool$2 } from "igniteui-react-core";
import { Clipper } from "igniteui-react-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-react-core";
import { DataLegendSeriesContext } from "igniteui-react-core";
import { ChartSelection } from "./ChartSelection";
import { CollisionRect } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { truncate, isNaN_, isInfinity } from "igniteui-react-core";
import { Defaults } from "./Defaults";
import { NumericMarkerManager } from "./NumericMarkerManager";
import { GeometryGroup } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
/**
* @hidden
*/
export let PolarBase = /*@__PURE__*/ (() => {
class PolarBase extends MarkerSeries {
ct() {
return new PolarBaseView(this);
}
q1(a) {
super.q1(a);
this.yz = a;
}
o2() {
super.o2();
this.yv = null;
this.yw = null;
}
get_fp() {
return true;
}
ec(a, b, c, d, e) {
if (!this.hasMarkers) {
return false;
}
let f = this.yv;
let g = new ScalerParams(1, this.dc.v5, this.wu, f.ch);
g.c = this.getEffectiveViewport1(this.cw);
let h = this.yw;
let i = new ScalerParams(1, this.dc.v5, this.wu, h.ch);
i.c = this.getEffectiveViewport1(this.cw);
a.clear();
this.w8.cn((j) => {
if (j._visibility == 0) {
let k = new SeriesPointOfInterest();
let l = j.n;
let m = j.o;
if (l < this.wu.left || l > this.wu.right || m < this.wu.top || m > this.wu.bottom) {
return;
}
let n;
let o;
let p = this.yx.f(l, m, this.cw.b2, this.cw.b1, this.cw.getEffectiveViewport(), n, o);
n = p.p5;
o = p.p6;
k.d = n;
k.e = o;
k.b = j.content;
k.g = this.vi;
k.c = j.ak;
if (this.g9) {
k.g = this.vp(j.ak);
}
a.add(k);
}
});
return true;
}
constructor() {
super();
this.y0 = null;
this.yr = null;
this.yy = null;
this.ach = null;
this.acg = null;
this.acf = null;
this.zc = null;
this.zj = null;
this.zk = null;
this.y4 = new PolarFrame();
this.y6 = new PolarFrame();
this.y2 = new PolarFrame();
this.yx = null;
this.z2 = null;
this.y8 = 1;
this.zo = false;
this.zn = false;
this.zh = null;
this.zi = null;
this.assigningPolarStyle = null;
this.assigningPolarMarkerStyle = null;
this.y7 = null;
this.y5 = null;
this.y1 = null;
this.y7 = new PolarSeriesRenderManager();
this.y9 = this.za();
this.y5 = new PolarFrame();
this.y6.y = runOn(this, this.ace);
this.y4.y = runOn(this, this.ace);
this.y2.y = runOn(this, this.ace);
this.zc = new SeriesRenderer$2(PolarFrame.$, PolarBaseView.$, 0, runOn(this, this.abf), runOn(this, this.abj), runOn(this, this.d4), runOn(this, this.r9), runOn(this, this.aa8));
}
aa8() {
if (this.dd.g) {
this.dd.t();
}
}
aba() {
this.yx.e(this.y0.x, this.zl, this.zm, this.ach, this.acg, this.acf, (a, b) => Math.cos(b), (a, b) => Math.sin(b), true);
}
gb() {
return this.highlightedItemsSource != null || (this.aaq != null && this.aao != null);
}
z0() {
return false;
}
ht() {
let a = super.ht();
{
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.abb));
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.abc));
a.add(c);
}
if (this.z0()) {
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.z0()) {
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.r2));
a.add(e);
}
if (!this.z0()) {
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.r2));
a.add(f);
}
return a;
}
abc(a, b) {
if (this.aaq != null) {
b.value = this.aaq;
return;
}
b.value = this.aa3;
}
abb(a, b) {
if (this.aao != null) {
b.value = this.aao;
return;
}
b.value = this.aal;
}
get zl() {
return this.zj;
}
set zl(a) {
if (this.zj != a) {
let b = this.zl;
this.zj = a;
this.raisePropertyChanged("AngleColumn", b, this.zl);
}
}
get zm() {
return this.zk;
}
set zm(a) {
if (this.zk != a) {
let b = this.zm;
this.zk = a;
this.raisePropertyChanged("RadiusColumn", b, this.zm);
}
}
get ab9() {
return this.c(PolarBase.abk);
}
set ab9(a) {
this.h(PolarBase.abk, a);
}
y3() {
let a = this.y2;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.y6;
}
return a;
}
qb() {
super.qb();
if (this.yw != null) {
this.yw.ib(false);
}
if (this.yv != null) {
this.yv.ib(false);
}
}
pb(a, b, c, d) {
let e = false;
this.yz.c4.g$i(a, b, c, d);
if (this.yv != null && !this.yv.c1()) {
e = true;
}
if (this.yw != null && !this.yw.c1()) {
e = true;
}
if (e) {
this.rs(true);
}
}
ss(a, b) {
this.rs(false);
}
st(a, b) {
this.rs(false);
}
he(a, b, c) {
let d = true;
if (!super.he(a, b, c) || !c.p() || b.isEmpty || a.isEmpty || this.yv == null || this.yw == null || this.zl == null || this.zm == null || this.zl.count == 0 || this.zm.count == 0 || this.dp == null || this.dp.count != this.zl.count || this.dp.count != this.zm.count || this.yx == null || this.yv.bi == null || this.yw.bi == null || this.yv.l4 == this.yv.l3 || this.yw.l4 == this.yw.l3) {
d = false;
}
return d;
}
rt(a) {
super.rt(a);
let b;
let c;
let d = this.getViewInfo(c, b);
c = d.p0;
b = d.p1;
if (!this.he(c, b, this.cw)) {
this.o5(true, this.cw);
return;
}
this.ach = b;
this.acg = c;
this.acf = this.cw.getEffectiveViewport();
this.yy = new PolarAxisInfoCache(this.yv, this.yw, this.dp);
let e = new SeriesRenderingArguments(this, c, b, a, this.gr);
let f = this.zc.g(e, this.y4, this.y2, this.y6, this.yz);
this.y4 = f.p1;
this.y2 = f.p2;
this.y6 = f.p3;
}
ace(a) {
let b = this.yx.h(a.x, a.y, this.ach, this.acg, this.acf, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.h);
return b;
}
ay(a) {
if (a != null && a == this.yv && this.zl != null) {
return new AxisRange(this.zl.minimum, this.zl.maximum);
}
if (a != null && a == this.yw && this.zm != null) {
return new AxisRange(this.zm.minimum, this.zm.maximum);
}
return null;
}
gd(a) {
let b = this.cw.b2;
b = b.copy();
let c = this.cw.b1;
let d = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1;
if (this.yv == null || this.zl == null || this.yw == null || this.zm == null) {
return false;
}
if (d < 0 || d > this.zl.count - 1 || d > this.zm.count - 1) {
return false;
}
let e = this.yv.getScaledAngle(this.zl.item(d));
let f = this.yw.od(this.zm.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.c4 != null) {
this.c4.au(this.dc, b, true);
}
return d >= 0;
}
kn(a) {
let b = this.j3(a);
if (this.dp != null && b >= 0 && b < this.dp.count) {
return this.dp.item(b);
}
return null;
}
j3(a) {
let b = truncate(Math.round(this.ir(a)));
return b;
}
ir(a) {
switch (this.y9) {
case 1: return this.z6(a);
case 3: return this.z7(a);
case 2: return this.z4(a);
case 4: return this.z5(a);
}
return -1;
}
z5(a) {
return this.z8(a, false);
}
z4(a) {
let b = this.v9(a);
let c = b.x;
let d = b.y;
if (this.dp == null || this.yv == null || this.yw == null || this.zl == null || this.zm == null) {
return -1;
}
if (this.dp.count > this.aaa) {
return -1;
}
if (!this.zs()) {
return -1;
}
let e = this.z2;
let f = 1.7976931348623157E+308;
let g = -1;
for (let h = 0; h < this.zl.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;
}
zs() {
let a = this.y2;
if (this.d4()) {
a = this.y6;
}
if (a == null || a.x.count == 0) {
return false;
}
this.z2 = a.x;
return true;
}
z8(a, b) {
if (!this.zv) {
return -1;
}
let c = { $type: Point_$type, x: 0, y: 0 };
let d = true;
let e = this.y2;
if (this.d4()) {
e = this.y6;
}
if (e == null) {
return -1;
}
if (e.n == null) {
return -1;
}
if (this.dp == null || this.dp.count > this.aaa) {
return -1;
}
if (!this.zs()) {
return -1;
}
let f = this.z2;
let g = this.v9(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.dp.item(j)) || e.j.containsKey(this.dp.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.dp.item(i)) && e.j.containsKey(this.dp.item(i - 1)))) {
let o = GeometryUtil.m(g, n, m);
return (i - 1) + o;
}
else if (e.j.containsKey(this.dp.item(i))) {
return i;
}
else {
return i - 1;
}
}
return -1;
}
z7(a) {
return this.z8(a, true);
}
z6(a) {
let b = null;
let c = 1.7976931348623157E+308;
let d = this.v9(a);
let e = d.x;
let f = d.y;
if (this.yz.c5.e > this.aaa) {
return -1;
}
this.yz.c8((g) => {
if (g._visibility == 0) {
let h = this.yz.cy(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;
}
we(a, b, c) {
if (this.yv == null || this.yw == null || this.zl == null || this.zm == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
let d = this.cw.b2;
let e = this.cw.b1;
let f = this.getEffectiveViewport();
let g = new ScalerParams(0, d, e, this.yv.ch, f);
let h = ((() => {
let $ret = new ScalerParams(0, d, e, this.yw.ch, f);
$ret.b = this.iy();
return $ret;
})());
if (b) {
let i = this.ir(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.dp.count - 1) {
k = this.dp.count - 1;
}
if (j > this.dp.count - 1) {
j = this.dp.count - 1;
}
if (k == j) {
return this.yx.h(this.zl.item(j), this.zm.item(j), d, e, f, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.h);
}
let l = i - Math.floor(i);
let m = this.yx.h(this.zl.item(j), this.zm.item(j), d, e, f, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.h);
let n = this.yx.h(this.zl.item(k), this.zm.item(k), d, e, f, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.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.j3(a);
if (u == -1) {
return { $type: Point_$type, x: NaN, y: NaN };
}
return this.yx.h(this.zl.item(u), this.zm.item(u), d, e, f, this.yy.e, this.yy.d, this.yy.g, this.yy.f, this.yy.i, this.yy.h);
}
}
ai() {
return [this.yv, this.yw];
}
kq(a, b) {
let c = this.nd(b);
if (c == PolarBase.$$p[3]) {
return this.kr(a, b, this.aal);
}
if (c == PolarBase.$$p[15]) {
return this.kr(a, b, this.aa3);
}
if (c == PolarBase.$$p[5]) {
return this.kr(a, b, this.aao);
}
if (c == PolarBase.$$p[6]) {
return this.kr(a, b, this.aaq);
}
return super.kq(a, b);
}
md(a) {
let b = this.nd(a);
if (b == PolarBase.$$p[3]) {
return this.aal;
}
if (b == PolarBase.$$p[15]) {
return this.aa3;
}
if (b == PolarBase.$$p[5]) {
return this.aao;
}
if (b == PolarBase.$$p[6]) {
return this.aaq;
}
return super.md(a);
}
ra(a, b, c, d) {
super.ra(a, b, c, d);
if (this.yz.c4.g$e(a, b, c, d)) {
this.rs(false);
this.ql();
}
switch (b) {
case PolarBase.$$p[1]:
case PolarBase.$$p[2]:
case PolarBase.$$p[13]:
case PolarBase.$$p[14]:
this.qf();
break;
case "FastItemsSource":
if (typeCast(IFastItemsSource_$type, c) != null) {
c.deregisterColumn(this.zl);
c.deregisterColumn(this.zm);
this.zl = null;
this.zm = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
this.zl = this.dl(this.aal);
this.zm = this.dl(this.aa3);
}
if ((this.yw != null && !this.yw.c1()) || (this.yv != null && !this.yv.c1())) {
this.rs(this.gg && c != null);
}
break;
case PolarBase.$$p[0]:
if (this.yv != null && this.yw != null) {
this.yx = new PolarAxes(this.yw, this.yv);
}
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
if (this.yv != null && !this.yv.c1()) {
this.rs(false);
}
else if (c != null && d == null) {
this.o5(true, this.cw);
}
break;
case PolarBase.$$p[12]:
if (this.yv != null && this.yw != null) {
this.yx = new PolarAxes(this.yw, this.yv);
}
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
if (this.yw != null && !this.yw.c1()) {
this.rs(false);
}
else if (c != null && d == null) {
this.o5(true, this.cw);
}
if (this.yv != null && !this.yv.c1()) {
this.yv.h7();
}
break;
case PolarBase.$$p[3]:
if (this.dp != null) {
this.dp.deregisterColumn(this.zl);
this.zl = this.dl(this.aal);
}
break;
case "AngleColumn":
this.yz.c4.g$m();
if (this.yv != null && !this.yv.c1()) {
this.rs(this.gg && this.d8);
}
break;
case PolarBase.$$p[15]:
if (this.dp != null) {
this.dp.deregisterColumn(this.zm);
this.zm = this.dl(this.aa3);
}
break;
case "RadiusColumn":
this.yz.c4.g$m();
if (this.yw != null && !this.yw.c1()) {
this.rs(this.gg && this.d8);
}
break;
case PolarBase.$$p[16]:
this.rs(false);
this.ql();
break;
case PolarBase.$$p[11]:
this.rs(false);
this.ql();
break;
case "TransitionProgress":
this.yy = new PolarAxisInfoCache(this.yv, this.yw, this.dp);
this.ach = this.cw.b2;
this.acg = this.cw.b1;
this.acf = this.cw.getEffectiveViewport();
this.y6.w = this.z1;
this.y6.c(this.jq, this.y4, this.y2);
if (this.d6(this.cw)) {
return;
}
if (this.jq == 1) {
this.abj(this.y2, this.yz);
this.qo();
}
else {
this.abj(this.y6, this.yz);
}
if (this.dc != null) {
this.dc.qp(this);
}
break;
case "TrendLineBrush":
this.rg(b);
break;
case PolarBase.$$p[4]:
this.rs(false);
this.ql();
break;
case "TrendLineType":
this.ql();
break;
case PolarBase.$$p[8]:
this.zo = this.zx();
this.rs(false);
break;
case PolarBase.$$p[7]:
this.zn = this.zw();
this.rs(false);
break;
case PolarBase.$$p[9]:
this.y9 = this.za();
break;
}
}
get y9() {
return this.y8;
}
set y9(a) {
let b = this.y8;
this.y8 = a;
if (b != this.y8) {
this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.y8));
}
}
za() {
if (this.zb != 0) {
return this.zb;
}
return this.zv ? 4 : 1;
}
get_zv() {
return false;
}
get zv() {
return this.get_zv();
}
zx() {
return this.zu;
}
zw() {
return this.zt;
}
zq(a) {
if (typeCast(NumericRadiusAxis.$, a) !== null) {
return true;
}
return false;
}
zp(a) {
if (typeCast(NumericAngleAxis.$, a) !== null) {
return true;
}
return false;
}
o5(a, b) {
super.o5(a, b);
let c = b;
if (a) {
c.c5.clear();
}
c.c4.g$h();
}
ys(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;
}
aa7(a, b, c, d) {
a.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, b);
let e = this.dp;
for (let f = 0; f < b; f++) {
let g = a.x._inner[f];
if (!isInfinity(g.x) && !isInfinity(g.y)) {
let h = { $type: Point_$type, x: this.zl.item(f), y: this.zm.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;
})()));
}
}
}
abf(a, b) {
let c = b.b2;
let d = b.b1;
let e = b.getEffectiveViewport();
a.j.clear();
a.o.clear();
let f = Math.min(this.zl != null ? this.zl.count : 0, this.zm != null ? this.zm.count : 0);
if (f < 1) {
return;
}
this.yy = new PolarAxisInfoCache(this.yv, this.yw, this.dp);
this.y0 = a;
this.acg = d;
this.ach = c;
this.acf = b.getEffectiveViewport();
b.c2.l(a.j, this.aab, c, d, this.id);
if (f <= this.aab) {
this.aa7(a, f, c, d);
}
let g = this.ys(d, a.o);
let h = Math.min(this.yv.l4, this.yv.l3);
let i = Math.max(this.yv.l3, this.yv.l4);
b.c4.k = this.z1;
b.c4.j = 0;
b.c4.m = this.yw.n7;
b.c4.l = this.yw.n6;
b.c4.n = (j, k) => this.yx.c(j, k, c, d, e, Math.cos);
b.c4.o = (j, k) => this.yx.d(j, k, c, d, e, Math.sin);
let j = new List$1(Number_$type, 0);
for (let k = 0; k < this.zl.count; k++) {
if (this.zl.item(k) >= h && this.zl.item(k) <= i) {
j.add(this.zl.item(k));
}
}
let l = this.zm;
if (j.count != this.zl.count) {
l = new List$1(Number_$type, 0);
for (let m = 0; m < this.zl.count; m++) {
if (this.zl.item(m) >= h && this.zl.item(m) <= i) {
l.add(this.zm.item(m));
}
}
}
b.c4.p(a.o, this.zd, j, l, this.aac, runOn(this.yv, this.yv.getScaledAngle), runOn(this.yw, this.yw.od), ((() => {
let $ret = new TrendResolutionParams();
$ret.d = this.id;
$ret.i = d;
$ret.h = e;
$ret.j = c;
return $ret;
})()), g, h, i);
if (b.w.count > 0) {
a.m.clear();
for (let n = 0; n < b.w.count; n++) {
a.m.add(new List$1(Point_$type, 0));
let o = b.w._inner[n];
o.k = this.z1;
o.j = 0;
o.m = this.yw.n7;
o.l = this.yw.n6;
o.n = (p, q) => this.yx.c(p, q, c, d, e, Math.cos);
o.o = (p, q) => this.yx.d(p, q, c, d, e, Math.sin);
o.p(a.m._inner[n], o.g$b, j, l, o.g$f, runOn(this.yv, this.yv.getScaledAngle), runOn(this.yw, this.yw.od), ((() => {
let $ret = new TrendResolutionParams();
$ret.d = this.id;
$ret.i = d;
$ret.h = e;
$ret.j = c;
return $ret;
})()), g, h, i);
}
}
}
get_fe() {
return true;
}
zf(a, b, c) {
return null;
}
zg(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.y3();
let e = this.yz.b5(this.v9(b));
let f = -1;
if (e == null) {
if (a != null) {
f = this.dp.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;
}
ze(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;
}
dh(a, b, c) {
if (this.ee && this.fz(this.by) && !c) {
let d = this.zf(a, b, this.zh);
this.zh = d;
return d;
}
else {
let e = this.ze(a, b, this.zh);
this.zh = e;
return e;
}
}
di(a, b, c) {
if (this.fz(this.by) && !c) {
let d = this.zg(a, b, this.zi);
this.zi = d;
return d;
}
else {
let e = this.ze(a, b, this.zi);
e.d = true;
this.zi = e;
return e;
}
}
zz() {
return (this.assigningPolarStyle != null && this.zo) || (this.by != 1) || this.d3 || (this.cq != 1) || (this.cp != 1);
}
zy() {
return (this.assigningPolarMarkerStyle != null && this.zn) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
}
abj(a, b) {
this.qx();
let c = b.b2;
let d = b.b1;
let e = this.getEffectiveViewport1(b);
let f = this.wl(b);
this.yy = new PolarAxisInfoCache(this.yv, this.yw, this.dp);
if (this.xi()) {
b.c2.j(a.j, this.xk);
if (this.zy()) {
this.aa9(b, a);
}
}
b.cv();
let g = this.ys(d, b.c4.g$n.an);
b.c4.g$l(a.o, g);
if (b.w.count > 0) {
for (let h = 0; h < b.w.count; h++) {
let i = b.w._inner[h];
i.g$l(a.m._inner[h], g);
}
}
this.aa6(d, c, e, f, b);
}
yp(a, b) {
return this.yq(a, b);
}
yq(a, b) {
if (b < a || a < 0 || a > this.zl.count || b < 0 || b > this.zl.count) {
return null;
}
let c = new Array((b - a) + 1);
for (let d = a; d <= b; d++) {
let e = d;
c[d - a] = this.dp.item(d);
}
return c;
}
aa9(a, b) {
a.cb = true;
this.y7.ay(this, this.zy(), runOn(this, this.yp));
let c = this.y7.d;
let d = c != null;
let e = this.getEffectiveViewport1(a);
let f = this.dp == null ? 0 : this.dp.count;
this.yz.cn((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.abd(h, f, a.r);
}
this.y7.ac(g, i);
}
});
}
abe(a, b, c) {
let d = this.by != 1;
let e = this.cq != 1;
let f = this.cp != 1;
this.y7.a0(this.y7.b, a, b, false);
this.y7.ab(this.ib);
let g = this.y7.ax;
let h = null;
let i = null;
let j = null;
let k = this.dp;
if (d && this.dc != null) {
h = this.dc.dk.getHighlightingInfo(this, k, g.z, g.y, false);
g.c = h;
}
if (e && this.dc != null) {
i = this.dc.dl.getHighlightingInfo(this, k, g.z, g.y, false);
if (i == null && this.bo != null) {
i = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, false);
}
g.d = i;
}
if (f && this.dc != null) {
j = this.dc.dj.getHighlightingInfo(this, k, g.z, g.y, false);
g.b = j;
}
g.h = c;
this.abh(g);
this.y7.z(this, h, i, j, c, d, e, f, a < 0);
}
abd(a, b, c) {
let d = this.by != 1;
let e = this.cq != 1;
let f = this.cp != 1;
this.y7.a0(this.y7.d, a, b, true);
this.y7.aa(this.ib);
let g = this.y7.aw;
let h = null;
let i = null;
let j = null;
let k = this.dp;
let l = null;
let m = null;
let n = null;
if (d && this.dc != null) {
h = this.dc.dk.getHighlightingInfo(this, k, g.z, g.y, true);
if (this.dc.dk.isCrossContextHighlight(this)) {
l = this.dc.dk.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.c = h;
}
if (e && this.dc != null) {
i = this.dc.dl.getHighlightingInfo(this, k, g.z, g.y, true);
if (i == null && this.bo != null) {
i = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true);
}
if (this.dc.dl.isCrossContextHighlight(this)) {
m = this.dc.dl.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.d = i;
}
if (f && this.dc != null) {
j = this.dc.dj.getHighlightingInfo(this, k, g.z, g.y, true);
if (this.dc.dj.isCrossContextHighlight(this)) {
n = this.dc.dj.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.d = i;
}
g.h = c;
this.abg(g);
this.y7.y(this, h, i, j, c, d, e, f, g.v, this.dc.dk.totalHighWaterMark, g.x, this.dc.dl.totalHighWaterMark, g.t, this.dc.dj.totalHighWaterMark);
}
abh(a) {
if (this.assigningPolarStyle != null && this.zo) {
this.assigningPolarStyle(this, a);
}
}
abg(a) {
if (this.assigningPolarMarkerStyle != null && this.zn) {
this.assigningPolarMarkerStyle(this, a);
}
}
aa6(a, b, c, d, e) {
e.c7(a, b, c, d);
}
sj() {
super.sj();
if (this.index < 0) {
return;
}
this.yz.da();
}
ru(a, b) {
super.ru(a, b);
if (!this.g0) {
this.cw.a7(b);
return;
}
this.cw.a7(b);
if (this.d6(this.cv)) {
return;
}
this.rv();
this.g0 = false;
}
rv() {
super.rv();
let a = this.cv;
if (!this.gs) {
this.y5 = new PolarFrame();
this.abf(this.y5, a);
}
this.gs = false;
this.abj(this.y5, a);
}
rr(a, b, c, d, e) {
super.rr(a, b, c, d, e);
let f = this.ba.a$j.item(d);
let g = f;
f.a6(c);
if (this.d6(g)) {
return;
}
if (this.y1 == null) {
this.y1 = new PolarFrame();
}
this.abf(this.y1, g);
this.abj(this.y1, g);
}
abi(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);
}
}
yo(a, b, c) {
this.aba();
return this.y0.x.toArray();
}
z3(a) {
let b = new List$1(Number_$type, 0);
let c = this.dp;
for (let d of fromEnum(this.yz.c5.c)) {
b.add(c.indexOf(d));
}
return b;
}
acd(a) {
return { $type: Point_$type, x: this.zl.item(a), y: this.zm.item(a) };
}
pz(a) {
super.pz(a);
this.bc.exportTrendlineData(this, a, this.yz.c4.g$n);
}
getDataLegendSeriesContextAt(a, b) {
let c = { $type: Point_$type, x: a, y: b };
let d = this.kn(c);
let e = d == null ? NaN : this.ix(d, "RadiusMemberPath");
let f = d == null ? NaN : this.ix(d, "AngleMemberPath");
let g = new DataLegendSeriesValueInfo();
g.l = e;
g.a = 11;
g.r = this.aa3 != null ? this.aa3 : "Radius";
g.q = "Radius";
g.s = this.aaz != null ? this.aaz : "R:";
g.t = this.aa1 != null ? this.aa1 : "";
let h = new DataLegendSeriesValueInfo();
h.l = f;
h.a = 10;
h.r = this.aal != null ? this.aal : "Angle";
h.q = "Angle";
h.s = this.aah != null ? this.aah : "A:";
h.t = this.aaj != null ? this.aaj : "";
let i = new DataLegendSeriesContext();
i.e = ((() => {
let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
$ret.add(g);
$ret.add(h);
return $ret;
})());
i.h = this.mc();
return i;
}
ak(a, b) {
let c = new List$1(ChartSelection.$, 0);
this.p4(a, c, b);
return c.toArray();
}
p4(a, b, c) {
let d = this.cw.b2;
let e = this.cw.b1;
let f = this.getEffectiveViewport1(this.cw);
let g = this.dc.wd(this.wu, this.getEffectiveViewport(), d);
let h = new CollisionRect(0, this.dc.wa(a));
let i = this.yw.k5(e, d, f, g);
for (let j = 0; j < this.dp.count; j++) {
let k = this.yv.getScaledAngle(this.zl.item(j));
let l = this.yw.od(this.zm.item(j));
let m = this.yx.c(k, l, d, e, f, Math.cos);
let n = this.yx.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.dp.item(j);
return $ret;
})()));
}
else {
b.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.dp.item(j);
$ret.series = this;
return $ret;
})()));
}
}
}
}
bd() {
return new PolarTrendLineManager();
}
}
PolarBase.$t = /*@__PURE__*/ markType(PolarBase, 'PolarBase', MarkerSeries.$);
PolarBase.abk = /*@__PURE__*/ DependencyProperty.i("ActualTrendLineBrush", Brush.$, PolarBase.$, /*@__PURE__*/ new PropertyMetadata(2, null, (a, b) => a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue)));
PolarBase.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, PolarBase, 'raisePropertyChanged', ['AngleAxis:yv:abl', [NumericAngleAxis.$, null], 'AngleMemberAsLegendLabel:aah:abm', [2, null], 'AngleMemberAsLegendUnit:aaj:abn', [2, null], 'AngleMemberPath:aal:abo', [2], 'ClipSeriesToBounds:zr:abp', [0, false], 'HighlightedAngleMemberPath:aao:abq', [2, null], 'HighlightedRadiusMemberPath:aaq:abr', [2, null], 'IsCustomPolarMarkerStyleAllowed:zt:abs', [0, false], 'IsCustomPolarStyleAllowed:zu:abt', [0, false], 'ItemSearchMode:zb:abu', [ScatterItemSearchMode_$type, /*@__PURE__*/ enumGetBox(ScatterItemSearchMode_$type, 0)], 'ItemSearchThreshold:aaa:abv', [1, 10000], 'MaximumMarkers:aab:abw', [1, 400], 'RadiusAxis:yw:abx', [NumericRadiusAxis.$, null], 'RadiusMemberAsLegendLabel:aaz:aby', [2, null], 'RadiusMemberAsLegendUnit:aa1:abz', [2, null], 'RadiusMemberPath:aa3:ab0', [2], 'UseCartesianInterpolation:z1:ab8', [0, true], 'TrendLineType:zd:ab6', [TrendLineType_$type, /*@__PURE__*/ enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:z9:ab5', [1, 1.5], 'TrendLinePeriod:aac:ab4', [1, 7], 'TrendLineZIndex:aad:ab7', [1, 1], 'TrendLineBrush:aca:ab1', [Brush.$, null], 'TrendLineDashArray:acb:ab2', [DoubleCollection.$], 'TrendLineDashCap:acc:ab3', [PenLineCap_$type, /*@__PURE__*/ 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 = /*@__PURE__*/ markType(PolarSeriesRenderManager, 'PolarSeriesRenderManager', SeriesRenderManager.$);
return PolarSeriesRenderManager;
})();
/**
* @hidden
*/
export let PolarBaseView = /*@__PURE__*/ (() => {
class PolarBaseView extends MarkerSeriesView {
constructor(a) {
super(a);
this.c3 = null;
this.c2 = null;
this.c4 = null;
this.c5 = null;
this.c3 = a;
this.c5 = new HashPool$2(Base.$, Marker.$);
this.cq(this.c5);
this.c4 = new PolarTrendLineManager();
}
ax() {
super.ax();
this.c2 = this.c1();
if (!this.r) {
this.c3.aab = 1000;
this.b8.xc = Defaults.e;
}
}
c8(a) {
this.c5.g(a);
}
c1() {
let a = new NumericMarkerManager(0, (b) => this.c5.item(b), (b) => this.c3.yy.c.item(b), runOn(this, this.c9), runOn(this, this.c0), runOn(this, this.c6));
a.n = true;
a.p = runOn(this.c3, this.c3.acd);
return a;
}
c9(a) {
this.c3.abi(a, this.c5);
}
c0() {
return this.c3.yo(this.c5, this.b2, this.b1);
}
c6() {
return this.c3.z3(this.c5);
}
c7(a, b, c, d) {
if (this.c3.zr) {
let e = new GeometryGroup();
this.c3.yw.ol(e, a, b, c, d);
}
else {
}
}
da() {
if (this.c3.aca != null) {
this.c3.ab9 = this.c3.aca;
}
else {
this.c3.ab9 = this.c3.vb;
}
}
cn(a) {