UNPKG

igniteui-react-charts

Version:

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

1,105 lines (1,104 loc) 39.6 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 } from "tslib"; import { RadialBucketCalculator } from "./RadialBucketCalculator"; import { markType, typeCast, Point_$type, runOn, delegateCombine, enumGetBox, markDep } from "igniteui-react-core"; import { isNaN_, intDivide, isInfinity } from "igniteui-react-core"; import { RadialBase } from "./RadialBase"; import { CategoryLineRasterizer } from "./CategoryLineRasterizer"; import { DependencyProperty } from "igniteui-react-core"; 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 { RadialFrame } from "./RadialFrame"; import { ProportionalCategoryAngleAxis } from "./ProportionalCategoryAngleAxis"; import { ScalerParams } from "./ScalerParams"; import { Rect } from "igniteui-react-core"; import { FastItemCoalescingColumn } from "./FastItemCoalescingColumn"; import { List$1 } from "igniteui-react-core"; import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay"; import { DataLegendSeriesValueInfo } from "igniteui-react-core"; import { DataLegendSeriesContext } from "igniteui-react-core"; import { AxisRange } from "./AxisRange"; import { IFastItemsSource_$type } from "igniteui-react-core"; import { NumericAxisBase } from "./NumericAxisBase"; import { RadialBaseView } from "./RadialBaseView"; import { ChartSelection } from "./ChartSelection"; import { CollisionRect } from "igniteui-react-core"; import { CollisionAvoider } from "./CollisionAvoider"; import { Clipper } from "igniteui-react-core"; import { TrendResolutionParams } from "./TrendResolutionParams"; import { RadialTrendLineManager } from "./RadialTrendLineManager"; import { CategoryMarkerManager } from "./CategoryMarkerManager"; import { PropertyMetadata } from "igniteui-react-core"; import { stringIsNullOrEmpty } from "igniteui-react-core"; /** * @hidden */ var AnchoredRadialBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AnchoredRadialBucketCalculator, _super); function AnchoredRadialBucketCalculator(a) { var _this = _super.call(this, a) || this; _this.f = null; _this.f = a; return _this; } AnchoredRadialBucketCalculator.prototype.getBucket = function (a) { var b = this.f.c5.aca; var c = Math.min(a * this.b, b.count - 1); var d = Math.min(c + this.b - 1, b.count - 1); var e = NaN; var f = NaN; for (var g = c; g <= d; ++g) { var h = b.item(g); if (!isNaN_(e)) { if (!isNaN_(h)) { e = Math.min(e, h); f = Math.max(f, h); } } else { e = h; f = h; } } if (!isNaN_(e)) { return [0.5 * (c + d), e, f, 0]; } return [0.5 * (c + d), NaN, NaN, 0]; }; AnchoredRadialBucketCalculator.$t = markType(AnchoredRadialBucketCalculator, 'AnchoredRadialBucketCalculator', RadialBucketCalculator.$); return AnchoredRadialBucketCalculator; }(RadialBucketCalculator)); export { AnchoredRadialBucketCalculator }; /** * @hidden */ var AnchoredRadialSeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AnchoredRadialSeries, _super); function AnchoredRadialSeries() { var _this = _super.call(this) || this; _this.ab5 = null; _this.acf = false; _this.ab9 = null; _this.adq = { $type: Point_$type, x: 0, y: 0 }; _this.ab7 = null; _this.ab6 = null; _this.acb = false; _this.ab7 = new RadialFrame(3); _this.ab5 = new CategoryLineRasterizer(); return _this; } AnchoredRadialSeries.prototype.ct = function () { return new AnchoredRadialSeriesView(this); }; AnchoredRadialSeries.prototype.o2 = function () { _super.prototype.o2.call(this); this.y1 = null; this.y7 = null; }; AnchoredRadialSeries.prototype.me = function () { return AnchoredRadialSeries.$$p[4]; }; AnchoredRadialSeries.prototype.kq = function (a, b) { var c = this.nd(b); if (c == AnchoredRadialSeries.$$p[4]) { return this.kr(a, b, this.acz); } if (c == AnchoredRadialSeries.$$p[0]) { return this.kr(a, b, this.acr); } return _super.prototype.kq.call(this, a, b); }; AnchoredRadialSeries.prototype.md = function (a) { var b = this.nd(a); if (b == AnchoredRadialSeries.$$p[4]) { return this.acz; } if (b == AnchoredRadialSeries.$$p[0]) { return this.acr; } return _super.prototype.md.call(this, a); }; AnchoredRadialSeries.prototype.jc = function (a) { if (a == this.y9) { return this.aab(this.aca.count - 1, this.aca.item(this.aca.count - 1)); } return _super.prototype.jc.call(this, a); }; AnchoredRadialSeries.prototype.kt = function (a) { if (this.y1 != null && this.y1.cl) { if (a == this.y1.othersIndex) { return this.y9; } } return _super.prototype.kt.call(this, a); }; AnchoredRadialSeries.prototype.q1 = function (a) { _super.prototype.q1.call(this, a); this.ab4 = a; }; AnchoredRadialSeries.prototype.ka = function (a, b) { return this.kb(a, b, this.y1, null, this.aca); }; AnchoredRadialSeries.prototype.j8 = function (a, b) { return this.j9(a, b, this.y1, null, this.aca); }; AnchoredRadialSeries.prototype.ip = function (a, b, c, d, e) { if (this.aca == null) { return Number.POSITIVE_INFINITY; } return this.iq(a, b, this.y1, d, e, this.aca.count, null); }; AnchoredRadialSeries.prototype.i5 = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.acl(this.y1, this.cw.b2, this.cw.b1, d); var f = new ScalerParams(0, this.cw.b2, this.cw.b1, this.y1.ch, d); f.c = this.dc.wn; var g = this.aca; if (this.acf && typeCast(FastItemCoalescingColumn.$, g) !== null) { g = new FastItemCoalescingColumn(this.y1, g.c, false); } return this.i7(g, a, this.y1, f, e, null, b, c); }; AnchoredRadialSeries.prototype.we = function (a, b, c) { if (this.y7 == null || this.y1 == null || this.cw == null || this.cw.b2.isEmpty || this.cw.b1.isEmpty) { return { $type: Point_$type, x: NaN, y: NaN }; } var d = this.getEffectiveViewport1(this.cw); var e = new ScalerParams(0, this.cw.b2, this.cw.b1, this.y7.ch, d); e.c = this.getEffectiveViewport1(this.cw); var f = this.i5(a, b, c); f = this.y7.el(f, e); var g = this.za.c(a, this.cw.b2, this.cw.b1, d); if (!b && this.y1 != null) { var h = this.ka(a, c); var i = this.j8(a, c); var j = this.acl(this.y1, this.cw.b2, this.cw.b1, d); var k = new ScalerParams(0, this.cw.b2, this.cw.b1, this.y1.ch, d); k.c = this.dc.wn; var l = this.ip(a, h, this.y1, k, j); var m = this.ip(a, i, this.y1, k, j); if (this.y1.cl) { if (m <= l) { j = this.ack(i, this.y1, this.cw.b2, this.cw.b1, d); if (isNaN_(j)) { j = 0; } g = this.y1.el(i, k) + j; } else { j = this.ack(h, this.y1, this.cw.b2, this.cw.b1, d); if (isNaN_(j)) { j = 0; } g = this.y1.el(h, k) + j; } } else { if (m <= l) { g = this.y1.el(i, k) + j; } else { g = this.y1.el(h, k) + j; } } } var n = this.za.d(g, f, this.cw.b2, this.cw.b1, this.cw.getEffectiveViewport()); var o = this.za.e(g, f, this.cw.b2, this.cw.b1, this.cw.getEffectiveViewport()); return { $type: Point_$type, x: n, y: o }; }; AnchoredRadialSeries.prototype.gb = function () { return this.highlightedItemsSource != null || this.acr != null; }; AnchoredRadialSeries.prototype.ht = function () { var a = _super.prototype.ht.call(this); { var b = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.ad = "ValueMemberPath"; $ret.p = true; $ret.y = "HighlightedValueMemberPath"; $ret.q = true; return $ret; })()); b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.ac5)); a.add(b); } return a; }; AnchoredRadialSeries.prototype.ac5 = function (a, b) { if (this.acr != null) { b.value = this.acr; return; } b.value = this.acz; }; Object.defineProperty(AnchoredRadialSeries.prototype, "aca", { get: function () { return this.ab9; }, set: function (a) { if (this.ab9 != a) { var b = this.ab9; this.ab9 = a; this.raisePropertyChanged("ValueColumn", b, this.ab9); } }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.getDataLegendSeriesContextAt = function (a, b) { var c = new DataLegendSeriesValueInfo(); c.a = 0; this.acf = true; c.l = this.i5({ $type: Point_$type, x: a, y: b }, false, false); this.acf = false; c.q = "Value"; c.r = this.acz != null ? this.acz : "Value"; c.s = this.acv != null ? this.acv : "V:"; c.t = this.acx != null ? this.acx : ""; var d = new DataLegendSeriesContext(); d.e = ((function () { var $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(c); return $ret; })()); d.h = this.mc(); return d; }; Object.defineProperty(AnchoredRadialSeries.prototype, "adm", { get: function () { return this.c(AnchoredRadialSeries.ac9); }, set: function (a) { this.h(AnchoredRadialSeries.ac9, a); }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.ay = function (a) { if (a != null && a == this.y1 && this.aca != null && this.aca.count > 0) { return new AxisRange(0, this.aca.count - 1); } if (a != null && a == this.y7 && this.aca != null && this.aca.count > 0) { return new AxisRange(this.aca.minimum, this.aca.maximum); } return null; }; AnchoredRadialSeries.prototype.aab = function (a, b) { if (this.acj) { var c = this.aca.c; if (a < 0) { return _super.prototype.aab.call(this, a, b); } if (a > c.count - 1) { if (typeCast(ProportionalCategoryAngleAxis.$, this.y1) !== null) { var d = this.aca; return d.f; } return _super.prototype.aab.call(this, a, b); } return c.item(a); } else { return _super.prototype.aab.call(this, a, b); } }; AnchoredRadialSeries.prototype.dl = function (a) { var b = _super.prototype.dl.call(this, a); this.acb = false; if (this.y1 != null && this.y1.cl) { this.acb = true; b = new FastItemCoalescingColumn(this.y1, b, this.acj); } return b; }; AnchoredRadialSeries.prototype.ac3 = function (a, b) { if (this.acb) { var c = b; var d = c.c; a.deregisterColumn(d); } else { a.deregisterColumn(b); } }; AnchoredRadialSeries.prototype.ra = function (a, b, c, d) { _super.prototype.ra.call(this, a, b, c, d); if (this.ab4.c6.g$e(a, b, c, d)) { this.rs(false); this.ql(); } var e = typeCast(NumericAxisBase.$, this.y7); switch (b) { case AnchoredRadialSeries.$$p[2]: case AnchoredRadialSeries.$$p[3]: this.qf(); break; case AnchoredRadialSeries.$$p[1]: case RadialBase.$$p[0]: if (this.aca != null) { this.ac3(this.dp, this.aca); this.aca = this.dl(this.acz); } break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) !== null) { this.ac3(c, this.aca); this.aca = null; } if (typeCast(IFastItemsSource_$type, d) !== null) { this.aca = this.dl(this.acz); this.ab4.c1.e(this.id); } if (e != null && !e.c1()) { this.ab4.c1.e(this.id); this.rs(this.gg && c != null); } break; case AnchoredRadialSeries.$$p[4]: if (this.dp != null) { this.ac3(this.dp, this.aca); this.aca = this.dl(this.acz); } break; case "ValueColumn": if (e != null && !e.c1()) { this.ab4.c1.e(this.id); this.rs(this.gg && this.d8); } break; case "TrendLineBrush": this.rg(b); break; case "TrendLineType": this.ql(); break; } }; AnchoredRadialSeries.prototype.pb = function (a, b, c, d) { _super.prototype.pb.call(this, a, b, c, d); switch (a) { case 4: case 1: case 0: this.ab4.c1.e(this.id); break; } this.ab4.c6.g$i(a, b, c, d); switch (a) { case 4: if (this.y7 != null && !this.y7.c1()) { this.rs(true); } break; case 1: if (this.y7 != null && !this.y7.c1()) { this.rs(true); } break; case 0: if (this.y7 != null && !this.y7.c1()) { this.rs(true); } break; case 2: if (this.acz != null && this.ab4.c1.b > 0 && this.y7 != null && !this.y7.c1()) { this.rs(true); } break; case 3: if (d == this.acz) { if (this.y7 != null && !this.y7.c1()) { this.rs(true); } } break; } }; AnchoredRadialSeries.prototype.he = function (a, b, c) { var d = _super.prototype.he.call(this, a, b, c); var e = c; if (this.dp == null || this.dp.count == 0 || this.y1 == null || this.aca == null || this.y1.lj == 0 || this.y7 == null || isInfinity(this.y7.l4) || isInfinity(this.y7.l3) || e.c1.b < 1) { d = false; } return d; }; AnchoredRadialSeries.prototype.getOffsetValue = function () { return this.acl(this.y1, this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)); }; AnchoredRadialSeries.prototype.getCategoryWidth = function () { return this.y1.getCategorySize(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)); }; AnchoredRadialSeries.prototype.get_acg = function () { return false; }; Object.defineProperty(AnchoredRadialSeries.prototype, "acg", { get: function () { return this.get_acg(); }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.get_el = function () { return true; }; AnchoredRadialSeries.prototype.get_f5 = function () { return this.y7 != null && this.y7.ch; }; AnchoredRadialSeries.prototype.acl = function (a, b, c, d) { var e = 0; var f = this.preferredCategoryMode(a); if (f == 0 && a.categoryMode != 0) { f = 1; } switch (f) { case 0: e = 0; break; case 1: e = 0.5 * a.getCategorySize(b, c, d); break; case 2: e = a.getGroupCenter(this.aaa(), b, c, d); break; } if (a.ch) { e = -e; } return e; }; AnchoredRadialSeries.prototype.ack = function (a, b, c, d, e) { var f = 0; var g = this.preferredCategoryMode(b); if (g == 0 && b.categoryMode != 0) { g = 1; } switch (g) { case 0: f = 0; break; case 1: f = 0.5 * b.m7(a, c, d, e); break; case 2: f = b.m6(a, this.aaa(), c, d, e); break; } if (b.ch) { f = -f; } return f; }; AnchoredRadialSeries.prototype.ac4 = function (a, b, c, d) { var _this = this; if (d == 0) { this.p4(a, b, c); return; } var e = this.cw.b2; var f = this.cw.b1; var g = this.getEffectiveViewport1(this.cw); var h = this.dc.wd(this.wu, this.getEffectiveViewport(), e); var i = this.y7.k5(f, e, g, h); var j = this.y1 != null && this.y1.cl; var k = new CollisionRect(0, this.dc.wa(a)); var _loop_1 = function (l) { var m = typeCast(RadialBaseView.$, this_1.cw); var n = m.c1.getBucket(l); var o = this_1.acl(this_1.y1, e, f, g); if (j) { o = this_1.ack(l, this_1.y1, e, f, g); if (isNaN_(o)) { o = 0; } } n[0] = this_1.y1.getScaledAngle(n[0]) + o; var p = Math.min(this_1.za.b.od(n[2]), i.maxLength); var q = this_1.za.d(n[0], p, e, f, g); var r = this_1.za.e(n[0], p, e, f, g); if (k.containsLocation(q, r)) { 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(l); return $ret; })())); } else { b.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dp.item(l); $ret.series = _this; return $ret; })())); } } }; var this_1 = this; for (var l = 0; l < this.dp.count; l++) { var state_1 = _loop_1(l); if (typeof state_1 === "object") return state_1.value; } }; AnchoredRadialSeries.prototype.get_aci = function () { return false; }; Object.defineProperty(AnchoredRadialSeries.prototype, "aci", { get: function () { return this.get_aci(); }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.get_acc = function () { return false; }; Object.defineProperty(AnchoredRadialSeries.prototype, "acc", { get: function () { return this.get_acc(); }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.abb = function (a, b) { var _this = this; var c = b.b2; var d = b.b1; var e = this.getEffectiveViewport1(b); var f = this.y1; var g = this.y7; var h = g.l4; var i = g.l3; a.h.clear(); a.p.clear(); a.s.clear(); var j = this.xi(); var k = 0; var l = b; var m = f.cl; var n = new CollisionAvoider(); var o = 0; var p = 0; var q = b.c1.d; o = this.acl(f, c, d, e); l.c6.k = this.y7.n7; l.c6.j = this.y7.n6; l.c6.l = function (r, s) { return _this.acm(r, s, c, d, e); }; l.c6.m = function (r, s) { return _this.acn(r, s, c, d, e); }; var r = ((function () { var $ret = new Clipper(0, d, false); $ret.i = a.s; return $ret; })()); var s = ((function () { var $ret = new TrendResolutionParams(); $ret.e = b.c1.b; $ret.f = b.c1.c; $ret.g = q; $ret.a = o; $ret.d = _this.id; $ret.i = d; $ret.h = e; $ret.j = c; return $ret; })()); l.c6.n(a.s, this.ab8, this.aca, this.acp, function (t) { return _this.y1.getScaledAngle(t); }, function (t) { return _this.y7.od(t); }, s, r); a.f.clear(); for (var t = 0; t < b.w.count; t++) { a.f.add(new List$1(Point_$type, 0)); var u = b.w._inner[t]; u.k = this.y7.n7; u.j = this.y7.n6; u.l = function (v, w) { return _this.acm(v, w, c, d, e); }; u.m = function (v, w) { return _this.acn(v, w, c, d, e); }; u.n(a.f._inner[t], u.g$b, this.aca, u.g$f, function (v) { return _this.y1.getScaledAngle(v); }, function (v) { return _this.y7.od(v); }, s, r); } var v = true; if (this.ach(b)) { q--; } for (var w = b.c1.c; w <= q; ++w) { var x = w; if (x * b.c1.b >= this.y1.lj) { x -= intDivide((this.y1.lj), b.c1.b); } var y = b.c1.getBucket(x); p = 0; if (m) { p = this.z2(x, c, d, e); } y[3] = p; if (!isNaN_(y[0])) { var z = false; if (m) { o = this.ack(x, f, c, d, e); if (isNaN_(o)) { o = 0; z = true; } } y[0] = f.getScaledAngle(y[0]) + o; if (y[1] < h || y[1] > i) { if (this.aci) { if (y[1] > i && this.acc) { } else { z = true; } } else { if (y[1] > i && this.acc) { } else { continue; } } } if (z) { y[1] = NaN; y[2] = NaN; } y[1] = g.od(y[1]); if (b.c1.b > 1) { if (y[2] < h || y[2] > i) { continue; } y[2] = g.od(y[2]); } else { y[2] = y[1]; } if ((isNaN_(y[1]) || isNaN_(y[2])) && v && this.acg && this.ace()) { q++; } else { v = false; } a.h.add(y); if (j) { var aa = Math.min(x * b.c1.b, this.dp.count - 1); var ab = false; if (this.y1.cl) { var ac = this.y1; var ad = ac.hasOthersCategory && (x * b.c1.b) == this.y1.lj - 1; ab = ad; } var ae = this.za.d(y[0], y[1], c, d, e); var af = this.za.e(y[0], y[1], c, d, e); var ag = new Rect(0, ae - 5, af - 5, 11, 11); if (!isNaN_(ae) && !isNaN_(af) && !isInfinity(ae) && !isInfinity(af) && n.tryAdd(ag)) { a.p.add({ $type: Point_$type, x: y[0], y: y[1] }); var ah = b.c2.item(k); ah.al = x; ah.ak = aa; ah.content.item = this.dp.item(aa); if (ab) { ah.ak = this.dp.count; var ai = this.y1; ah.content.item = this.y9; } ++k; } } } else { if (v && this.acg && this.ace()) { q++; } } } b.c2.count = k; return; }; AnchoredRadialSeries.prototype.acm = function (a, b, c, d, e) { return this.za.d(a, b, c, d, e); }; AnchoredRadialSeries.prototype.acn = function (a, b, c, d, e) { return this.za.e(a, b, c, d, e); }; AnchoredRadialSeries.prototype.ach = function (a) { var b = a; return !this.acg && b.c1.c == 0 && b.c1.d == this.y1.lj; }; AnchoredRadialSeries.prototype.ab3 = function (a, b, c) { var d = null; var e = c.b2; var f = c.b1; if (b > -1 && !e.isEmpty && !f.isEmpty) { var g = a._inner[0][0] < f.left - 2000 ? f.left - 10 : NaN; var h = f.bottom + 10; var i = a._inner[b][0] > f.right + 2000 ? f.right + 10 : NaN; var j = f.top - 10; d = new Clipper(1, g, h, i, j, false); } return d; }; AnchoredRadialSeries.prototype.ac8 = function (a, b, c, d, e) { if (a.count > 0 && d.count > 0) { if (!e || this.acd()) { a.add(this.adq); a.add(a._inner[0]); d.add(this.adq); d.add(d._inner[0]); } } }; AnchoredRadialSeries.prototype.ace = function () { return !this.acd(); }; AnchoredRadialSeries.prototype.acd = function () { var a = this.cw.b2; return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 }); }; AnchoredRadialSeries.prototype.o5 = function (a, b) { _super.prototype.o5.call(this, a, b); var c = b; if (a) { c.c2.clear(); } c.c6.g$h(); }; AnchoredRadialSeries.prototype.abe = function (a, b) { this.qx(); var c = b.b2; var d = b.b1; var e = this.getEffectiveViewport1(b); var f = this.wl(b); var g = b; g.c6.g$k(a.s); for (var h = 0; h < b.w.count; h++) { var i = b.w._inner[h]; i.g$k(a.f._inner[h]); } var j = new List$1(Point_$type, 0); for (var k = 0; k < a.p.count; k++) { var l = a.p._inner[k]; var m = this.za.d(l.x, l.y, c, d, e); var n = this.za.e(l.x, l.y, c, d, e); var o = { $type: Point_$type, x: m, y: n }; j.add(o); } CategoryMarkerManager.e(this, j, g.c2, this.xk); this.ac2(b, a); g.cv(); this.ac1(d, c, e, f, g); }; AnchoredRadialSeries.prototype.ab2 = function (a, b, c) { if (b < a || a < 0 || a > this.aca.count || b < 0 || b > this.aca.count || c == null) { return null; } var d = new Array((b - a) + 1); var e = c.cn; var f = null; if (e) { f = c.i$b; } for (var g = a; g <= b; g++) { var h = g; if (e) { h = f._inner[h]; } d[g - a] = this.dp.item(g); } return d; }; AnchoredRadialSeries.prototype.ac6 = function (a, b, c, d, e, f) { var g = this.by != 1; var h = this.cq != 1; var i = this.cp != 1; var j = this.d3; this.zi.a3(this.zi.d, d.cn, a, b, c, d, e, f, true); this.zi.aa(this.ib); var k = this.zi.ax; var l = null; var m = null; var n = null; var o = this.dp; var p = null; var q = null; var r = null; if (j && this.dc != null && !k.e) { var s = this.vq(k.z); var t = this.vr(k.z); this.zi.ag = s; this.zi.ah = t; k.aa = s; k.ab = t; } if (g && this.dc != null) { l = this.dc.dk.getHighlightingInfo(this, o, k.z, k.y, true); if (this.dc.dk.isCrossContextHighlight(this)) { p = this.dc.dk.getHighlightingInfo(this, o, k.z, k.y, true); } k.c = l; } if (h && this.dc != null) { m = this.dc.dl.getHighlightingInfo(this, o, k.z, k.y, true); if (m == null && this.bo != null) { m = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, true); } if (this.dc.dl.isCrossContextHighlight(this)) { q = this.dc.dl.getHighlightingInfo(this, o, k.z, k.y, true); } k.d = m; } if (i && this.dc != null) { n = this.dc.dj.getHighlightingInfo(this, o, k.z, k.y, true); if (this.dc.dj.isCrossContextHighlight(this)) { r = this.dc.dj.getHighlightingInfo(this, o, k.z, k.y, true); } k.b = n; } k.h = f; this.abc(k); this.zi.y(this, l, m, n, f, g, h, i, k.v, this.dc.dk.totalHighWaterMark, k.x, this.dc.dl.totalHighWaterMark, k.t, this.dc.dj.totalHighWaterMark); }; AnchoredRadialSeries.prototype.ac7 = function (a, b, c, d, e, f) { var g = this.by != 1; var h = this.cq != 1; var i = this.cq != 1; var j = this.d3; this.zi.a3(this.zi.b, d.cn, a, b, c, d, e, f, false); this.zi.ab(this.ib); var k = this.zi.ay; var l = null; var m = null; var n = null; var o = this.dp; if (j && this.dc != null && !k.e) { var p = this.vp(k.z); var q = this.vs(k.z); this.zi.ag = p; this.zi.ah = q; k.aa = p; k.ab = q; } if (g && this.dc != null) { l = this.dc.dk.getHighlightingInfo(this, o, k.z, k.y, false); k.c = l; } if (h && this.dc != null) { m = this.dc.dl.getHighlightingInfo(this, o, k.z, k.y, false); if (m == null && this.bo != null) { m = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, false); } k.d = m; } k.h = f; this.abd(k); this.zi.z(this, l, m, n, f, g, h, i, b < 0); }; AnchoredRadialSeries.prototype.ac2 = function (a, b) { a.cb = true; this.zi.a1(this, this.zy(), runOn(this, this.yp), this.z8(a), this.z9(a)); var c = this.zi.d; var d = c != null; var e = this.y1; if (e == null) { return; } var f = this.getEffectiveViewport1(a); var g = new ScalerParams(0, a.b2, a.b1, e.ch, f); var h = this.dp == null ? 0 : this.dp.count; var i = a; var j = b.h; var k = i.c1.c; var l = i.c1.d; var m = i.c1.b; var n = k * m; for (var o = 0; o < a.c2.count; o++) { var p = a.c2.item(o); var q = p.content; if (d) { var r = p.al; this.ac6(j, r, h, e, g, a.r); } this.zi.ac(p, q); } }; AnchoredRadialSeries.prototype.ac1 = function (a, b, c, d, e) { e.c7(a, b, c, d); }; AnchoredRadialSeries.prototype.sj = function () { _super.prototype.sj.call(this); if (this.index < 0) { return; } this.ab4.c8(); }; AnchoredRadialSeries.prototype.kx = function (a, b) { if (a == this.ab4.c6.g$n) { return null; } return _super.prototype.kx.call(this, a, b); }; AnchoredRadialSeries.prototype.gd = function (a) { var b = this.cw.b2; b = b.copy(); var c = this.cw.b1; var d = !b.isEmpty && !c.isEmpty && this.dp != null ? this.dp.indexOf(a) : -1; if (this.y1 == null || this.aca == null || this.y7 == null) { return false; } if (d < 0 || d > this.aca.count - 1) { return false; } var e = this.y1.getScaledAngle(d); var f = this.y7.od(this.aca.item(d)); if (isNaN_(f)) { f = (this.y7.n6 + this.y7.n7) / 2; } 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; }; AnchoredRadialSeries.prototype.ru = function (a, b) { _super.prototype.ru.call(this, a, b); if (!this.g0) { this.cw.a7(b); return; } this.cw.a7(b); var c = typeCast(AnchoredRadialSeriesView.$, this.cv); c.c1.e(this.id); if (this.d6(this.cv)) { return; } this.rv(); this.g0 = false; }; AnchoredRadialSeries.prototype.rv = function () { _super.prototype.rv.call(this); var a = typeCast(AnchoredRadialSeriesView.$, this.cv); if (!this.gs) { this.ab7 = new RadialFrame(3); this.abb(this.ab7, a); } this.gs = false; this.abe(this.ab7, a); }; AnchoredRadialSeries.prototype.rr = function (a, b, c, d, e) { _super.prototype.rr.call(this, a, b, c, d, e); var f = this.ba.a$j.item(d); var g = f; g.c1.e(this.id); f.a6(c); if (this.d6(g)) { return; } if (this.ab6 == null) { this.ab6 = new RadialFrame(3); } this.ab6.x(); this.abb(this.ab6, g); this.abe(this.ab6, g); }; AnchoredRadialSeries.prototype.pz = function (a) { _super.prototype.pz.call(this, a); this.bc.exportTrendlineData(this, a, this.ab4.c6.g$n); }; AnchoredRadialSeries.prototype.bd = function () { return new RadialTrendLineManager(); }; AnchoredRadialSeries.$t = markType(AnchoredRadialSeries, 'AnchoredRadialSeries', RadialBase.$); AnchoredRadialSeries.ac9 = DependencyProperty.i("ActualTrendLineBrush", Brush.$, AnchoredRadialSeries.$, new PropertyMetadata(2, null, function (a, b) { return a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue); })); AnchoredRadialSeries.$$p = markDep(DependencyProperty, PropertyMetadata, AnchoredRadialSeries, 'raisePropertyChanged', ['HighlightedValueMemberPath:acr:ada', [2, null], 'UseCategoryNormalizedValues:acj:adi', [0, false], 'ValueMemberAsLegendLabel:acv:adj', [2, null], 'ValueMemberAsLegendUnit:acx:adk', [2, null], 'ValueMemberPath:acz:adl', [2, null], 'TrendLineType:ab8:adg', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:aco:adf', [1, 1.5], 'TrendLinePeriod:acp:ade', [1, 7], 'TrendLineZIndex:acq:adh', [1, 1], 'TrendLineBrush:adn:adb', [Brush.$, null], 'TrendLineDashArray:ado:adc', [DoubleCollection.$], 'TrendLineDashCap:adp:add', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]); return AnchoredRadialSeries; }(RadialBase)); export { AnchoredRadialSeries }; /** * @hidden */ var AnchoredRadialSeriesView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AnchoredRadialSeriesView, _super); function AnchoredRadialSeriesView(a) { var _this = _super.call(this, a) || this; _this.c5 = null; _this.c6 = null; _this.c1 = new AnchoredRadialBucketCalculator(_this); _this.c5 = a; _this.c6 = new RadialTrendLineManager(); return _this; } AnchoredRadialSeriesView.prototype.c7 = function (a, b, c, d) { }; AnchoredRadialSeriesView.prototype.c8 = function () { this.c5.adm = null; if (this.c5.adn != null) { this.c5.adm = this.c5.adn; } else { this.c5.adm = this.c5.vb; } }; AnchoredRadialSeriesView.prototype.bb = function (a, b) { if (a.d) { if (!b) { } if (this.c5.ab8 != 0 && !b) { var c = this.c6.g$n; c.ad = this.c5.aco; c._stroke = this.c5.adm; c.ai = this.c5.ado; c.aj = this.c5.adp; a.v(c); } } _super.prototype.bb.call(this, a, b); }; AnchoredRadialSeriesView.prototype.getDefaultTooltipTemplate = function () { var a = "<div class='ui-chart-default-tooltip-content'>"; if (this.c5.y1.f2 != null) { a += "<span>${item." + this.c5.y1.f2 + "}</span><br/>"; } a += "<span"; var b = this.f.ba.a$u(this.f); if (!stringIsNullOrEmpty(b)) { a += " style='color:" + b + "'"; } a += ">" + this.c5.title + ": </span><span class='ui-priority-primary'>" + "${item." + this.c5.acz + "}</span></div>"; return a; }; AnchoredRadialSeriesView.$t = markType(AnchoredRadialSeriesView, 'AnchoredRadialSeriesView', RadialBaseView.$); return AnchoredRadialSeriesView; }(RadialBaseView)); export { AnchoredRadialSeriesView };