UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

1,486 lines 54 kB
/*
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, Point_$type, runOn, delegateCombine, Number_$type, enumGetBox, fromEnum, typeCast, 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 { Rect } from "igniteui-angular-core";
import { Marker } from "./Marker";
import { MarkerSeriesView } from "./MarkerSeriesView";
import { PolarAxes } from "./PolarAxes";
import { List$1 } from "igniteui-angular-core";
import { SeriesPointOfInterest } from "./SeriesPointOfInterest";
import { ScalerParams } from "./ScalerParams";
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 { CoreGeometryUtil } from "igniteui-angular-core";
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.zj = null;
            this.za = null;
            this.zh = null;
            this.ac0 = null;
            this.acz = null;
            this.acy = null;
            this.zv = null;
            this.z2 = null;
            this.z3 = null;
            this.zn = new PolarFrame();
            this.zp = new PolarFrame();
            this.zl = new PolarFrame();
            this.zg = null;
            this.aal = null;
            this.zr = 1;
            this.z7 = false;
            this.z6 = false;
            this.z0 = null;
            this.z1 = null;
            this.assigningPolarStyle = null;
            this.assigningPolarMarkerStyle = null;
            this.zq = null;
            this.zo = null;
            this.zk = null;
            this.zq = new PolarSeriesRenderManager();
            this.zs = this.zt();
            this.zo = new PolarFrame();
            this.zp.ab = runOn(this, this.acx);
            this.zn.ab = runOn(this, this.acx);
            this.zl.ab = runOn(this, this.acx);
            this.zv = new SeriesRenderer$2(PolarFrame.$, PolarBaseView.$, 0, runOn(this, this.aby), runOn(this, this.ab2), runOn(this, this.d4), runOn(this, this.sp), runOn(this, this.abr));
        }
        ct() {
            return new PolarBaseView(this);
        }
        rh(a) {
            super.rh(a);
            this.zi = a;
        }
        b3() {
            if (this.b4 == 0) {
                {
                    return 1;
                }
            }
            else {
                return super.b3();
            }
        }
        xa(a) {
            if (!this.hasMarkers || !this.x1()) {
                return Rect.empty;
            }
            let b = this.xr.ce(this.wr(a));
            if (b != null) {
                return this.xr.c7(b);
            }
            return Rect.empty;
        }
        g2(a, b) {
            if (this.x2(a, b)) {
                return true;
            }
            return false;
        }
        pf() {
            super.pf();
            this.ze = null;
            this.zf = null;
        }
        get_fs() {
            return true;
        }
        w1(a) {
            let b = this.ze;
            let c = this.zf;
            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.zg.f(a.x, a.y, this.dc.yr, this.dc.y9, this.getEffectiveViewport(), d, e);
            d = f.p5;
            e = f.p6;
            return { $type: Point_$type, x: d, y: e };
        }
        ed(a, b, c, d, e) {
            if (!this.hasMarkers) {
                return false;
            }
            let f = this.ze;
            let g = new ScalerParams(1, this.dc.yr, this.xd, f.dn);
            g.c = this.getEffectiveViewport1(this.cw);
            let h = this.zf;
            let i = new ScalerParams(1, this.dc.yr, this.xd, h.dn);
            i.c = this.getEffectiveViewport1(this.cw);
            a.clear();
            this.xr.cw((j) => {
                if (j._visibility == 0) {
                    let k = new SeriesPointOfInterest();
                    let l = j.n;
                    let m = j.o;
                    if (!e && (l < this.xd.left || l > this.xd.right || m < this.xd.top || m > this.xd.bottom)) {
                        return;
                    }
                    let n;
                    let o;
                    let p = this.zg.f(l, m, this.cw.ca, this.cw.b9, this.cw.getEffectiveViewport(), n, o);
                    n = p.p5;
                    o = p.p6;
                    k.d = n;
                    k.e = o;
                    k.b = j.content;
                    k.g = this.v0;
                    k.c = j.ak;
                    if (this.hf) {
                        k.g = this.v7(j.ak);
                    }
                    a.add(k);
                }
            });
            return true;
        }
        abr() {
            if (this.dd.g) {
                this.dd.t();
            }
        }
        abt() {
            this.zg.e(this.zj.aa, this.z4, this.z5, this.ac0, this.acz, this.acy, (a, b) => Math.cos(b), (a, b) => Math.sin(b), true);
        }
        gh() {
            return this.highlightedItemsSource != null || (this.aa9 != null && this.aa7 != null);
        }
        aaj() {
            return false;
        }
        hz() {
            let a = super.hz();
            {
                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.abu));
                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.abv));
                a.add(c);
            }
            if (this.aaj()) {
                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.aaj()) {
                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.si));
                a.add(e);
            }
            if (!this.aaj()) {
                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.si));
                a.add(f);
            }
            return a;
        }
        abv(a, b) {
            if (this.aa9 != null) {
                b.value = this.aa9;
                return;
            }
            b.value = this.abm;
        }
        abu(a, b) {
            if (this.aa7 != null) {
                b.value = this.aa7;
                return;
            }
            b.value = this.aa4;
        }
        get z4() {
            return this.z2;
        }
        set z4(a) {
            if (this.z2 != a) {
                let b = this.z4;
                this.z2 = a;
                this.raisePropertyChanged("AngleColumn", b, this.z4);
            }
        }
        get z5() {
            return this.z3;
        }
        set z5(a) {
            if (this.z3 != a) {
                let b = this.z5;
                this.z3 = a;
                this.raisePropertyChanged("RadiusColumn", b, this.z5);
            }
        }
        get acs() {
            return this.c(PolarBase.ab3);
        }
        set acs(a) {
            this.h(PolarBase.ab3, a);
        }
        zm() {
            let a = this.zl;
            if (this.d4()) {
                if (this.dd.g) {
                    this.dd.t();
                }
                a = this.zp;
            }
            return a;
        }
        qp() {
            super.qp();
            if (this.zf != null) {
                this.zf.ly(false);
            }
            if (this.ze != null) {
                this.ze.ly(false);
            }
        }
        po(a, b, c, d) {
            let e = false;
            this.zi.dd.g$i(a, b, c, d);
            if (this.zi.aa.count > 0) {
                for (let f of fromEnum(this.zi.aa)) {
                    f.g$i(a, b, c, d);
                }
            }
            if (this.ze != null && !this.ze.ed()) {
                e = true;
            }
            if (this.zf != null && !this.zf.ed()) {
                e = true;
            }
            if (e) {
                this.r8(true);
            }
        }
        s8(a, b) {
            this.r8(false);
        }
        s9(a, b) {
            this.r8(false);
        }
        hk(a, b, c) {
            let d = true;
            if (!super.hk(a, b, c) || !c.r() || b.isEmpty || a.isEmpty || this.ze == null || this.zf == null || this.z4 == null || this.z5 == null || this.z4.count == 0 || this.z5.count == 0 || this.dp == null || this.dp.count != this.z4.count || this.dp.count != this.z5.count || this.zg == null || this.ze.b7 == null || this.zf.b7 == null || this.ze.qw == this.ze.qv || this.zf.qw == this.zf.qv) {
                d = false;
            }
            return d;
        }
        r9(a) {
            super.r9(a);
            let b;
            let c;
            let d = this.getViewInfo(c, b);
            c = d.p0;
            b = d.p1;
            if (!this.hk(c, b, this.cw)) {
                this.pi(true, this.cw);
                return;
            }
            this.ac0 = b;
            this.acz = c;
            this.acy = this.cw.getEffectiveViewport();
            this.zh = new PolarAxisInfoCache(this.ze, this.zf, this.dp);
            let e = new SeriesRenderingArguments(this, c, b, a, this.gx);
            let f = this.zn;
            let g = this.zl;
            let h = this.zp;
            let i = this.zv.g(e, f, g, h, this.zi);
            f = i.p1;
            g = i.p2;
            h = i.p3;
            this.zn = f;
            this.zl = g;
            this.zp = h;
        }
        acx(a) {
            let b = this.zg.h(a.x, a.y, this.ac0, this.acz, this.acy, this.zh.e, this.zh.d, this.zh.g, this.zh.f, this.zh.i, this.zh.h);
            return b;
        }
        ay(a) {
            if (a != null && a == this.ze && this.z4 != null) {
                return new AxisRange(this.z4.minimum, this.z4.maximum);
            }
            if (a != null && a == this.zf && this.z5 != null) {
                return new AxisRange(this.z5.minimum, this.z5.maximum);
            }
            return null;
        }
        gj(a) {
            let b = this.cw.ca;
            b = b.copy();
            let c = this.cw.b9;
            let d = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1;
            if (this.ze == null || this.z4 == null || this.zf == null || this.z5 == null) {
                return false;
            }
            if (d < 0 || d > this.z4.count - 1 || d > this.z5.count - 1) {
                return false;
            }
            let e = this.ze.getScaledAngle(this.z4.item(d));
            let f = this.zf.tm(this.z5.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;
        }
        kw(a) {
            let b = this.kc(a);
            if (this.dp != null && b >= 0 && b < this.dp.count) {
                return this.dp.item(b);
            }
            return null;
        }
        kc(a) {
            let b = truncate(Math.round(this.iy(a)));
            return b;
        }
        iy(a) {
            switch (this.zs) {
                case 1: return this.aap(a);
                case 3: return this.aaq(a);
                case 2: return this.aan(a);
                case 4: return this.aao(a);
            }
            return -1;
        }
        aao(a) {
            return this.aar(a, false);
        }
        aan(a) {
            let b = this.wr(a);
            let c = b.x;
            let d = b.y;
            if (this.dp == null || this.ze == null || this.zf == null || this.z4 == null || this.z5 == null) {
                return -1;
            }
            if (this.dp.count > this.aat) {
                return -1;
            }
            if (!this.aab()) {
                return -1;
            }
            let e = this.aal;
            let f = 1.7976931348623157E+308;
            let g = -1;
            for (let h = 0; h < this.z4.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;
        }
        aab() {
            let a = this.zl;
            if (this.d4()) {
                a = this.zp;
            }
            if (a == null || a.aa.count == 0) {
                return false;
            }
            this.aal = a.aa;
            return true;
        }
        aar(a, b) {
            if (!this.aae) {
                return -1;
            }
            let c = { $type: Point_$type, x: 0, y: 0 };
            let d = true;
            let e = this.zl;
            if (this.d4()) {
                e = this.zp;
            }
            if (e == null) {
                return -1;
            }
            if (e.q == null) {
                return -1;
            }
            if (this.dp == null || this.dp.count > this.aat) {
                return -1;
            }
            if (!this.aab()) {
                return -1;
            }
            let f = this.aal;
            let g = this.wr(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.m.containsKey(this.dp.item(j)) || e.m.containsKey(this.dp.item(j - 1))) {
                        let l = CoreGeometryUtil.q(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.m.containsKey(this.dp.item(i)) && e.m.containsKey(this.dp.item(i - 1)))) {
                    let o = GeometryUtil.j(g, n, m);
                    return (i - 1) + o;
                }
                else if (e.m.containsKey(this.dp.item(i))) {
                    return i;
                }
                else {
                    return i - 1;
                }
            }
            return -1;
        }
        aaq(a) {
            return this.aar(a, true);
        }
        aap(a) {
            let b = null;
            let c = 1.7976931348623157E+308;
            let d = this.wr(a);
            let e = d.x;
            let f = d.y;
            if (this.zi.de.e > this.aat) {
                return -1;
            }
            this.zi.dh((g) => {
                if (g._visibility == 0) {
                    let h = this.zi.c7(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;
        }
        ww(a, b, c) {
            if (this.ze == null || this.zf == null || this.z4 == null || this.z5 == null) {
                return { $type: Point_$type, x: NaN, y: NaN };
            }
            let d = this.cw.ca;
            let e = this.cw.b9;
            let f = this.getEffectiveViewport();
            let g = new ScalerParams(0, d, e, this.ze.dn, f);
            let h = ((() => {
                let $ret = new ScalerParams(0, d, e, this.zf.dn, f);
                $ret.b = this.i5();
                return $ret;
            })());
            if (b) {
                let i = this.iy(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.zg.h(this.z4.item(j), this.z5.item(j), d, e, f, this.zh.e, this.zh.d, this.zh.g, this.zh.f, this.zh.i, this.zh.h);
                }
                let l = i - Math.floor(i);
                let m = this.zg.h(this.z4.item(j), this.z5.item(j), d, e, f, this.zh.e, this.zh.d, this.zh.g, this.zh.f, this.zh.i, this.zh.h);
                let n = this.zg.h(this.z4.item(k), this.z5.item(k), d, e, f, this.zh.e, this.zh.d, this.zh.g, this.zh.f, this.zh.i, this.zh.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.kc(a);
                if (u == -1) {
                    return { $type: Point_$type, x: NaN, y: NaN };
                }
                return this.zg.h(this.z4.item(u), this.z5.item(u), d, e, f, this.zh.e, this.zh.d, this.zh.g, this.zh.f, this.zh.i, this.zh.h);
            }
        }
        ai() {
            return [this.ze, this.zf];
        }
        kz(a, b) {
            let c = this.no(b);
            if (c == PolarBase.$$p[3]) {
                return this.k0(a, b, this.aa4);
            }
            if (c == PolarBase.$$p[15]) {
                return this.k0(a, b, this.abm);
            }
            if (c == PolarBase.$$p[5]) {
                return this.k0(a, b, this.aa7);
            }
            if (c == PolarBase.$$p[6]) {
                return this.k0(a, b, this.aa9);
            }
            return super.kz(a, b);
        }
        mo(a) {
            let b = this.no(a);
            if (b == PolarBase.$$p[3]) {
                return this.aa4;
            }
            if (b == PolarBase.$$p[15]) {
                return this.abm;
            }
            if (b == PolarBase.$$p[5]) {
                return this.aa7;
            }
            if (b == PolarBase.$$p[6]) {
                return this.aa9;
            }
            return super.mo(a);
        }
        rq(a, b, c, d) {
            super.rq(a, b, c, d);
            if (this.zi.dd.g$e(a, b, c, d)) {
                this.r8(false);
                this.q0();
            }
            switch (b) {
                case PolarBase.$$p[1]:
                case PolarBase.$$p[2]:
                case PolarBase.$$p[13]:
                case PolarBase.$$p[14]:
                    this.qu();
                    break;
                case "FastItemsSource":
                    if (typeCast(IFastItemsSource_$type, c) != null) {
                        c.deregisterColumn(this.z4);
                        c.deregisterColumn(this.z5);
                        this.z4 = null;
                        this.z5 = null;
                    }
                    if (typeCast(IFastItemsSource_$type, d) != null) {
                        this.z4 = this.dl(this.aa4);
                        this.z5 = this.dl(this.abm);
                    }
                    if ((this.zf != null && !this.zf.ed()) || (this.ze != null && !this.ze.ed())) {
                        this.r8(this.gm && c != null);
                    }
                    break;
                case PolarBase.$$p[0]:
                    if (this.ze != null && this.zf != null) {
                        this.zg = new PolarAxes(this.zf, this.ze);
                    }
                    if (c != null) {
                        c.cx(this);
                    }
                    if (d != null) {
                        d.d3(this);
                    }
                    if (this.ze != null && !this.ze.ed()) {
                        this.r8(false);
                    }
                    else if (c != null && d == null) {
                        this.pi(true, this.cw);
                    }
                    break;
                case PolarBase.$$p[12]:
                    if (this.ze != null && this.zf != null) {
                        this.zg = new PolarAxes(this.zf, this.ze);
                    }
                    if (c != null) {
                        c.cx(this);
                    }
                    if (d != null) {
                        d.d3(this);
                    }
                    if (this.zf != null && !this.zf.ed()) {
                        this.r8(false);
                    }
                    else if (c != null && d == null) {
                        this.pi(true, this.cw);
                    }
                    if (this.ze != null && !this.ze.ed()) {
                        this.ze.lu();
                    }
                    break;
                case PolarBase.$$p[3]:
                    if (this.dp != null) {
                        this.dp.deregisterColumn(this.z4);
                        this.z4 = this.dl(this.aa4);
                    }
                    break;
                case "AngleColumn":
                    this.zi.dd.g$m();
                    if (this.ze != null && !this.ze.ed()) {
                        this.r8(this.gm && this.d9);
                    }
                    break;
                case PolarBase.$$p[15]:
                    if (this.dp != null) {
                        this.dp.deregisterColumn(this.z5);
                        this.z5 = this.dl(this.abm);
                    }
                    break;
                case "RadiusColumn":
                    this.zi.dd.g$m();
                    if (this.zf != null && !this.zf.ed()) {
                        this.r8(this.gm && this.d9);
                    }
                    break;
                case PolarBase.$$p[16]:
                    this.r8(false);
                    this.q0();
                    break;
                case PolarBase.$$p[11]:
                    this.r8(false);
                    this.q0();
                    break;
                case "TransitionProgress":
                    this.zh = new PolarAxisInfoCache(this.ze, this.zf, this.dp);
                    this.ac0 = this.cw.ca;
                    this.acz = this.cw.b9;
                    this.acy = this.cw.getEffectiveViewport();
                    this.zp.z = this.aak;
                    this.zp.d(this.jz, this.zn, this.zl);
                    if (this.d7(this.cw)) {
                        return;
                    }
                    if (this.jz == 1) {
                        this.ab2(this.zl, this.zi);
                        this.q3();
                    }
                    else {
                        this.ab2(this.zp, this.zi);
                    }
                    if (this.dc != null) {
                        this.dc.st(this);
                    }
                    break;
                case "TrendLineBrush":
                    this.rw(b);
                    break;
                case PolarBase.$$p[4]:
                    this.r8(false);
                    this.q0();
                    break;
                case "TrendLineType":
                    this.q0();
                    break;
                case PolarBase.$$p[8]:
                    this.z7 = this.aag();
                    this.r8(false);
                    break;
                case PolarBase.$$p[7]:
                    this.z6 = this.aaf();
                    this.r8(false);
                    break;
                case PolarBase.$$p[9]:
                    this.zs = this.zt();
                    break;
            }
        }
        get zs() {
            return this.zr;
        }
        set zs(a) {
            let b = this.zr;
            this.zr = a;
            if (b != this.zr) {
                this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.zr));
            }
        }
        zt() {
            if (this.zu != 0) {
                return this.zu;
            }
            return this.aae ? 4 : 1;
        }
        get_aae() {
            return false;
        }
        get aae() {
            return this.get_aae();
        }
        aag() {
            return this.aad;
        }
        aaf() {
            return this.aac;
        }
        z9(a) {
            if (typeCast(NumericRadiusAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        z8(a) {
            if (typeCast(NumericAngleAxis.$, a) !== null) {
                return true;
            }
            return false;
        }
        pi(a, b) {
            super.pi(a, b);
            let c = b;
            if (a) {
                c.de.clear();
            }
            c.dd.g$h();
        }
        zb(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;
        }
        abq(a, b, c, d) {
            a.j = new Dictionary$2(Base.$, OwnedPoint.$, 1, b);
            let e = this.dp;
            for (let f = 0; f < b; f++) {
                let g = a.aa._inner[f];
                if (!isInfinity(g.x) && !isInfinity(g.y)) {
                    let h = { $type: Point_$type, x: this.z4.item(f), y: this.z5.item(f) };
                    let i = { $type: Point_$type, x: g.x, y: g.y };
                    a.j.addItem(e.item(f), ((() => {
                        let $ret = new OwnedPoint();
                        $ret.a = e.item(f);
                        $ret.b = h;
                        $ret.c = i;
                        return $ret;
                    })()));
                }
            }
        }
        aby(a, b) {
            let c = b.ca;
            let d = b.b9;
            let e = b.getEffectiveViewport();
            a.m.clear();
            a.r.clear();
            let f = Math.min(this.z4 != null ? this.z4.count : 0, this.z5 != null ? this.z5.count : 0);
            if (f < 1) {
                return;
            }
            this.zh = new PolarAxisInfoCache(this.ze, this.zf, this.dp);
            this.zj = a;
            this.acz = d;
            this.ac0 = c;
            this.acy = b.getEffectiveViewport();
            b.db.l(a.m, this.aau, c, d, this.ik);
            if (f <= this.aau) {
                this.abq(a, f, c, d);
            }
            let g = this.zb(d, a.r);
            let h = Math.min(this.ze.qw, this.ze.qv);
            let i = Math.max(this.ze.qv, this.ze.qw);
            b.dd.k = this.aak;
            b.dd.j = 0;
            b.dd.m = this.zf.tg;
            b.dd.l = this.zf.tf;
            b.dd.n = (j, k) => this.zg.c(j, k, c, d, e, Math.cos);
            b.dd.o = (j, k) => this.zg.d(j, k, c, d, e, Math.sin);
            let j = new List$1(Number_$type, 0);
            for (let k = 0; k < this.z4.count; k++) {
                if (this.z4.item(k) >= h && this.z4.item(k) <= i) {
                    j.add(this.z4.item(k));
                }
            }
            let l = this.z5;
            if (j.count != this.z4.count) {
                l = new List$1(Number_$type, 0);
                for (let m = 0; m < this.z4.count; m++) {
                    if (this.z4.item(m) >= h && this.z4.item(m) <= i) {
                        l.add(this.z5.item(m));
                    }
                }
            }
            b.dd.p(a.r, this.zw, j, l, this.aav, runOn(this.ze, this.ze.getScaledAngle), runOn(this.zf, this.zf.tm), ((() => {
                let $ret = new TrendResolutionParams();
                $ret.d = this.ik;
                $ret.i = d;
                $ret.h = e;
                $ret.j = c;
                return $ret;
            })()), g, h, i);
            if (b.aa.count > 0) {
                a.p.clear();
                for (let n = 0; n < b.aa.count; n++) {
                    a.p.add(new List$1(Point_$type, 0));
                    let o = b.aa._inner[n];
                    o.k = this.aak;
                    o.j = 0;
                    o.m = this.zf.tg;
                    o.l = this.zf.tf;
                    o.n = (p, q) => this.zg.c(p, q, c, d, e, Math.cos);
                    o.o = (p, q) => this.zg.d(p, q, c, d, e, Math.sin);
                    o.p(a.p._inner[n], o.g$b, j, l, o.g$f, runOn(this.ze, this.ze.getScaledAngle), runOn(this.zf, this.zf.tm), ((() => {
                        let $ret = new TrendResolutionParams();
                        $ret.d = this.ik;
                        $ret.i = d;
                        $ret.h = e;
                        $ret.j = c;
                        return $ret;
                    })()), g, h, i);
                }
            }
        }
        get_fh() {
            return true;
        }
        zy(a, b, c) {
            return null;
        }
        zz(a, b, c) {
            if (this.dp == null) {
                return null;
            }
            let d = this.zm();
            let e = this.zi.ce(this.wr(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;
        }
        zx(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.ef && this.f2(this.by) && !c) {
                let d = this.zy(a, b, this.z0);
                this.z0 = d;
                return d;
            }
            else {
                let e = this.zx(a, b, this.z0);
                this.z0 = e;
                return e;
            }
        }
        di(a, b, c) {
            if (this.f2(this.by) && !c) {
                let d = this.zz(a, b, this.z1);
                this.z1 = d;
                return d;
            }
            else {
                let e = this.zx(a, b, this.z1);
                e.d = true;
                this.z1 = e;
                return e;
            }
        }
        aai() {
            return (this.assigningPolarStyle != null && this.z7) || (this.by != 1) || this.d3 || (this.cq != 1) || (this.cp != 1);
        }
        aah() {
            return (this.assigningPolarMarkerStyle != null && this.z6) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
        }
        ab2(a, b) {
            this.rd();
            let c = b.ca;
            let d = b.b9;
            let e = this.getEffectiveViewport1(b);
            let f = this.w4(b);
            this.zh = new PolarAxisInfoCache(this.ze, this.zf, this.dp);
            if (this.x1()) {
                b.db.j(a.m, this.x3);
                if (this.aah()) {
                    this.abs(b, a);
                }
            }
            b.c4();
            let g = this.zb(d, b.dd.g$n.an);
            b.dd.g$l(a.r, g);
            if (b.aa.count > 0) {
                for (let h = 0; h < b.aa.count; h++) {
                    let i = b.aa._inner[h];
                    i.g$l(a.p._inner[h], g);
                }
            }
            this.abp(d, c, e, f, b);
        }
        y8(a, b) {
            return this.y9(a, b);
        }
        y9(a, b) {
            if (b < a || a < 0 || a > this.z4.count || b < 0 || b > this.z4.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;
        }
        abs(a, b) {
            a.ck = true;
            this.zq.ay(this, this.aah(), runOn(this, this.y8));
            let c = this.zq.d;
            let d = c != null;
            let e = this.getEffectiveViewport1(a);
            let f = this.dp == null ? 0 : this.dp.count;
            this.zi.cw((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.abw(h, f, a.t);
                    }
                    this.zq.ac(g, i);
                }
            });
        }
        abx(a, b, c) {
            let d = this.by != 1;
            let e = this.cq != 1;
            let f = this.cp != 1;
            this.zq.a0(this.zq.b, a, b, false);
            this.zq.ab(this.ii);
            let g = this.zq.ax;
            let h = null;
            let i = null;
            let j = null;
            let k = this.dp;
            if (d && this.dc != null) {
                h = this.dc.d7.getHighlightingInfo(this, k, g.z, g.y, false);
                g.c = h;
            }
            if (e && this.dc != null) {
                i = this.dc.d8.getHighlightingInfo(this, k, g.z, g.y, false);
                if (i == null && this.bo != null) {
                    i = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, false);
                }
                g.d = i;
            }
            if (f && this.dc != null) {
                j = this.dc.d6.getHighlightingInfo(this, k, g.z, g.y, false);
                g.b = j;
            }
            g.h = c;
            this.ab0(g);
            this.zq.z(this, h, i, j, c, d, e, f, a < 0);
        }
        abw(a, b, c) {
            let d = this.by != 1;
            let e = this.cq != 1;
            let f = this.cp != 1;
            this.zq.a0(this.zq.d, a, b, true);
            this.zq.aa(this.ii);
            let g = this.zq.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.d7.getHighlightingInfo(this, k, g.z, g.y, true);
                if (this.dc.d7.isCrossContextHighlight(this)) {
                    l = this.dc.d7.getHighlightingInfo(this, k, g.z, g.y, true);
                }
                g.c = h;
            }
            if (e && this.dc != null) {
                i = this.dc.d8.getHighlightingInfo(this, k, g.z, g.y, true);
                if (i == null && this.bo != null) {
                    i = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true);
                }
                if (this.dc.d8.isCrossContextHighlight(this)) {
                    m = this.dc.d8.getHighlightingInfo(this, k, g.z, g.y, true);
                }
                g.d = i;
            }
            if (f && this.dc != null) {
                j = this.dc.d6.getHighlightingInfo(this, k, g.z, g.y, true);
                if (this.dc.d6.isCrossContextHighlight(this)) {
                    n = this.dc.d6.getHighlightingInfo(this, k, g.z, g.y, true);
                }
                g.d = i;
            }
            g.h = c;
            this.abz(g);
            this.zq.y(this, h, i, j, c, d, e, f, g.v, this.dc.d7.totalHighWaterMark, g.x, this.dc.d8.totalHighWaterMark, g.t, this.dc.d6.totalHighWaterMark);
        }
        ab0(a) {
            if (this.assigningPolarStyle != null && this.z7) {
                this.assigningPolarStyle(this, a);
            }
        }
        abz(a) {
            if (this.assigningPolarMarkerStyle != null && this.z6) {
                this.assigningPolarMarkerStyle(this, a);
            }
        }
        abp(a, b, c, d, e) {
            e.dg(a, b, c, d);
        }
        sz() {
            super.sz();
            if (this.index < 0) {
                return;
            }
            this.zi.dj();
        }
        sa(a, b) {
            super.sa(a, b);
            if (!this.g6) {
                this.cw.be(b);
                return;
            }
            this.cw.be(b);
            if (this.d7(this.cv)) {
                return;
            }
            this.sb();
            this.g6 = false;
        }
        sb() {
            super.sb();
            let a = this.cv;
            if (!this.gy) {
                this.zo = new PolarFrame();
                this.aby(this.zo, a);
            }
            this.gy = false;
            this.ab2(this.zo, a);
        }
        r7(a, b, c, d, e) {
            super.r7(a, b, c, d, e);
            let f = this.ba.a$k.item(d);
            let g = f;
            f.bd(c);
            if (this.d7(g)) {
                return;
            }
            if (this.zk == null) {
                this.zk = new PolarFrame();
            }
            this.aby(this.zk, g);
            this.ab2(this.zk, g);
        }
        ab1(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);
            }
        }
        y7(a, b, c) {
            this.abt();
            return this.zj.aa.toArray();
        }
        aam(a) {
            let b = new List$1(Number_$type, 0);
            let c = this.dp;
            for (let d of fromEnum(this.zi.de.c)) {
                b.add(c.indexOf(d));
            }
            return b;
        }
        acw(a) {
            return { $type: Point_$type, x: this.z4.item(a), y: this.z5.item(a) };
        }
        qd(a) {
            super.qd(a);
            this.bc.exportTrendlineData(this, a, this.zi.dd.g$n);
        }
        getDataLegendSeriesContextAt(a, b) {
            let c = { $type: Point_$type, x: a, y: b };
            let d = this.kw(c);
            let e = d == null ? NaN : this.i4(d, "RadiusMemberPath");
            let f = d == null ? NaN : this.i4(d, "AngleMemberPath");
            let g = new DataLegendSeriesValueInfo();
            g.l = e;
            g.a = 11;
            g.r = this.abm != null ? this.abm : "Radius";
            g.q = "Radius";
            g.s = this.abi != null ? this.abi : "R:";
            g.t = this.abk != null ? this.abk : "";
            let h = new DataLegendSeriesValueInfo();
            h.l = f;
            h.a = 10;
            h.r = this.aa4 != null ? this.aa4 : "Angle";
            h.q = "Angle";
            h.s = this.aa0 != null ? this.aa0 : "A:";
            h.t = this.aa2 != null ? this.aa2 : "";
            let i = new DataLegendSeriesContext();
            i.e = ((() => {
                let $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
                $ret.add(g);
                $ret.add(h);
                return $ret;
            })());
            i.h = this.mn();
            return i;
        }
        ak(a, b) {
            let c = new List$1(ChartSelection.$, 0);
            this.qi(a, c, b);
            return c.toArray();
        }
        qi(a, b, c) {
            let d = this.cw.ca;
            let e = this.cw.b9;
            let f = this.getEffectiveViewport1(this.cw);
            let g = this.dc.yz(this.xd, this.getEffectiveViewport(), d);
            let h = new CollisionRect(0, this.dc.yw(a));
            let i = this.zf.px(e, d, f, g);
            for (let j = 0; j < this.dp.count; j++) {
                let k = this.ze.getScaledAngle(this.z4.item(j));
                let l = this.zf.tm(this.z5.item(j));
                let m = this.zg.c(k, l, d, e, f, Math.cos);
                let n = this.zg.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 = markType(PolarBase, 'PolarBase', MarkerSeries.$);
    PolarBase.ab3 = 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:ze:ab4', [NumericAngleAxis.$, null], 'AngleMemberAsLegendLabel:aa0:ab5', [2, null], 'AngleMemberAsLegendUnit:aa2:ab6', [2, null], 'AngleMemberPath:aa4:ab7', [2], 'ClipSeriesToBounds:aaa:ab8', [0, false], 'HighlightedAngleMemberPath:aa7:ab9', [2, null], 'HighlightedRadiusMemberPath:aa9:aca', [2, null], 'IsCustomPolarMarkerStyleAllowed:aac:acb', [0, false], 'IsCustomPolarStyleAllowed:aad:acc', [0, false], 'ItemSearchMode:zu:acd', [ScatterItemSearchMode_$type, enumGetBox(ScatterItemSearchMode_$type, 0)], 'ItemSearchThreshold:aat:ace', [1, 10000], 'MaximumMarkers:aau:acf', [1, 400], 'RadiusAxis:zf:acg', [NumericRadiusAxis.$, null], 'RadiusMemberAsLegendLabel:abi:ach', [2, null], 'RadiusMemberAsLegendUnit:abk:aci', [2, null], 'RadiusMemberPath:abm:acj', [2], 'UseCartesianInterpolation:aak:acr', [0, true], 'TrendLineType:zw:acp', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:aas:aco', [1, 1.5], 'TrendLinePeriod:aav:acn', [1, 7], 'TrendLineZIndex:aaw:acq', [1, 1], 'TrendLineBrush:act:ack', [Brush.$, null], 'TrendLineDashArray:acu:acl', [DoubleCollection.$], 'TrendLineDashCap:acv:acm', [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.dc = null;
            this.db = null;
            this.dd = null;
            this.de = null;
            this.dc = a;
            this.de = new HashPool$2(Base.$, Marker.$);
            this.cz(this.de);
            this.dd = new PolarTrendLineManager();
        }
        a4() {
            super.a4();
            this.db = this.da();
            if (!this.t) {
                this.dc.aau = 1000;
                this.ch.xv = Defaults.e;
            }
        }
        dh(a) {
            this.de.g(a);
        }
        da() {
            let a = new NumericMarkerManager(0, (b) => this.de.item(b), (b) => this.dc.zh.c.item(b), runOn(this, this.di), runOn(this, this.c9), runOn(this, this.df));
            a.n = true;
            a.p = runOn(this.dc, this.dc.acw);
            return a;
        }
        di(a) {
            this.dc.ab1(a, this.de);
        }
        c9() {
            return this.dc.y7(this.de, this.ca, this.b9);
        }
        df() {
            return this.dc.aam(this.de);
        }
        dg(a, b, c, d) {
            if (this.dc.aaa) {
                let e = new GeometryGroup();
                this.dc.zf.tu(e, a, b, c, d);
            }
            else {
            }
        }
        dj() {
            if (this.dc.act != null) {
                this.dc.acs = this.dc.act;
            }
            else {
                this.dc.acs = this.dc.vt;
            }
        }
        cw(a) {
            this.de.f(a);
        }
        bi(a, b) {
            if (a.d) {
                if (this.dc.zw != 0 && !b) {
                    let c = this.dd.g$n;
                    c.ad = this.dc.aas;
                    c._stroke = this.dc.acs;
                    c.aj = this.dc.acv;
                    c.ai = this.dc.acu;
                    a.v(c);
                }
            }
            super.bi(a, b);
        }
        dk() {
            return Rect.empty;
        }
        getDefaultTooltipTemplate() {
            let a = "<div class='ui-chart-default-tooltip-content'><span>" + "${item." + this.dc.aa4 + "}" + "</span><br/><span";
            let b = this.f.ba.a$v(this.f);
            if (!stringIsNullOrEmpty(b)) {
                a += " style='color:" + b + "'";
            }
            a += ">" + this.dc.title + ": </span><span class='ui-priority-primary'>" + "${item." + this.dc.abm + "}</span></div>";
            return a;
        }
    }
    PolarBaseView.$t = markType(PolarBaseView, 'PolarBaseView', MarkerSeriesView.$);
    return PolarBaseView;
})();