igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,449 lines (1,448 loc) • 53.3 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends, __values } from "tslib";
import { MarkerSeries } from "./MarkerSeries";
import { Base, runOn, delegateCombine, Number_$type, enumGetBox, fromEnum, Point_$type, typeCast, 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
*/
var PolarBase = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(PolarBase, _super);
function PolarBase() {
var _this = _super.call(this) || this;
_this.y3 = null;
_this.yu = null;
_this.y1 = null;
_this.ack = null;
_this.acj = null;
_this.aci = null;
_this.zf = null;
_this.zm = null;
_this.zn = null;
_this.y7 = new PolarFrame();
_this.y9 = new PolarFrame();
_this.y5 = new PolarFrame();
_this.y0 = null;
_this.z5 = null;
_this.zb = 1;
_this.zr = false;
_this.zq = false;
_this.zk = null;
_this.zl = null;
_this.assigningPolarStyle = null;
_this.assigningPolarMarkerStyle = null;
_this.za = null;
_this.y8 = null;
_this.y4 = null;
_this.za = new PolarSeriesRenderManager();
_this.zc = _this.zd();
_this.y8 = new PolarFrame();
_this.y9.y = runOn(_this, _this.ach);
_this.y7.y = runOn(_this, _this.ach);
_this.y5.y = runOn(_this, _this.ach);
_this.zf = new SeriesRenderer$2(PolarFrame.$, PolarBaseView.$, 0, runOn(_this, _this.abi), runOn(_this, _this.abm), runOn(_this, _this.d4), runOn(_this, _this.sb), runOn(_this, _this.abb));
return _this;
}
PolarBase.prototype.ct = function () {
return new PolarBaseView(this);
};
PolarBase.prototype.q3 = function (a) {
_super.prototype.q3.call(this, a);
this.y2 = a;
};
PolarBase.prototype.o4 = function () {
_super.prototype.o4.call(this);
this.yy = null;
this.yz = null;
};
PolarBase.prototype.get_fq = function () {
return true;
};
PolarBase.prototype.ed = function (a, b, c, d, e) {
var _this = this;
if (!this.hasMarkers) {
return false;
}
var f = this.yy;
var g = new ScalerParams(1, this.dc.wt, this.wx, f.ch);
g.c = this.getEffectiveViewport1(this.cw);
var h = this.yz;
var i = new ScalerParams(1, this.dc.wt, this.wx, h.ch);
i.c = this.getEffectiveViewport1(this.cw);
a.clear();
this.xb.cw(function (j) {
if (j._visibility == 0) {
var k = new SeriesPointOfInterest();
var l = j.n;
var m = j.o;
if (!e && (l < _this.wx.left || l > _this.wx.right || m < _this.wx.top || m > _this.wx.bottom)) {
return;
}
var n = void 0;
var o = void 0;
var p = _this.y0.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.vl;
k.c = j.ak;
if (_this.ha) {
k.g = _this.vs(j.ak);
}
a.add(k);
}
});
return true;
};
PolarBase.prototype.abb = function () {
if (this.dd.g) {
this.dd.t();
}
};
PolarBase.prototype.abd = function () {
this.y0.e(this.y3.x, this.zo, this.zp, this.ack, this.acj, this.aci, function (a, b) { return Math.cos(b); }, function (a, b) { return Math.sin(b); }, true);
};
PolarBase.prototype.gc = function () {
return this.highlightedItemsSource != null || (this.aat != null && this.aar != null);
};
PolarBase.prototype.z3 = function () {
return false;
};
PolarBase.prototype.hu = function () {
var a = _super.prototype.hu.call(this);
{
var b = ((function () {
var $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.abe));
a.add(b);
}
{
var c = ((function () {
var $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.abf));
a.add(c);
}
if (this.z3()) {
var d = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "DashArray";
$ret.p = true;
$ret.x = ((function () {
var $ret = new DoubleCollection();
$ret.add(5);
$ret.add(5);
return $ret;
})());
$ret.q = true;
return $ret;
})());
a.add(d);
}
if (!this.z3()) {
var e = ((function () {
var $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.r4));
a.add(e);
}
if (!this.z3()) {
var f = ((function () {
var $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.r4));
a.add(f);
}
return a;
};
PolarBase.prototype.abf = function (a, b) {
if (this.aat != null) {
b.value = this.aat;
return;
}
b.value = this.aa6;
};
PolarBase.prototype.abe = function (a, b) {
if (this.aar != null) {
b.value = this.aar;
return;
}
b.value = this.aao;
};
Object.defineProperty(PolarBase.prototype, "zo", {
get: function () {
return this.zm;
},
set: function (a) {
if (this.zm != a) {
var b = this.zo;
this.zm = a;
this.raisePropertyChanged("AngleColumn", b, this.zo);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(PolarBase.prototype, "zp", {
get: function () {
return this.zn;
},
set: function (a) {
if (this.zn != a) {
var b = this.zp;
this.zn = a;
this.raisePropertyChanged("RadiusColumn", b, this.zp);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(PolarBase.prototype, "acc", {
get: function () {
return this.c(PolarBase.abn);
},
set: function (a) {
this.h(PolarBase.abn, a);
},
enumerable: false,
configurable: true
});
PolarBase.prototype.y6 = function () {
var a = this.y5;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.y9;
}
return a;
};
PolarBase.prototype.qd = function () {
_super.prototype.qd.call(this);
if (this.yz != null) {
this.yz.ib(false);
}
if (this.yy != null) {
this.yy.ib(false);
}
};
PolarBase.prototype.pd = function (a, b, c, d) {
var e_1, _a;
var e = false;
this.y2.dd.g$i(a, b, c, d);
if (this.y2.aa.count > 0) {
try {
for (var _b = __values(fromEnum(this.y2.aa)), _c = _b.next(); !_c.done; _c = _b.next()) {
var f = _c.value;
f.g$i(a, b, c, d);
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
}
if (this.yy != null && !this.yy.c1()) {
e = true;
}
if (this.yz != null && !this.yz.c1()) {
e = true;
}
if (e) {
this.ru(true);
}
};
PolarBase.prototype.su = function (a, b) {
this.ru(false);
};
PolarBase.prototype.sv = function (a, b) {
this.ru(false);
};
PolarBase.prototype.hf = function (a, b, c) {
var d = true;
if (!_super.prototype.hf.call(this, a, b, c) || !c.r() || b.isEmpty || a.isEmpty || this.yy == null || this.yz == null || this.zo == null || this.zp == null || this.zo.count == 0 || this.zp.count == 0 || this.dp == null || this.dp.count != this.zo.count || this.dp.count != this.zp.count || this.y0 == null || this.yy.bi == null || this.yz.bi == null || this.yy.l4 == this.yy.l3 || this.yz.l4 == this.yz.l3) {
d = false;
}
return d;
};
PolarBase.prototype.rv = function (a) {
_super.prototype.rv.call(this, a);
var b;
var c;
var d = this.getViewInfo(c, b);
c = d.p0;
b = d.p1;
if (!this.hf(c, b, this.cw)) {
this.o7(true, this.cw);
return;
}
this.ack = b;
this.acj = c;
this.aci = this.cw.getEffectiveViewport();
this.y1 = new PolarAxisInfoCache(this.yy, this.yz, this.dp);
var e = new SeriesRenderingArguments(this, c, b, a, this.gs);
var f = this.zf.g(e, this.y7, this.y5, this.y9, this.y2);
this.y7 = f.p1;
this.y5 = f.p2;
this.y9 = f.p3;
};
PolarBase.prototype.ach = function (a) {
var b = this.y0.h(a.x, a.y, this.ack, this.acj, this.aci, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
return b;
};
PolarBase.prototype.ay = function (a) {
if (a != null && a == this.yy && this.zo != null) {
return new AxisRange(this.zo.minimum, this.zo.maximum);
}
if (a != null && a == this.yz && this.zp != null) {
return new AxisRange(this.zp.minimum, this.zp.maximum);
}
return null;
};
PolarBase.prototype.ge = function (a) {
var b = this.cw.ca;
b = b.copy();
var c = this.cw.b9;
var d = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1;
if (this.yy == null || this.zo == null || this.yz == null || this.zp == null) {
return false;
}
if (d < 0 || d > this.zo.count - 1 || d > this.zp.count - 1) {
return false;
}
var e = this.yy.getScaledAngle(this.zo.item(d));
var f = this.yz.od(this.zp.item(d));
var g = 0.5 + (Math.cos(e) * f);
var 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;
};
PolarBase.prototype.ko = function (a) {
var b = this.j4(a);
if (this.dp != null && b >= 0 && b < this.dp.count) {
return this.dp.item(b);
}
return null;
};
PolarBase.prototype.j4 = function (a) {
var b = truncate(Math.round(this.is(a)));
return b;
};
PolarBase.prototype.is = function (a) {
switch (this.zc) {
case 1: return this.z9(a);
case 3: return this.aaa(a);
case 2: return this.z7(a);
case 4: return this.z8(a);
}
return -1;
};
PolarBase.prototype.z8 = function (a) {
return this.aab(a, false);
};
PolarBase.prototype.z7 = function (a) {
var b = this.wc(a);
var c = b.x;
var d = b.y;
if (this.dp == null || this.yy == null || this.yz == null || this.zo == null || this.zp == null) {
return -1;
}
if (this.dp.count > this.aad) {
return -1;
}
if (!this.zv()) {
return -1;
}
var e = this.z5;
var f = 1.7976931348623157E+308;
var g = -1;
for (var h = 0; h < this.zo.count; h++) {
var i = e._inner[h].x;
var j = e._inner[h].y;
var k = (c - i) * (c - i) + (d - j) * (d - j);
if (k < f) {
f = k;
g = h;
}
}
return g;
};
PolarBase.prototype.zv = function () {
var a = this.y5;
if (this.d4()) {
a = this.y9;
}
if (a == null || a.x.count == 0) {
return false;
}
this.z5 = a.x;
return true;
};
PolarBase.prototype.aab = function (a, b) {
if (!this.zy) {
return -1;
}
var c = { $type: Point_$type, x: 0, y: 0 };
var d = true;
var e = this.y5;
if (this.d4()) {
e = this.y9;
}
if (e == null) {
return -1;
}
if (e.n == null) {
return -1;
}
if (this.dp == null || this.dp.count > this.aad) {
return -1;
}
if (!this.zv()) {
return -1;
}
var f = this.z5;
var g = this.wc(a);
var h = 1.7976931348623157E+308;
var i = -1;
for (var j = 0; j < f.count; j++) {
var 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))) {
var l = GeometryUtil.h(g, c, k);
if (l < h) {
h = l;
i = j;
}
}
}
c = k;
}
if (i >= 0) {
var m = f._inner[i];
var n = f._inner[i - 1];
if (!b || (e.j.containsKey(this.dp.item(i)) && e.j.containsKey(this.dp.item(i - 1)))) {
var 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;
};
PolarBase.prototype.aaa = function (a) {
return this.aab(a, true);
};
PolarBase.prototype.z9 = function (a) {
var _this = this;
var b = null;
var c = 1.7976931348623157E+308;
var d = this.wc(a);
var e = d.x;
var f = d.y;
if (this.y2.de.e > this.aad) {
return -1;
}
this.y2.dh(function (g) {
if (g._visibility == 0) {
var h = _this.y2.c7(g);
var i = h.left + h.width / 2;
var j = h.top + h.height / 2;
var k = (e - i) * (e - i) + (f - j) * (f - j);
if (k < c) {
c = k;
b = g;
}
}
});
if (b != null) {
return b.ak;
}
return -1;
};
PolarBase.prototype.wh = function (a, b, c) {
var _this = this;
if (this.yy == null || this.yz == null || this.zo == null || this.zp == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
var d = this.cw.ca;
var e = this.cw.b9;
var f = this.getEffectiveViewport();
var g = new ScalerParams(0, d, e, this.yy.ch, f);
var h = ((function () {
var $ret = new ScalerParams(0, d, e, _this.yz.ch, f);
$ret.b = _this.iz();
return $ret;
})());
if (b) {
var i = this.is(a);
if (i == -1) {
return { $type: Point_$type, x: NaN, y: NaN };
}
var j = truncate(Math.floor(i));
var 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.y0.h(this.zo.item(j), this.zp.item(j), d, e, f, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
}
var l = i - Math.floor(i);
var m = this.y0.h(this.zo.item(j), this.zp.item(j), d, e, f, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
var n = this.y0.h(this.zo.item(k), this.zp.item(k), d, e, f, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
var o = m.x;
var p = m.y;
var q = n.x;
var r = n.y;
var s = q - o;
var t = r - p;
return { $type: Point_$type, x: o + s * l, y: p + t * l };
}
else {
var u = this.j4(a);
if (u == -1) {
return { $type: Point_$type, x: NaN, y: NaN };
}
return this.y0.h(this.zo.item(u), this.zp.item(u), d, e, f, this.y1.e, this.y1.d, this.y1.g, this.y1.f, this.y1.i, this.y1.h);
}
};
PolarBase.prototype.ai = function () {
return [this.yy, this.yz];
};
PolarBase.prototype.kr = function (a, b) {
var c = this.nf(b);
if (c == PolarBase.$$p[3]) {
return this.ks(a, b, this.aao);
}
if (c == PolarBase.$$p[15]) {
return this.ks(a, b, this.aa6);
}
if (c == PolarBase.$$p[5]) {
return this.ks(a, b, this.aar);
}
if (c == PolarBase.$$p[6]) {
return this.ks(a, b, this.aat);
}
return _super.prototype.kr.call(this, a, b);
};
PolarBase.prototype.mf = function (a) {
var b = this.nf(a);
if (b == PolarBase.$$p[3]) {
return this.aao;
}
if (b == PolarBase.$$p[15]) {
return this.aa6;
}
if (b == PolarBase.$$p[5]) {
return this.aar;
}
if (b == PolarBase.$$p[6]) {
return this.aat;
}
return _super.prototype.mf.call(this, a);
};
PolarBase.prototype.rc = function (a, b, c, d) {
_super.prototype.rc.call(this, a, b, c, d);
if (this.y2.dd.g$e(a, b, c, d)) {
this.ru(false);
this.qn();
}
switch (b) {
case PolarBase.$$p[1]:
case PolarBase.$$p[2]:
case PolarBase.$$p[13]:
case PolarBase.$$p[14]:
this.qh();
break;
case "FastItemsSource":
if (typeCast(IFastItemsSource_$type, c) != null) {
c.deregisterColumn(this.zo);
c.deregisterColumn(this.zp);
this.zo = null;
this.zp = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
this.zo = this.dl(this.aao);
this.zp = this.dl(this.aa6);
}
if ((this.yz != null && !this.yz.c1()) || (this.yy != null && !this.yy.c1())) {
this.ru(this.gh && c != null);
}
break;
case PolarBase.$$p[0]:
if (this.yy != null && this.yz != null) {
this.y0 = new PolarAxes(this.yz, this.yy);
}
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
if (this.yy != null && !this.yy.c1()) {
this.ru(false);
}
else if (c != null && d == null) {
this.o7(true, this.cw);
}
break;
case PolarBase.$$p[12]:
if (this.yy != null && this.yz != null) {
this.y0 = new PolarAxes(this.yz, this.yy);
}
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
if (this.yz != null && !this.yz.c1()) {
this.ru(false);
}
else if (c != null && d == null) {
this.o7(true, this.cw);
}
if (this.yy != null && !this.yy.c1()) {
this.yy.h7();
}
break;
case PolarBase.$$p[3]:
if (this.dp != null) {
this.dp.deregisterColumn(this.zo);
this.zo = this.dl(this.aao);
}
break;
case "AngleColumn":
this.y2.dd.g$m();
if (this.yy != null && !this.yy.c1()) {
this.ru(this.gh && this.d9);
}
break;
case PolarBase.$$p[15]:
if (this.dp != null) {
this.dp.deregisterColumn(this.zp);
this.zp = this.dl(this.aa6);
}
break;
case "RadiusColumn":
this.y2.dd.g$m();
if (this.yz != null && !this.yz.c1()) {
this.ru(this.gh && this.d9);
}
break;
case PolarBase.$$p[16]:
this.ru(false);
this.qn();
break;
case PolarBase.$$p[11]:
this.ru(false);
this.qn();
break;
case "TransitionProgress":
this.y1 = new PolarAxisInfoCache(this.yy, this.yz, this.dp);
this.ack = this.cw.ca;
this.acj = this.cw.b9;
this.aci = this.cw.getEffectiveViewport();
this.y9.w = this.z4;
this.y9.c(this.jr, this.y7, this.y5);
if (this.d7(this.cw)) {
return;
}
if (this.jr == 1) {
this.abm(this.y5, this.y2);
this.qq();
}
else {
this.abm(this.y9, this.y2);
}
if (this.dc != null) {
this.dc.q7(this);
}
break;
case "TrendLineBrush":
this.ri(b);
break;
case PolarBase.$$p[4]:
this.ru(false);
this.qn();
break;
case "TrendLineType":
this.qn();
break;
case PolarBase.$$p[8]:
this.zr = this.z0();
this.ru(false);
break;
case PolarBase.$$p[7]:
this.zq = this.zz();
this.ru(false);
break;
case PolarBase.$$p[9]:
this.zc = this.zd();
break;
}
};
Object.defineProperty(PolarBase.prototype, "zc", {
get: function () {
return this.zb;
},
set: function (a) {
var b = this.zb;
this.zb = a;
if (b != this.zb) {
this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ScatterItemSearchMode_$type, b), enumGetBox(ScatterItemSearchMode_$type, this.zb));
}
},
enumerable: false,
configurable: true
});
PolarBase.prototype.zd = function () {
if (this.ze != 0) {
return this.ze;
}
return this.zy ? 4 : 1;
};
PolarBase.prototype.get_zy = function () {
return false;
};
Object.defineProperty(PolarBase.prototype, "zy", {
get: function () {
return this.get_zy();
},
enumerable: false,
configurable: true
});
PolarBase.prototype.z0 = function () {
return this.zx;
};
PolarBase.prototype.zz = function () {
return this.zw;
};
PolarBase.prototype.zt = function (a) {
if (typeCast(NumericRadiusAxis.$, a) !== null) {
return true;
}
return false;
};
PolarBase.prototype.zs = function (a) {
if (typeCast(NumericAngleAxis.$, a) !== null) {
return true;
}
return false;
};
PolarBase.prototype.o7 = function (a, b) {
_super.prototype.o7.call(this, a, b);
var c = b;
if (a) {
c.de.clear();
}
c.dd.g$h();
};
PolarBase.prototype.yv = function (a, b) {
var c = a.top - 10;
var d = a.bottom + 10;
var e = a.left - 10;
var f = a.right + 10;
var g = ((function () {
var $ret = new Clipper(1, e, d, f, c, false);
$ret.i = b;
return $ret;
})());
return g;
};
PolarBase.prototype.aba = function (a, b, c, d) {
a.g = new Dictionary$2(Base.$, OwnedPoint.$, 1, b);
var e = this.dp;
var _loop_1 = function (f) {
var g = a.x._inner[f];
if (!isInfinity(g.x) && !isInfinity(g.y)) {
var h_1 = { $type: Point_$type, x: this_1.zo.item(f), y: this_1.zp.item(f) };
var i_1 = { $type: Point_$type, x: g.x, y: g.y };
a.g.addItem(e.item(f), ((function () {
var $ret = new OwnedPoint();
$ret.a = e.item(f);
$ret.b = h_1;
$ret.c = i_1;
return $ret;
})()));
}
};
var this_1 = this;
for (var f = 0; f < b; f++) {
_loop_1(f);
}
};
PolarBase.prototype.abi = function (a, b) {
var _this = this;
var c = b.ca;
var d = b.b9;
var e = b.getEffectiveViewport();
a.j.clear();
a.o.clear();
var f = Math.min(this.zo != null ? this.zo.count : 0, this.zp != null ? this.zp.count : 0);
if (f < 1) {
return;
}
this.y1 = new PolarAxisInfoCache(this.yy, this.yz, this.dp);
this.y3 = a;
this.acj = d;
this.ack = c;
this.aci = b.getEffectiveViewport();
b.db.l(a.j, this.aae, c, d, this.ie);
if (f <= this.aae) {
this.aba(a, f, c, d);
}
var g = this.yv(d, a.o);
var h = Math.min(this.yy.l4, this.yy.l3);
var i = Math.max(this.yy.l3, this.yy.l4);
b.dd.k = this.z4;
b.dd.j = 0;
b.dd.m = this.yz.n7;
b.dd.l = this.yz.n6;
b.dd.n = function (j, k) { return _this.y0.c(j, k, c, d, e, Math.cos); };
b.dd.o = function (j, k) { return _this.y0.d(j, k, c, d, e, Math.sin); };
var j = new List$1(Number_$type, 0);
for (var k = 0; k < this.zo.count; k++) {
if (this.zo.item(k) >= h && this.zo.item(k) <= i) {
j.add(this.zo.item(k));
}
}
var l = this.zp;
if (j.count != this.zo.count) {
l = new List$1(Number_$type, 0);
for (var m = 0; m < this.zo.count; m++) {
if (this.zo.item(m) >= h && this.zo.item(m) <= i) {
l.add(this.zp.item(m));
}
}
}
b.dd.p(a.o, this.zg, j, l, this.aaf, runOn(this.yy, this.yy.getScaledAngle), runOn(this.yz, this.yz.od), ((function () {
var $ret = new TrendResolutionParams();
$ret.d = _this.ie;
$ret.i = d;
$ret.h = e;
$ret.j = c;
return $ret;
})()), g, h, i);
if (b.aa.count > 0) {
a.m.clear();
for (var n = 0; n < b.aa.count; n++) {
a.m.add(new List$1(Point_$type, 0));
var o = b.aa._inner[n];
o.k = this.z4;
o.j = 0;
o.m = this.yz.n7;
o.l = this.yz.n6;
o.n = function (p, q) { return _this.y0.c(p, q, c, d, e, Math.cos); };
o.o = function (p, q) { return _this.y0.d(p, q, c, d, e, Math.sin); };
o.p(a.m._inner[n], o.g$b, j, l, o.g$f, runOn(this.yy, this.yy.getScaledAngle), runOn(this.yz, this.yz.od), ((function () {
var $ret = new TrendResolutionParams();
$ret.d = _this.ie;
$ret.i = d;
$ret.h = e;
$ret.j = c;
return $ret;
})()), g, h, i);
}
}
};
PolarBase.prototype.get_ff = function () {
return true;
};
PolarBase.prototype.zi = function (a, b, c) {
return null;
};
PolarBase.prototype.zj = function (a, b, c) {
if (this.dp == null) {
return null;
}
var d = this.y6();
var e = this.y2.ce(this.wc(b));
var 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;
}
var 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;
};
PolarBase.prototype.zh = function (a, b, c) {
var d = new HighlightingInfo();
d.i = this;
d.g = 0;
d.f = this.dp.count - 1;
d.c = true;
if (c != null && c.g == d.g && c.f == d.f) {
return c;
}
return d;
};
PolarBase.prototype.dh = function (a, b, c) {
if (this.ef && this.f0(this.by) && !c) {
var d = this.zi(a, b, this.zk);
this.zk = d;
return d;
}
else {
var e = this.zh(a, b, this.zk);
this.zk = e;
return e;
}
};
PolarBase.prototype.di = function (a, b, c) {
if (this.f0(this.by) && !c) {
var d = this.zj(a, b, this.zl);
this.zl = d;
return d;
}
else {
var e = this.zh(a, b, this.zl);
e.d = true;
this.zl = e;
return e;
}
};
PolarBase.prototype.z2 = function () {
return (this.assigningPolarStyle != null && this.zr) || (this.by != 1) || this.d3 || (this.cq != 1) || (this.cp != 1);
};
PolarBase.prototype.z1 = function () {
return (this.assigningPolarMarkerStyle != null && this.zq) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
};
PolarBase.prototype.abm = function (a, b) {
this.qz();
var c = b.ca;
var d = b.b9;
var e = this.getEffectiveViewport1(b);
var f = this.wo(b);
this.y1 = new PolarAxisInfoCache(this.yy, this.yz, this.dp);
if (this.xl()) {
b.db.j(a.j, this.xn);
if (this.z1()) {
this.abc(b, a);
}
}
b.c4();
var g = this.yv(d, b.dd.g$n.an);
b.dd.g$l(a.o, g);
if (b.aa.count > 0) {
for (var h = 0; h < b.aa.count; h++) {
var i = b.aa._inner[h];
i.g$l(a.m._inner[h], g);
}
}
this.aa9(d, c, e, f, b);
};
PolarBase.prototype.ys = function (a, b) {
return this.yt(a, b);
};
PolarBase.prototype.yt = function (a, b) {
if (b < a || a < 0 || a > this.zo.count || b < 0 || b > this.zo.count) {
return null;
}
var c = new Array((b - a) + 1);
for (var d = a; d <= b; d++) {
var e = d;
c[d - a] = this.dp.item(d);
}
return c;
};
PolarBase.prototype.abc = function (a, b) {
var _this = this;
a.ck = true;
this.za.ay(this, this.z1(), runOn(this, this.ys));
var c = this.za.d;
var d = c != null;
var e = this.getEffectiveViewport1(a);
var f = this.dp == null ? 0 : this.dp.count;
this.y2.cw(function (g) {
if (g._visibility == 0) {
var h = g.ak;
var i = g.content;
if (i == null) {
i = new DataContext();
g.content = i;
}
if (d) {
_this.abg(h, f, a.t);
}
_this.za.ac(g, i);
}
});
};
PolarBase.prototype.abh = function (a, b, c) {
var d = this.by != 1;
var e = this.cq != 1;
var f = this.cp != 1;
this.za.a0(this.za.b, a, b, false);
this.za.ab(this.ic);
var g = this.za.ax;
var h = null;
var i = null;
var j = null;
var k = this.dp;
if (d && this.dc != null) {
h = this.dc.dn.getHighlightingInfo(this, k, g.z, g.y, false);
g.c = h;
}
if (e && this.dc != null) {
i = this.dc.dp.getHighlightingInfo(this, k, g.z, g.y, false);
if (i == null && this.bo != null) {
i = this.dc.dp.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, false);
}
g.d = i;
}
if (f && this.dc != null) {
j = this.dc.dm.getHighlightingInfo(this, k, g.z, g.y, false);
g.b = j;
}
g.h = c;
this.abk(g);
this.za.z(this, h, i, j, c, d, e, f, a < 0);
};
PolarBase.prototype.abg = function (a, b, c) {
var d = this.by != 1;
var e = this.cq != 1;
var f = this.cp != 1;
this.za.a0(this.za.d, a, b, true);
this.za.aa(this.ic);
var g = this.za.aw;
var h = null;
var i = null;
var j = null;
var k = this.dp;
var l = null;
var m = null;
var n = null;
if (d && this.dc != null) {
h = this.dc.dn.getHighlightingInfo(this, k, g.z, g.y, true);
if (this.dc.dn.isCrossContextHighlight(this)) {
l = this.dc.dn.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.c = h;
}
if (e && this.dc != null) {
i = this.dc.dp.getHighlightingInfo(this, k, g.z, g.y, true);
if (i == null && this.bo != null) {
i = this.dc.dp.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true);
}
if (this.dc.dp.isCrossContextHighlight(this)) {
m = this.dc.dp.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.d = i;
}
if (f && this.dc != null) {
j = this.dc.dm.getHighlightingInfo(this, k, g.z, g.y, true);
if (this.dc.dm.isCrossContextHighlight(this)) {
n = this.dc.dm.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.d = i;
}
g.h = c;
this.abj(g);
this.za.y(this, h, i, j, c, d, e, f, g.v, this.dc.dn.totalHighWaterMark, g.x, this.dc.dp.totalHighWaterMark, g.t, this.dc.dm.totalHighWaterMark);
};
PolarBase.prototype.abk = function (a) {
if (this.assigningPolarStyle != null && this.zr) {
this.assigningPolarStyle(this, a);
}
};
PolarBase.prototype.abj = function (a) {
if (this.assigningPolarMarkerStyle != null && this.zq) {
this.assigningPolarMarkerStyle(this, a);
}
};
PolarBase.prototype.aa9 = function (a, b, c, d, e) {
e.dg(a, b, c, d);
};
PolarBase.prototype.sl = function () {
_super.prototype.sl.call(this);
if (this.index < 0) {
return;
}
this.y2.dj();
};
PolarBase.prototype.rw = function (a, b) {
_super.prototype.rw.call(this, a, b);
if (!this.g1) {
this.cw.be(b);
return;
}
this.cw.be(b);
if (this.d7(this.cv)) {
return;
}
this.rx();
this.g1 = false;
};
PolarBase.prototype.rx = function () {
_super.prototype.rx.call(this);
var a = this.cv;
if (!this.gt) {
this.y8 = new PolarFrame();
this.abi(this.y8, a);
}
this.gt = false;
this.abm(this.y8, a);
};
PolarBase.prototype.rt = function (a, b, c, d, e) {
_super.prototype.rt.call(this, a, b, c, d, e);
var f = this.ba.a$j.item(d);
var g = f;
f.bd(c);
if (this.d7(g)) {
return;
}
if (this.y4 == null) {
this.y4 = new PolarFrame();
}
this.abi(this.y4, g);
this.abm(this.y4, g);
};
PolarBase.prototype.abl = function (a, b) {
var e_2, _a, e_3, _b;
var c = new List$1(Base.$, 0);
try {
for (var _c = __values(fromEnum(b.c)), _d = _c.next(); !_d.done; _d = _c.next()) {
var d = _d.value;
if (!a.containsKey(d)) {
c.add1(d);
}
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_d && !_d.done && (_a = _c.return))
_a.call(_c);
}
finally {
if (e_2)
throw e_2.error;
}
}
try {
for (var _e = __values(fromEnum(c)), _f = _e.next(); !_f.done; _f = _e.next()) {
var e = _f.value;
b.h(e);
}
}
catch (e_3_1) {
e_3 = { error: e_3_1 };
}
finally {
try {
if (_f && !_f.done && (_b = _e.return))
_b.call(_e);
}
finally {
if (e_3)
throw e_3.error;
}
}
};
PolarBase.prototype.yr = function (a, b, c) {
this.abd();
return this.y3.x.toArray();
};
PolarBase.prototype.z6 = function (a) {
var e_4, _a;
var b = new List$1(Number_$type, 0);
var c = this.dp;
try {
for (var _b = __values(fromEnum(this.y2.de.c)), _c = _b.next(); !_c.done; _c = _b.next()) {
var d = _c.value;
b.add(c.indexOf(d));
}
}
catch (e_4_1) {
e_4 = { error: e_4_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_4)
throw e_4.error;
}
}
return b;
};
PolarBase.prototype.acg = function (a) {
return { $type: Point_$type, x: this.zo.item(a), y: this.zp.item(a) };
};
PolarBase.prototype.p1 = function (a) {
_super.prototype.p1.call(this, a);
this.bc.exportTrendlineData(this, a, this.y2.dd.g$n);
};
PolarBase.prototype.getDataLegendSeriesContextAt = function (a, b) {
var c = { $type: Point_$type, x: a, y: b };
var d = this.ko(c);
var e = d == null ? NaN : this.iy(d, "RadiusMemberPath");
var f = d == null ? NaN : this.iy(d, "AngleMemberPath");
var g = new DataLegendSeriesValueInfo();
g.l = e;
g.a = 11;
g.r = this.aa6 != null ? this.aa6 : "Radius";
g.q = "Radius";
g.s = this.aa2 != null ? this.aa2 : "R:";
g.t = this.aa4 != null ? this.aa4 : "";
var h = new DataLegendSeriesValueInfo();
h.l = f;
h.a = 10;
h.r = this.aao != null ? this.aao : "Angle";
h.q = "Angle";
h.s = this.aak != null ? this.aak : "A:";
h.t = this.aam != null ? this.aam : "";
var i = new DataLegendSeriesContext();
i.e = ((function () {
var $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
$ret.add(g);
$ret.add(h);
return $ret;
})());
i.h = this.me();
return i;
};
PolarBase.prototype.ak = function (a, b) {
var c = new List$1(ChartSelection.$, 0);
this.p6(a, c, b);
return c.toArray();
};
PolarBase.prototype.p6 = function (a, b, c) {
var _this = this;
var d = this.cw.ca;
var e = this.cw.b9;
var f = this.getEffectiveViewport1(this.cw);
var g = this.dc.w1(this.wx, this.getEffectiveViewport(), d);
var h = new CollisionRect(0, this.dc.wy(a));
var i = this.yz.k5(e, d, f, g);
var _loop_2 = function (j) {
var k = this_2.yy.getScaledAngle(this_2.zo.item(j));
var l = this_2.yz.od(this_2.zp.item(j));
var m = this_2.y0.c(k, l, d, e, f, Math.cos);
var n = this_2.y0.d(k, l, d, e, f, Math.sin);
if (h.containsLocation(m, n)) {
if (c == 7 || c == 6) {
b.add(((function () {
var $ret = new ChartSelection();
$ret.series = _this;
return $ret;
})()));
return { value: void 0 };
}
else if (c == 2 || c == 1) {
b.add(((function () {
var $ret = new ChartSelection();
$ret.item = _this.dp.item(j);
return $ret;
})()));
}
else {
b.add(((function () {
var $ret = new ChartSelection();
$ret.item = _this.dp.item(j);
$ret.series = _this;
return $ret;
})()));
}
}
};
var this_2 = this;
for (var j = 0; j < this.dp.count; j++) {
var state_1 = _loop_2(j);
if (typeof state_1 === "object")
return state_1.value;
}
};
PolarBase.prototype.bd = function () {
return new PolarTrendLineManager();
};
PolarBase.$t = markType(PolarBase, 'PolarBase', MarkerSeries.$);
PolarBase.abn = DependencyProperty.i("ActualTrendLineBrush", Brush.$, PolarBase.$, new PropertyMetadata(2, null, function (a, b) { return a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue); }));
PolarBase.$$p = markDep(DependencyProperty, PropertyMetadata, PolarBase, 'raisePropertyChanged', ['AngleAxis:yy:abo', [NumericAngleAxis.$, null], 'AngleMemberAsLegendLabel:aak:abp', [2, null], 'AngleMemberAsLegendUnit:aam:abq', [2, null], 'AngleMemberPath:aao:abr', [2], 'ClipSeriesToBounds:zu:abs', [0, false], 'HighlightedAngleMemberPath:aar:abt', [2, null], 'HighlightedRadiusMemberPath:aat:abu', [2, null], 'IsCustomPolarMarkerStyleAllowed:zw:abv', [0, false], 'IsCustomPolarStyleAllowed:zx:abw', [0, false], 'ItemSearchMode:ze:abx', [ScatterItemSearchMode_$type, enumGetBox(ScatterItemSearchMode_$type, 0)], 'ItemSearchThreshold:aad:aby', [1, 10000], 'MaximumMarkers:aae:abz', [1, 400], 'RadiusAxis:yz:ab0', [NumericRadiusAxis.$, null], 'RadiusMemberAsLegendLabel:aa2:ab1', [2, null], 'RadiusMemberAsLegendUnit:aa4:ab2', [2, null], 'RadiusMemberPath:aa6:ab3', [2], 'UseCartesianInterpolation:z4:acb', [0, true], 'TrendLineType:zg:ab9', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:aac:ab8', [1, 1.5], 'TrendLinePeriod:aaf:ab7', [1, 7], 'TrendLineZIndex:aag:aca', [1, 1], 'TrendLineBrush:acd:ab4', [Brush.$, null], 'TrendLineDashArray:ace:ab5', [DoubleCollection.$], 'TrendLineDashCap:acf:ab6', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]);
return PolarBase;
}(MarkerSeries));
export { PolarBase };
/**
* @hidden
*/
var PolarSeriesRenderManager = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(PolarSeriesRenderManager, _super);
function PolarSeriesRenderManager() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.aw = null;
_this.ax = null;
return _this;
}
PolarSeriesRenderManager.prototype.c = function () {
this.aw = new AssigningPolarMarkerStyleEventArgs();
return this.aw;
};
PolarSeriesRenderManager.prototype.a = function () {
this.ax = new AssigningPolarStyleEventArgs();
return this.ax;
};
PolarSeriesRenderManager.prototype.ay = function (a, b, c) {
this.w(a, b, c);
};
PolarSeriesRenderManager.prototype.az = function (a, b, c) {
this.x(a, b, c);
};
PolarSeriesRenderManager.prototype.a0 = function (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;