UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

1,486 lines 76.8 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 { __extends, __values } from "tslib"; import { AxisLabelPanelBase } from "./AxisLabelPanelBase"; import { Boolean_$type, typeCast, markType, Number_$type, enumGetBox, Point_$type, typeGetValue, fromEnum, runOn, markDep } from "igniteui-react-core"; import { AxisLabelPanelBaseView } from "./AxisLabelPanelBaseView"; import { Rect } from "igniteui-react-core"; import { Extensions } from "igniteui-react-core"; import { Axis } from "./Axis"; import { List$1 } from "igniteui-react-core"; import { AxisAngleLabelMode_$type } from "./AxisAngleLabelMode"; import { LabelPosition } from "./LabelPosition"; import { XamDataChart } from "./XamDataChart"; import { CategoryAxisBase } from "./CategoryAxisBase"; import { IAngleScaler_$type } from "./IAngleScaler"; import { DependencyProperty } from "igniteui-react-core"; import { CategoryAxisRenderer } from "./CategoryAxisRenderer"; import { PolarAxisRenderingManager } from "./PolarAxisRenderingManager"; import { AxisLabelManager } from "./AxisLabelManager"; import { ViewportUtils } from "./ViewportUtils"; import { GeometryUtil } from "igniteui-react-core"; import { RadialAxisRenderingParameters } from "./RadialAxisRenderingParameters"; import { CategoryTickmarkValues } from "./CategoryTickmarkValues"; import { SeriesViewer } from "./SeriesViewer"; import { ScalerParams } from "./ScalerParams"; import { AxisRangeChangedEventArgs } from "./AxisRangeChangedEventArgs"; import { LineGeometry } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; import { RangeInfo } from "./RangeInfo"; import { isNaN_, isInfinity } from "igniteui-react-core"; import { NumericAxisBase } from "./NumericAxisBase"; import { LogarithmicTickmarkValues } from "./LogarithmicTickmarkValues"; import { PolarAxisRenderingParameters } from "./PolarAxisRenderingParameters"; import { MathUtil } from "igniteui-react-core"; import { RadialAxisLabelPanel } from "./RadialAxisLabelPanel"; import { LinearTickmarkValues } from "./LinearTickmarkValues"; import { IPolarRadialRenderingParameters_$type } from "./IPolarRadialRenderingParameters"; import { PathGeometry } from "igniteui-react-core"; import { PathFigure } from "igniteui-react-core"; import { ArcSegment } from "igniteui-react-core"; import { Size } from "igniteui-react-core"; import { CategoryAxisBaseView } from "./CategoryAxisBaseView"; import { AxisDefaults } from "./AxisDefaults"; import { NumericAxisBaseView } from "./NumericAxisBaseView"; /** * @hidden */ var AngleAxisLabelPanel = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AngleAxisLabelPanel, _super); function AngleAxisLabelPanel() { var _this = _super.call(this) || this; _this.df = false; _this.dn = null; _this.dk = 0; _this.dh = 0; _this.dj = 0; _this.di = 0; _this.dg = 0; return _this; } AngleAxisLabelPanel.prototype.af = function () { return new AngleAxisLabelPanelView(this); }; AngleAxisLabelPanel.prototype.cl = function (a) { _super.prototype.cl.call(this, a); this.de = a; }; AngleAxisLabelPanel.prototype.aw = function (a, b) { if (!Extensions.b(b)) { return false; } if (this.ae == null || this.ae.o6.isEmpty) { return _super.prototype.aw.call(this, a, b); } return true; }; AngleAxisLabelPanel.prototype.ba = function () { var a = new List$1(Rect.$, 0); var b = new List$1(Boolean_$type, 0); if (this.bg.count != this.bf.count) { return a; } var c = 1; if (typeCast(CategoryAngleAxis.$, this.ae) !== null) { c = this.ae.re(); } else if (typeCast(NumericAngleAxis.$, this.ae) !== null) { c = this.ae.tb(); } if (c == 2) { this.de.a0(a, b); } else { this.de.a1(a, b); } var d = false; this.aq = this.ap(a, b); if (!this.ae.db()) { d = true; switch (c) { case 1: this.dq(); break; case 2: this.dp(); break; } } else { d = true; this.de.ab(); } if (d) { for (var e = 0; e < a.count; e++) { var f = this.bg._inner[e]; var g = this.bf._inner[e]; var h = a._inner[e]; var i = this.dn(g.h, h.width, h.height); var j = i.x - this.bp(f) / 2; var k = i.y - this.bo(f) / 2; h.x = j; h.y = k; a._inner[e] = h; } } return a; }; AngleAxisLabelPanel.prototype.dq = function () { this.bm = this.dk / 2; this.bm = this.bm + this.dl(); }; AngleAxisLabelPanel.prototype.dp = function () { this.bm = 5; this.bm = this.bm + this.dm(); }; AngleAxisLabelPanel.prototype.dm = function () { var a; var b; b = this.ae; a = null; if (b != null) { a = typeCast(XamDataChart.$, b.b7); } if (a == null || b == null) { return 0; } var c = new List$1(Axis.$, 0); for (var d = 0; d < a.zq.count; d++) { var e = a.zq._inner[d]; if ((typeCast(NumericAngleAxis.$, e) !== null || typeCast(CategoryAngleAxis.$, e) !== null) && typeCast(AngleAxisLabelPanel.$, e.a1) !== null && e.a1.bg.count > 0 && (!e.db()) && !e.c2() && (e.an == null || this.ae.an == null || e.an.tg == b.an.tg)) { c.add(e); } } var f = c.indexOf(b); if (f == -1) { return 0; } var g = 0; if (f > 0) { if (typeCast(CategoryAngleAxis.$, c._inner[f - 1]) !== null) { var h = c._inner[f - 1]; if (h.rd == 2) { g += h.a1.dg; } else { g += c._inner[f - 1].a1.bm; } } else if (typeCast(NumericAngleAxis.$, c._inner[f - 1]) !== null) { var i = c._inner[f - 1]; if (i.rd == 2) { g += i.a1.dg; } else { g += c._inner[f - 1].a1.bm; } } } return g; }; AngleAxisLabelPanel.prototype.dl = function () { var a; var b; b = this.ae; a = null; if (b != null) { a = typeCast(XamDataChart.$, b.b7); } if (a == null || b == null) { return 0; } var c = new List$1(Axis.$, 0); for (var d = 0; d < a.zq.count; d++) { var e = a.zq._inner[d]; if ((typeCast(NumericAngleAxis.$, e) !== null || typeCast(CategoryAngleAxis.$, e) !== null) && typeCast(AngleAxisLabelPanel.$, e.a1) !== null && e.a1.bg.count > 0 && (!e.db()) && !e.c2() && (e.an == null || this.ae.an == null || e.an.tg == b.an.tg)) { c.add(e); } } var f = c.indexOf(b); if (f == -1) { return 0; } var g = 0; var h = 5; if (f == 0) { g += h; } else { if (typeCast(CategoryAngleAxis.$, c._inner[f - 1]) !== null) { var i = c._inner[f - 1]; if (i.rd == 2) { g += i.a1.dg; } else { g += c._inner[f - 1].a1.bm; } } else if (typeCast(NumericAngleAxis.$, c._inner[f - 1]) !== null) { var j = c._inner[f - 1]; if (j.ta == 2) { g += j.a1.dg; } else { g += c._inner[f - 1].a1.bm; } } g += c._inner[f].a1.bm * 2 + h; } return g; }; AngleAxisLabelPanel.prototype.aj = function () { return 4; }; AngleAxisLabelPanel.prototype.a3 = function (a) { return a == 4 || a == 5; }; AngleAxisLabelPanel.$t = markType(AngleAxisLabelPanel, 'AngleAxisLabelPanel', AxisLabelPanelBase.$); return AngleAxisLabelPanel; }(AxisLabelPanelBase)); export { AngleAxisLabelPanel }; /** * @hidden */ var CategoryAngleAxis = /** @class */ /*@__PURE__*/ (function (_super) { __extends(CategoryAngleAxis, _super); function CategoryAngleAxis() { var _this = _super.call(this) || this; _this.rl = null; _this.ri = null; _this.rm = false; _this.rt = NaN; _this.rj = null; _this.ru = 0; _this.rr = 0; _this.rs = 0; _this.sa = 1; _this.ab = CategoryAngleAxis.$; _this.ri = _this.rh(); _this.rl = new PolarAxisRenderingManager(); return _this; } CategoryAngleAxis.prototype.bo = function () { return new CategoryAngleAxisView(this); }; CategoryAngleAxis.prototype.k6 = function (a) { _super.prototype.k6.call(this, a); this.rg = a; }; CategoryAngleAxis.prototype.al = function () { return new CategoryAngleAxis(); }; CategoryAngleAxis.prototype.km = function (a) { _super.prototype.km.call(this, a); this.kp(a, "ActualInterval"); this.kp(a, "ActualMinorInterval"); this.kp(a, "StartAngleOffset"); this.kp(a, "LabelMode"); }; CategoryAngleAxis.prototype.kp = function (a, b) { _super.prototype.kp.call(this, a, b); var c = typeCast(CategoryAngleAxis.$, a); if (c == null) { return; } var d = this; if (b == "ActualMinorInterval") { c.r7 = Axis.gs(d.ry, d.rw); } if (b == "ActualInterval") { c.r6 = Axis.gs(d.rx, d.rv); } if (b == "StartAngleOffset") { c.r6 = Axis.gs(d.rz, d.r9); } if (b == "LabelMode") { c.rd = d.rc != 0 ? d.rc : d.rd; } }; CategoryAngleAxis.prototype.get_dc = function () { return true; }; CategoryAngleAxis.prototype.kw = function (a) { _super.prototype.kw.call(this, a); switch (a) { case CategoryAngleAxis.$$p[0]: case CategoryAngleAxis.$$p[2]: this.kr(a); break; case CategoryAngleAxis.$$p[1]: case CategoryAngleAxis.$$p[3]: this.ks(a); break; } }; CategoryAngleAxis.prototype.a0 = function () { var _this = this; var a = new AngleAxisLabelPanel(); a.dn = function (b, c, d) { var e = _this.b7 != null ? _this.b7.yr : Rect.empty; var f = !e.isEmpty ? _this.o6 : Rect.empty; var g = _this.o1(); switch (_this.rd) { case 2: return _this.sz(b, c, d, { $type: Point_$type, x: 0.5, y: 0.5 }, e, f, g, _this.a1.bm); case 0: case 1: default: return _this.s0(b, { $type: Point_$type, x: 0.5, y: 0.5 }, e, f, g, _this.a1.bm); } }; return a; }; CategoryAngleAxis.prototype.rp = function (a) { return false; }; CategoryAngleAxis.prototype.sj = function () { return null; }; CategoryAngleAxis.prototype.r8 = function (a) { return Math.round(a * Math.pow(10, 10)) / Math.pow(10, 10); }; CategoryAngleAxis.prototype.rh = function () { var _this = this; var a = ((function () { var $ret = new AxisLabelManager(); $ret.a = _this; $ret.f = _this.er; $ret.e = _this.eq; $ret.b = _this.a1; return $ret; })()); if (this.a4 != null) { this.a4.registerAxis(this); } var b = new CategoryAxisRenderer(a); b.u = function () { var c = _this.bp.ba(); var d = _this.bp.bd(); var e = _this.bp.bb(); var f = _this.bp.bc(); _this.ma(); _this.kk(c); _this.kk(d); _this.kk(e); _this.kk(f); }; b.o = function (c, d) { return !d.isEmpty && !c.isEmpty && _this.rk != null; }; b.d = function (c, d, e, f) { return _this.rf(c, d, e, f); }; b.v = function () { if (!_this.rm) { _this.rm = true; _this.rk.ed(); _this.rm = false; } }; b.g = function (c, d) { var e = typeGetValue(c); if (e == _this.qa - 1) { if (_this.ds) { if (_this.rp(e)) { return _this.sj(); } } } if (e > _this.qa - 1) { e -= _this.qa; } if (_this.rq(e)) { return null; } var f = _this.pm.item(e); return _this.hw(f); }; b.b.c = function (c) { var e_1, _a; if ((_this.a4 == null || _this.a4.visibility == 0) && _this.rk != null && _this.rt != c) { var d = typeCast(XamDataChart.$, _this.b7); if (d == null) { return; } _this.rt = c; _this.a1.bl = c; d.pr(); try { for (var _b = __values(fromEnum(d.zq)), _c = _b.next(); !_c.done; _c = _b.next()) { var e = _c.value; if (e != _this && typeCast(AngleAxisLabelPanel.$, e.a1) !== null) { e.bp.ao(); } } } 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; } } } }; b.k = function (c, d, e) { var f = typeCast(RadialAxisRenderingParameters.$, c); _this.rl.o(d, e, c.aa, c.z, c.ab, f.minLength, f.maxLength, f.center); }; b.l = function (c, d, e, f) { var g = typeCast(RadialAxisRenderingParameters.$, c); _this.rl.p(d, e, f, g.aa, g.z, c.ab, g.minLength, g.maxLength, g.center); }; b.m = function (c, d) { return _this.getScaledAngle(d); }; b.q = function (c, d) { if (_this.r8(d - _this.ru) < 0) { return false; } if (_this.r8(d - _this.ru - (2 * Math.PI)) > 0) { return false; } return true; }; b.j = function (c) { var d = typeCast(RadialAxisRenderingParameters.$, c); if (d.e == d.k._inner[0]) { _this.rl.k(c.u, c.n, c.aa, c.z, c.ab, d.center, d.minAngle, d.maxAngle); } }; b.e = function (c) { c.n = _this.r0(); c.r = c.n; }; b.p = function (c, d, e) { var f = typeCast(RadialAxisRenderingParameters.$, c); if (e) { return false; } var g = _this.s0(d, f.center, c.ab, c.aa, c.z, 0); if (g.x < c.aa.right && g.x >= c.aa.left && g.y < c.aa.bottom && g.y >= c.aa.top) { return true; } return false; }; b.a = function (c, d, e, f) { var g = c.z; var h = new ScalerParams(0, c.ab, c.aa, _this.dn, g); var i = d; if (_this.categoryMode != 0) { var j = (e * f) + 1; j = Math.min(j, _this.qa); var k = _this.f6(j, h); i = (d + k) / 2; } return i; }; b.f = runOn(this, this.getGroupCenter); b.i = runOn(this, this.r5); return b; }; CategoryAngleAxis.prototype.rq = function (a) { return false; }; CategoryAngleAxis.prototype.s0 = function (a, b, c, d, e, f) { var g = this.r0(); var h = ViewportUtils.a(f, c, d, e); if (this.a4 != null && (this.a4.c == 5 || this.a4.c == 1)) { h *= -1; } var i = b.x + (g + h) * Math.cos(a); var j = b.y + (g + h) * Math.sin(a); i = ViewportUtils.e(i, c, d, e); j = ViewportUtils.i(j, c, d, e); return { $type: Point_$type, x: i, y: j }; }; CategoryAngleAxis.prototype.sz = function (a, b, c, d, e, f, g, h) { if (!isNaN_(b) && !isNaN_(c)) { var i = this.r0(); var j = b / f.width; var k = c / f.width; var l = ViewportUtils.a(h, e, f, g); var m = GeometryUtil.i(i, a, j, k); var n = d.x + (m + l) * Math.cos(a); var o = d.y + (m + l) * Math.sin(a); n = ViewportUtils.e(n, e, f, g); o = ViewportUtils.i(o, e, f, g); return { $type: Point_$type, x: n, y: o }; } else { return this.s0(a, d, e, f, g, h); } }; CategoryAngleAxis.prototype.r0 = function () { if (this.rk == null) { return 0; } if (!this.c2()) { return this.rk.tl(); } else { return this.rk.tm((this.hr)); } }; CategoryAngleAxis.prototype.rf = function (a, b, c, d) { if (this.pm == null) { return null; } var e = new RadialAxisRenderingParameters(); var f = this.qb - 1; var g = this.bp.ba(); var h = this.bp.bd(); var i = this.bp.bb(); var j = this.bp.bc(); e.u = g; e.x = h; e.v = i; e.w = j; e.l = f; e.m = 0; e.h = false; e.aa = a; e.z = c; e.y = d; e.ab = b; e.g = this.ro(); e.p = this.r6; e.o = this.gm(); e.s = this.sc(); e.q = this.r7; e.t = this.hx; var k = this.rl.h(b, a, c); var l = this.rl.i(b, a, c); var m = 0.5 * this.rk.tg; var n = 0.5 * this.rk.tf; var o = k; var p = l; var q = this.rk.tl(); if (isNaN_(q) || isInfinity(q)) { return null; } if (p >= m) { p = q; } if (o < n) { o = n; } var r = a.width; this.rl.m(b, a, c, e, 0, this.qb, this.dn, runOn(this, this.getUnscaledAngle), r); var s = { $type: Point_$type, x: 0.5, y: 0.5 }; e.center = s; e.maxLength = p; e.minLength = o; e.effectiveMaximum = q; e.af = this.qb; e.ac = this.categoryMode; e.ae = true; e.ad = this.dn; e.ag = this.qc; e.f = new CategoryTickmarkValues(); e.j = this.ea; return e; }; CategoryAngleAxis.prototype.sc = function () { return -1; }; CategoryAngleAxis.prototype.getMinMaxAngle = function (a, b, c, d, e) { var f = this.rl.n(a, b, c, d, e); d = f.p3; e = f.p4; return { p3: d, p4: e }; }; CategoryAngleAxis.prototype.ac = function () { _super.prototype.ac.call(this); this.ly(false); }; Object.defineProperty(CategoryAngleAxis.prototype, "rk", { get: function () { if (this.rj != null) { return this.rj; } var a = typeCast(XamDataChart.$, this.b7); if (a != null) { for (var b = 0; b < a.zq.count; b++) { if (typeCast(NumericRadiusAxis.$, a.zq._inner[b]) !== null) { return a.zq._inner[b]; } } } return this.rj; }, set: function (a) { this.rj = a; }, enumerable: false, configurable: true }); CategoryAngleAxis.prototype.ap = function () { return this.rk; }; CategoryAngleAxis.prototype.re = function () { if (this.rd == 0) { return 1; } else { return this.rd; } }; CategoryAngleAxis.prototype.getCategorySize = function (a, b, c) { return 2 * Math.PI / this.qa; }; CategoryAngleAxis.prototype.get_rn = function () { return false; }; Object.defineProperty(CategoryAngleAxis.prototype, "rn", { get: function () { return this.get_rn(); }, enumerable: false, configurable: true }); CategoryAngleAxis.prototype.r2 = function (a, b, c, d) { return this.pz(b, c, d); }; CategoryAngleAxis.prototype.pz = function (a, b, c) { var d = this.p6(a, b, c); var e = 0; if (!isNaN_(this.p5)) { e = Math.min(this.p5, 1); } var f = 1 - 0.5 * d; return this.getCategorySize(a, b, c) * f / (this.qc - (this.qc - 1) * e); }; CategoryAngleAxis.prototype.r1 = function (a, b, c, d, e) { return this.getGroupCenter(b, c, d, e); }; CategoryAngleAxis.prototype.getGroupCenter = function (a, b, c, d) { var e = 0.5; if (this.qc > 1) { var f = this.p6(b, c, d); var g = 0; if (!isNaN_(this.p5)) { g = Math.min(this.p5, 1); } var h = 1 - 0.5 * f; var i = h / (this.qc - (this.qc - 1) * g); var j = (h - i) / (this.qc - 1); e = 0.25 * f + 0.5 * i + a * j; } return this.getCategorySize(b, c, d) * e; }; CategoryAngleAxis.prototype.r5 = function (a) { var b = 0.5; if (this.qc > 1) { var c = this.p6(Rect.empty, Rect.empty, Rect.empty); var d = 0; if (!isNaN_(this.p5)) { d = Math.min(this.p5, 1); } var e = 1 - 0.5 * c; var f = e / (this.qc - (this.qc - 1) * d); var g = (e - f) / (this.qc - 1); b = 0.25 * c + 0.5 * f + a * g; } return b; }; CategoryAngleAxis.prototype.lz = function (a) { _super.prototype.lz.call(this, a); var b = this.b7 != null ? this.b7.yr : Rect.empty; var c = !b.isEmpty ? this.o6 : Rect.empty; var d = this.o1(); var e = this.o0(); var f = this.ri.c(a, c, b, d, e); if (f != null) { this.rv = f.f.m; this.rw = f.f.l; } }; CategoryAngleAxis.prototype.r4 = function (a, b, c) { var d; var e; var f = this.rl.n(c, a, b, d, e); d = f.p3; e = f.p4; if (d == 0) { if (this.dn) { return this.qa; } else { return 0; } } var g = this.getUnscaledAngle(d); if (g < 0 || g > this.qa) { g = this.getUnscaledAngle(d + Math.PI * 2); } return g; }; CategoryAngleAxis.prototype.r3 = function (a, b, c) { var d; var e; var f = this.rl.n(c, a, b, d, e); d = f.p3; e = f.p4; if (e > Math.PI * 2) { e = e - Math.PI * 2; } if (e == Math.PI * 2) { if (this.dn) { return 0; } else { return this.qa; } } var g = this.getUnscaledAngle(e); if (g < 0 || g > this.qa) { g = this.getUnscaledAngle(e + Math.PI * 2); } return g; }; CategoryAngleAxis.prototype.getScaledAngle = function (a) { var b = this.qa; var c = b >= 2 ? (a) / (b) : b == 1 ? 0.5 : NaN; if (this.dp) { c = 1 - c; } return (c * 2 * Math.PI) + this.ru; }; CategoryAngleAxis.prototype.getUnscaledAngle = function (a) { if (a < this.ru) { a += 2 * Math.PI; } var b = (a - this.ru) / (2 * Math.PI); if (this.dn) { b = 1 - b; } return b * (this.qa); }; CategoryAngleAxis.prototype.f6 = function (a, b) { return this.getScaledAngle(a); }; CategoryAngleAxis.prototype.f9 = function (a, b) { return this.getUnscaledAngle(a); }; CategoryAngleAxis.prototype.fq = function (a) { var b = { $type: Point_$type, x: 0.5, y: 0.5 }; var c = Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2)); var d = Math.acos((a.x - b.x) / c); if ((a.y - b.y) < 0) { d = (2 * Math.PI) - d; } return d; }; CategoryAngleAxis.prototype.la = function (a, b, c, d) { var e_2, _a, e_3, _b, e_4, _c; _super.prototype.la.call(this, a, b, c, d); var e = typeCast(XamDataChart.$, this.b7); switch (b) { case "CrossingAxis": var f = typeCast(NumericRadiusAxis.$, d); this.sq(f); if (f != null) { f.tv(this); } this.d0 = true; this.ly(false); break; case CategoryAngleAxis.$$p[5]: this.ru = this.r9; while (this.ru < 0) { this.ru += 360; } while (this.ru >= 360) { this.ru -= 360; } this.ru = (this.ru * Math.PI) / 180; this.d0 = true; this.ly(false); try { for (var _d = __values(fromEnum(this.es)), _e = _d.next(); !_e.done; _e = _d.next()) { var g = _e.value; g.r8(false); g.q0(); } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_e && !_e.done && (_a = _d.return)) _a.call(_d); } finally { if (e_2) throw e_2.error; } } break; case "Label": case CategoryAngleAxis.$$p[4]: if (e != null) { try { for (var _f = __values(fromEnum(e.zq)), _g = _f.next(); !_g.done; _g = _f.next()) { var h = _g.value; h.d0 = true; h.lx(); } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_g && !_g.done && (_b = _f.return)) _b.call(_f); } finally { if (e_3) throw e_3.error; } } } break; case "CrossingValue": if (e != null) { try { for (var _h = __values(fromEnum(e.zq)), _j = _h.next(); !_j.done; _j = _h.next()) { var i = _j.value; if (typeCast(NumericAngleAxis.$, i) !== null || typeCast(CategoryAngleAxis.$, i) !== null) { i.d0 = true; i.lx(); } } } catch (e_4_1) { e_4 = { error: e_4_1 }; } finally { try { if (_j && !_j.done && (_c = _h.return)) _c.call(_h); } finally { if (e_4) throw e_4.error; } } } break; case "LabelSettings": this.ri = this.rh(); this.so(); this.d0 = true; this.ly(false); break; case CategoryAngleAxis.$$p[0]: case CategoryAngleAxis.$$p[2]: case CategoryAngleAxis.$$p[1]: case CategoryAngleAxis.$$p[3]: this.kw(b); break; } }; CategoryAngleAxis.prototype.so = function () { this.rt = NaN; }; CategoryAngleAxis.prototype.sq = function (a) { this.rk = a; }; Object.defineProperty(CategoryAngleAxis.prototype, "r6", { get: function () { return this.c(CategoryAngleAxis.sv); }, set: function (a) { this.h(CategoryAngleAxis.sv, a); }, enumerable: false, configurable: true }); Object.defineProperty(CategoryAngleAxis.prototype, "rv", { get: function () { return this.rr; }, set: function (a) { if (this.rv != a) { var b = this.rr; this.rr = a; this.ls("ActualInterval", b, this.rv); } }, enumerable: false, configurable: true }); CategoryAngleAxis.prototype.gi = function () { return this.rv; }; Object.defineProperty(CategoryAngleAxis.prototype, "r7", { get: function () { return this.c(CategoryAngleAxis.sx); }, set: function (a) { this.h(CategoryAngleAxis.sx, a); }, enumerable: false, configurable: true }); Object.defineProperty(CategoryAngleAxis.prototype, "rw", { get: function () { return this.rs; }, set: function (a) { if (this.rw != a) { var b = this.rs; this.rs = a; this.ls("ActualMinorInterval", b, this.rw); } }, enumerable: false, configurable: true }); CategoryAngleAxis.prototype.ro = function () { return !isNaN_(this.r6); }; CategoryAngleAxis.prototype.get_bm = function () { return 2; }; Object.defineProperty(CategoryAngleAxis.prototype, "bm", { get: function () { return this.get_bm(); }, enumerable: false, configurable: true }); CategoryAngleAxis.prototype.ef = function () { if (this.d0 && this.eg) { this.b1 = this.b0(); } if (this.pm == null) { return false; } var a = this.pm.count; if (a != this.sb) { var b = new AxisRangeChangedEventArgs(0, 1, 1, this.sb, a); this.sb = a; this.lt(b); return true; } return false; }; Object.defineProperty(CategoryAngleAxis.prototype, "sb", { get: function () { return this.sa; }, set: function (a) { this.sa = a; }, enumerable: false, configurable: true }); CategoryAngleAxis.prototype.ov = function (a, b, c, d, e) { var f = typeCast(RadialAxisRenderingParameters.$, this.ri.d(c, b, d, e)); if (f == null) { return null; } var g = Math.cos(a); var h = Math.sin(a); var i = f.center.x + g * f.minLength; var j = f.center.y + h * f.minLength; var k = f.center.x + g * f.maxLength; var l = f.center.y + h * f.maxLength; i = ViewportUtils.e(i, b, c, d); j = ViewportUtils.i(j, b, c, d); k = ViewportUtils.e(k, b, c, d); l = ViewportUtils.i(l, b, c, d); var m = new LineGeometry(); m.d = { $type: Point_$type, x: i, y: j }; m.c = { $type: Point_$type, x: k, y: l }; return m; }; Object.defineProperty(CategoryAngleAxis.prototype, "isVertical", { get: function () { return this.dy; }, enumerable: false, configurable: true }); CategoryAngleAxis.prototype.j$d = function (a, b) { return this.f9.apply(this, arguments); }; CategoryAngleAxis.prototype.j$c = function (a, b) { return this.f6.apply(this, arguments); }; CategoryAngleAxis.prototype.j$e = function (a, b, c, d, e) { this.k0.apply(this, arguments); }; CategoryAngleAxis.prototype.j$f = function (a, b, c, d) { this.k1.apply(this, arguments); }; CategoryAngleAxis.prototype.j$g = function (a, b, c, d) { this.k2.apply(this, arguments); }; Object.defineProperty(CategoryAngleAxis.prototype, "j$b", { get: function () { return this.dn; }, enumerable: false, configurable: true }); CategoryAngleAxis.prototype.j$a = function () { return this.ag.apply(this, arguments); }; CategoryAngleAxis.$t = markType(CategoryAngleAxis, 'CategoryAngleAxis', CategoryAxisBase.$, [IAngleScaler_$type]); CategoryAngleAxis.sv = DependencyProperty.i("Interval", Number_$type, CategoryAngleAxis.$, new PropertyMetadata(2, NaN, function (a, b) { a.ls("Interval", b.oldValue, b.newValue); a.ly(false); })); CategoryAngleAxis.sx = DependencyProperty.i("MinorInterval", Number_$type, CategoryAngleAxis.$, new PropertyMetadata(2, NaN, function (a, b) { (typeCast(CategoryAngleAxis.$, a)).ls("MinorInterval", b.oldValue, b.newValue); (typeCast(CategoryAngleAxis.$, a)).ly(false); })); CategoryAngleAxis.$$p = markDep(DependencyProperty, PropertyMetadata, CategoryAngleAxis, 'ls', ['CompanionAxisInterval:rx:sr', [1, NaN], 'CompanionAxisLabelMode:rc:ss', [AxisAngleLabelMode_$type, enumGetBox(AxisAngleLabelMode_$type, 0)], 'CompanionAxisMinorInterval:ry:st', [1, NaN], 'CompanionAxisStartAngleOffset:rz:su', [1, NaN], 'LabelMode:rd:sw', [AxisAngleLabelMode_$type, enumGetBox(AxisAngleLabelMode_$type, 0)], 'StartAngleOffset:r9:sy', [1, 0]]); return CategoryAngleAxis; }(CategoryAxisBase)); export { CategoryAngleAxis }; /** * @hidden */ var NumericAngleAxis = /** @class */ /*@__PURE__*/ (function (_super) { __extends(NumericAngleAxis, _super); function NumericAngleAxis() { var _this = _super.call(this) || this; _this.tf = null; _this.tg = false; _this.th = NaN; _this.ti = 0; _this.td = null; _this.ab = NumericAngleAxis.$; _this.tf = new PolarAxisRenderingManager(); _this.pw = _this.pu(); return _this; } NumericAngleAxis.prototype.bo = function () { return new NumericAngleAxisView(this); }; NumericAngleAxis.prototype.k6 = function (a) { _super.prototype.k6.call(this, a); this.tc = a; }; NumericAngleAxis.prototype.al = function () { return new NumericAngleAxis(); }; NumericAngleAxis.prototype.km = function (a) { _super.prototype.km.call(this, a); this.kp(a, "LabelMode"); this.kp(a, "StartAngleOffset"); }; NumericAngleAxis.prototype.kp = function (a, b) { _super.prototype.kp.call(this, a, b); var c = typeCast(NumericAngleAxis.$, a); if (c == null) { return; } var d = this; if (b == "StartAngleOffset") { c.q5 = Axis.gs(d.tj, d.tn); } if (b == "LabelMode") { c.ta = d.s9 != 0 ? d.s9 : d.ta; } }; NumericAngleAxis.prototype.get_dc = function () { return true; }; NumericAngleAxis.prototype.a0 = function () { var _this = this; var a = new AngleAxisLabelPanel(); a.dn = function (b, c, d) { var e = _this.b7 != null ? _this.b7.yr : Rect.empty; var f = !e.isEmpty ? _this.o6 : Rect.empty; var g = _this.o1(); return _this.tz(b, { $type: Point_$type, x: 0.5, y: 0.5 }, e, f, g, _this.a1.bm); }; return a; }; NumericAngleAxis.prototype.tk = function () { if (this.te == null) { return 0; } if (!this.c2()) { return this.te.tl(); } else { return this.te.tm((this.hr)); } }; NumericAngleAxis.prototype.tm = function (a) { return Math.round(a * Math.pow(10, 10)) / Math.pow(10, 10); }; NumericAngleAxis.prototype.pu = function () { var _this = this; var a = _super.prototype.pu.call(this); a.b.c = function (b) { var e_5, _a; if ((_this.a4 == null || _this.a4.visibility == 0) && _this.te != null && _this.th != b) { var c = typeCast(XamDataChart.$, _this.b7); if (c == null) { return; } _this.th = b; _this.a1.bl = b; c.pr(); try { for (var _b = __values(fromEnum(c.zq)), _c = _b.next(); !_c.done; _c = _b.next()) { var d = _c.value; if (d != _this && typeCast(AngleAxisLabelPanel.$, d.a1) !== null) { d.bp.ao(); } } } catch (e_5_1) { e_5 = { error: e_5_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_5) throw e_5.error; } } } }; a.e = function (b) { b.n = _this.tk(); b.r = b.n; }; a.j = function (b) { var c = typeCast(PolarAxisRenderingParameters.$, b); if (c.e == c.k._inner[0]) { _this.tf.k(b.u, b.n, b.aa, b.z, b.ab, c.center, c.minAngle, c.maxAngle); } }; a.k = function (b, c, d) { var e = typeCast(PolarAxisRenderingParameters.$, b); _this.tf.o(c, d, b.aa, b.z, b.ab, e.minLength, e.maxLength, e.center); }; a.l = function (b, c, d, e) { var f = typeCast(PolarAxisRenderingParameters.$, b); _this.tf.p(c, d, e, f.aa, f.z, b.ab, f.minLength, f.maxLength, f.center); }; a.d = function (b, c, d, e) { var f = typeCast(PolarAxisRenderingParameters.$, _this.px(b, c, d, e)); return f; }; a.v = function () { if (!_this.tg) { _this.tg = true; _this.te.ed(); _this.tg = false; } }; a.m = function (b, c) { return _this.getScaledAngle(c); }; a.o = function (b, c) { return !c.isEmpty && !b.isEmpty && _this.te != null; }; a.q = function (b, c) { if (_this.tm(c - _this.ti) < 0) { return false; } if (_this.tm(c - _this.ti - (2 * Math.PI)) > 0) { return false; } return true; }; a.p = function (b, c, d) { var e = typeCast(PolarAxisRenderingParameters.$, b); var f = _this.tz(_this.getScaledAngle(e.l), e.center, b.ab, b.aa, b.z, 0); var g = _this.tz(c, e.center, b.ab, b.aa, b.z, 0); if (d && MathUtil.h(f.x - g.x, f.y - g.y) < 2) { return false; } if (g.x < b.aa.right && g.x >= b.aa.left && g.y < b.aa.bottom && g.y >= b.aa.top) { return true; } return false; }; a.r = function (b, c, d, e) { if (c < b.m && typeCast(LogarithmicTickmarkValues.$, b.f) !== null) { return b.m; } else if (c > b.l && (typeCast(LogarithmicTickmarkValues.$, b.f) !== null || b.h)) { return b.l; } return c; }; return a; }; NumericAngleAxis.prototype.tz = function (a, b, c, d, e, f) { var g = this.tk(); var h = ViewportUtils.a(f, c, d, e); if (this.a4 != null && (this.a4.c == 5 || this.a4.c == 1)) { h *= -1; } var i = b.x + (g + h) * Math.cos(a); var j = b.y + (g + h) * Math.sin(a); i = ViewportUtils.e(i, c, d, e); j = ViewportUtils.i(j, c, d, e); return { $type: Point_$type, x: i, y: j }; }; NumericAngleAxis.prototype.f6 = function (a, b) { return this.getScaledAngle(a); }; NumericAngleAxis.prototype.getScaledAngle1 = function (a, b, c) { var d = 0; if (b) { d = (Math.log(a) - this.q7) / (this.q6 - this.q7); } else { d = (a - this.qw) / (this.qv - this.qw); } if (c) { d = 1 - d; } return (d * 2 * Math.PI) + this.ti; }; NumericAngleAxis.prototype.getScaledAngle = function (a) { return this.getScaledAngle1(a, this.qh, this.dp); }; NumericAngleAxis.prototype.f9 = function (a, b) { return this.getUnscaledAngle(a); }; NumericAngleAxis.prototype.getUnscaledAngle = function (a) { var b = (a - this.ti) / (2 * Math.PI); if (this.dn) { b = 1 - b; } if (this.qh) { return Math.exp(b * (this.q6 - this.q7) + this.q7); } else { return this.qw + b * (this.qv - this.qw); } }; NumericAngleAxis.prototype.tb = function () { if (this.ta == 0) { return 1; } else { return this.ta; } }; NumericAngleAxis.prototype.la = function (a, b, c, d) { var e_6, _a, e_7, _b, e_8, _c; _super.prototype.la.call(this, a, b, c, d); var e = typeCast(XamDataChart.$, this.b7); switch (b) { case "CrossingAxis": var f = typeCast(NumericRadiusAxis.$, d); this.tu(f); if (f != null) { f.tv(this); } this.ly(false); break; case NumericAngleAxis.$$p[3]: this.ti = this.tn; while (this.ti < 0) { this.ti += 360; } while (this.ti >= 360) { this.ti -= 360; } this.ti = (this.tn * Math.PI) / 180; this.ly(false); try { for (var _d = __values(fromEnum(this.eo())), _e = _d.next(); !_e.done; _e = _d.next()) { var g = _e.value; g.r8(false); g.q0(); } } catch (e_6_1) { e_6 = { error: e_6_1 }; } finally { try { if (_e && !_e.done && (_a = _d.return)) _a.call(_d); } finally { if (e_6) throw e_6.error; } } break; case "Label": if (e != null) { try { for (var _f = __values(fromEnum(e.zq)), _g = _f.next(); !_g.done; _g = _f.next()) { var h = _g.value; h.lx(); } } catch (e_7_1) { e_7 = { error: e_7_1 }; } finally { try { if (_g && !_g.done && (_b = _f.return)) _b.call(_f); } finally { if (e_7) throw e_7.error; } } } break; case "CrossingValue": if (e != null) { try { for (var _h = __values(fromEnum(e.zq)), _j = _h.next(); !_j.done; _j = _h.next()) { var i = _j.value; if (typeCast(NumericAngleAxis.$, i) !== null || typeCast(CategoryAngleAxis.$, i) !== null) { i.lx(); } } } catch (e_8_1) { e_8 = { error: e_8_1 }; } finally { try { if (_j && !_j.done && (_c = _h.return)) _c.call(_h); } finally { if (e_8) throw e_8.error; } } } break; case "LabelSettings": this.pw = this.pu(); this.ts(); this.d0 = true; this.ly(false); break; case NumericAngleAxis.$$p[0]: case NumericAngleAxis.$$p[1]: this.kw(b); break; } }; NumericAngleAxis.prototype.kw = function (a) { _super.prototype.kw.call(this, a); switch (a) { case NumericAngleAxis.$$p[0]: case NumericAngleAxis.$$p[1]: this.ks(a); break; } }; NumericAngleAxis.prototype.ts = function () { this.th = NaN; }; NumericAngleAxis.prototype.py = function () { return new PolarAxisRenderingParameters(); }; NumericAngleAxis.prototype.px = function (a, b, c, d) { var e = typeCast(PolarAxisRenderingParameters.$, _super.prototype.px.call(this, a, b, c, d)); var f = this.tf.h(b, a, c); var g = this.tf.i(b, a, c); var h = 0.5 * this.te.tg; var i = 0.5 * this.te.tf; var j = f; var k = g; var l = this.te.tl(); if (isNaN_(l) || isInfinity(l)) { return null; } if (k >= h) { k = l; } if (j < i) { j = i; } var m = a.width; this.tf.m(b, a, c, e, this.qw, this.qv, this.dn, runOn(this, this.getUnscaledAngle), m); var n = { $type: Point_$type, x: 0.5, y: 0.5 }; e.center = n; e.maxLength = k; e.minLength = j; e.effectiveMaximum = l; return e; }; NumericAngleAxis.prototype.getMinMaxAngle = function (a, b, c, d, e) { var f = this.tf.n(a, b, c, d, e); d = f.p3; e = f.p4; return { p3: d, p4: e }; }; NumericAngleAxis.prototype.lz = function (a) { _super.prototype.lz.call(this, a); var b = this.b7 != null ? this.b7.yr : Rect.empty; var c = !b.isEmpty ? this.o6 : Rect.empty; var d = this.o1(); var e = this.o0(); var f = this.pw.c(a, c, b, d, e); if (f != null) { this.qu = f.f.m; this.qx = f.f.l; } }; Object.defineProperty(NumericAngleAxis.prototype, "te", { get: function () { if (this.td != null) { return this.td; } var a = typeCast(XamDataChart.$, this.b7); if (a != null) { for (var b = 0; b < a.zq.count; b++) { if (a.zq._inner[b].du) { return a.zq._inner[b]; } } } return this.td; }, set: function (a) { this.td = a; }, enumerable: false, configurable: true }); NumericAngleAxis.prototype.ap = function () { return this.te; }; NumericAngleAxis.prototype.tu = function (a) { this.te = a; }; NumericAngleAxis.prototype.md = function (a, b) { _super.prototype.md.call(this, a, b); if (b.height != a.height || b.width != a.width) { this.ed(); } }; NumericAngleAxis.prototype.get_bm = function () { return 2; }; Object.defineProperty(NumericAngleAxis.prototype, "bm", { get: function () { return this.get_bm(); }, enumerable: fa