UNPKG

igniteui-react-charts

Version:

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

1,133 lines (1,132 loc) 40.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, __values } from "tslib"; import { RadialBucketCalculator } from "./RadialBucketCalculator"; import { markType, typeCast, Point_$type, runOn, delegateCombine, enumGetBox, fromEnum, 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.de.acz; 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.acu = null; _this.ac4 = false; _this.acy = null; _this.aef = { $type: Point_$type, x: 0, y: 0 }; _this.acw = null; _this.acv = null; _this.ac0 = false; _this.acw = new RadialFrame(3); _this.acu = new CategoryLineRasterizer(); return _this; } AnchoredRadialSeries.prototype.ct = function () { return new AnchoredRadialSeriesView(this); }; AnchoredRadialSeries.prototype.pg = function () { _super.prototype.pg.call(this); this.zl = null; this.zr = null; }; AnchoredRadialSeries.prototype.mq = function () { return AnchoredRadialSeries.$$p[4]; }; AnchoredRadialSeries.prototype.k0 = function (a, b) { var c = this.np(b); if (c == AnchoredRadialSeries.$$p[4]) { return this.k1(a, b, this.ado); } if (c == AnchoredRadialSeries.$$p[0]) { return this.k1(a, b, this.adg); } return _super.prototype.k0.call(this, a, b); }; AnchoredRadialSeries.prototype.mp = function (a) { var b = this.np(a); if (b == AnchoredRadialSeries.$$p[4]) { return this.ado; } if (b == AnchoredRadialSeries.$$p[0]) { return this.adg; } return _super.prototype.mp.call(this, a); }; AnchoredRadialSeries.prototype.jl = function (a) { if (this.zl.ds && this.zl.tb(a)) { return this.aau(this.acz.count - 1, this.acz.item(this.acz.count - 1)); } return _super.prototype.jl.call(this, a); }; AnchoredRadialSeries.prototype.k3 = function (a) { if (this.zl != null && this.zl.ds) { if (a == this.zl.othersIndex) { return this.zl.to(true); } } return _super.prototype.k3.call(this, a); }; AnchoredRadialSeries.prototype.ri = function (a) { _super.prototype.ri.call(this, a); this.act = a; }; AnchoredRadialSeries.prototype.kk = function (a, b) { return this.kl(a, b, this.zl, null, this.acz); }; AnchoredRadialSeries.prototype.ki = function (a, b) { return this.kj(a, b, this.zl, null, this.acz); }; AnchoredRadialSeries.prototype.ix = function (a, b, c, d, e) { if (this.acz == null) { return Number.POSITIVE_INFINITY; } return this.iy(a, b, this.zl, d, e, this.acz.count, null); }; AnchoredRadialSeries.prototype.je = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.ada(this.zl, this.cw.ca, this.cw.b9, d); var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.zl.dn, d); f.c = this.dc.za; var g = this.acz; if (this.ac4 && typeCast(FastItemCoalescingColumn.$, g) !== null && this.zl.ds) { g = new FastItemCoalescingColumn(this.zl, g.c, false); } return this.jg(g, a, this.zl, f, e, null, b, c); }; AnchoredRadialSeries.prototype.wx = function (a, b, c) { if (this.zr == null || this.zl == null || this.cw == null || this.cw.ca.isEmpty || this.cw.b9.isEmpty) { return { $type: Point_$type, x: NaN, y: NaN }; } var d = this.getEffectiveViewport1(this.cw); var e = new ScalerParams(0, this.cw.ca, this.cw.b9, this.zr.dn, d); e.c = this.getEffectiveViewport1(this.cw); var f = this.je(a, b, c); f = this.zr.f7(f, e); var g = this.zs.c(a, this.cw.ca, this.cw.b9, d); if (!b && this.zl != null) { var h = this.kk(a, c); var i = this.ki(a, c); var j = this.ada(this.zl, this.cw.ca, this.cw.b9, d); var k = new ScalerParams(0, this.cw.ca, this.cw.b9, this.zl.dn, d); k.c = this.dc.za; var l = this.ix(a, h, this.zl, k, j); var m = this.ix(a, i, this.zl, k, j); if (this.zl.ds) { if (m <= l) { j = this.ac9(i, this.zl, this.cw.ca, this.cw.b9, d); if (isNaN_(j)) { j = 0; } g = this.zl.f7(i, k) + j; } else { j = this.ac9(h, this.zl, this.cw.ca, this.cw.b9, d); if (isNaN_(j)) { j = 0; } g = this.zl.f7(h, k) + j; } } else { if (m <= l) { g = this.zl.f7(i, k) + j; } else { g = this.zl.f7(h, k) + j; } } } var n = this.zs.d(g, f, this.cw.ca, this.cw.b9, this.cw.getEffectiveViewport()); var o = this.zs.e(g, f, this.cw.ca, this.cw.b9, this.cw.getEffectiveViewport()); return { $type: Point_$type, x: n, y: o }; }; AnchoredRadialSeries.prototype.gi = function () { return this.highlightedItemsSource != null || this.adg != null; }; AnchoredRadialSeries.prototype.h0 = function () { var a = _super.prototype.h0.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.adu)); a.add(b); } return a; }; AnchoredRadialSeries.prototype.adu = function (a, b) { if (this.adg != null) { b.value = this.adg; return; } b.value = this.ado; }; Object.defineProperty(AnchoredRadialSeries.prototype, "acz", { get: function () { return this.acy; }, set: function (a) { if (this.acy != a) { var b = this.acy; this.acy = a; this.raisePropertyChanged("ValueColumn", b, this.acy); } }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.getDataLegendSeriesContextAt = function (a, b) { var c = new DataLegendSeriesValueInfo(); c.a = 0; this.ac4 = true; c.l = this.je({ $type: Point_$type, x: a, y: b }, false, false); this.ac4 = false; c.q = "Value"; c.r = this.ado != null ? this.ado : "Value"; c.s = this.adk != null ? this.adk : "V:"; c.t = this.adm != null ? this.adm : ""; var d = new DataLegendSeriesContext(); d.e = ((function () { var $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(c); return $ret; })()); d.h = this.mo(); return d; }; Object.defineProperty(AnchoredRadialSeries.prototype, "aeb", { get: function () { return this.c(AnchoredRadialSeries.ady); }, set: function (a) { this.h(AnchoredRadialSeries.ady, a); }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.ay = function (a) { if (a != null && a == this.zl && this.acz != null && this.acz.count > 0) { return new AxisRange(0, this.acz.count - 1); } if (a != null && a == this.zr && this.acz != null && this.acz.count > 0) { return new AxisRange(this.acz.minimum, this.acz.maximum); } return null; }; AnchoredRadialSeries.prototype.aau = function (a, b) { if (this.ac8) { var c = this.acz.c; if (a < 0) { return _super.prototype.aau.call(this, a, b); } if (a > c.count - 1) { if (typeCast(ProportionalCategoryAngleAxis.$, this.zl) !== null) { var d = this.acz; return d.f; } return _super.prototype.aau.call(this, a, b); } return c.item(a); } else { return _super.prototype.aau.call(this, a, b); } }; AnchoredRadialSeries.prototype.dl = function (a) { var b = _super.prototype.dl.call(this, a); this.ac0 = false; if (this.zl != null && this.zl.ds) { this.ac0 = true; b = new FastItemCoalescingColumn(this.zl, b, this.ac8); } return b; }; AnchoredRadialSeries.prototype.ads = function (a, b) { if (this.ac0) { var c = b; var d = c.c; a.deregisterColumn(d); } else { a.deregisterColumn(b); } }; AnchoredRadialSeries.prototype.rr = function (a, b, c, d) { _super.prototype.rr.call(this, a, b, c, d); if (this.act.df.g$e(a, b, c, d)) { this.r9(false); this.q1(); } var e = typeCast(NumericAxisBase.$, this.zr); switch (b) { case AnchoredRadialSeries.$$p[2]: case AnchoredRadialSeries.$$p[3]: this.qv(); break; case AnchoredRadialSeries.$$p[1]: case RadialBase.$$p[0]: if (this.acz != null) { this.ads(this.dp, this.acz); this.acz = this.dl(this.ado); } break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) !== null) { this.ads(c, this.acz); this.acz = null; } if (typeCast(IFastItemsSource_$type, d) !== null) { this.acz = this.dl(this.ado); this.act.da.e(this.il); } if (e != null && !e.ee()) { this.act.da.e(this.il); this.r9(this.gn && c != null); } break; case AnchoredRadialSeries.$$p[4]: if (this.dp != null) { this.ads(this.dp, this.acz); this.acz = this.dl(this.ado); } break; case "ValueColumn": if (e != null && !e.ee()) { this.act.da.e(this.il); this.r9(this.gn && this.d9); } break; case "TrendLineBrush": this.rx(b); break; case "TrendLineType": this.q1(); break; } }; AnchoredRadialSeries.prototype.pp = function (a, b, c, d) { var e_1, _a; _super.prototype.pp.call(this, a, b, c, d); switch (a) { case 4: case 1: case 0: this.act.da.e(this.il); break; } this.act.df.g$i(a, b, c, d); if (this.act.aa.count > 0) { try { for (var _b = __values(fromEnum(this.act.aa)), _c = _b.next(); !_c.done; _c = _b.next()) { var e = _c.value; e.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; } } } switch (a) { case 4: if (this.zr != null && !this.zr.ee()) { this.r9(true); } break; case 1: if (this.zr != null && !this.zr.ee()) { this.r9(true); } break; case 0: if (this.zr != null && !this.zr.ee()) { this.r9(true); } break; case 2: if (this.ado != null && this.act.da.b > 0 && this.zr != null && !this.zr.ee()) { this.r9(true); } break; case 3: if (d == this.ado) { if (this.zr != null && !this.zr.ee()) { this.r9(true); } } break; } }; AnchoredRadialSeries.prototype.hl = function (a, b, c) { var d = _super.prototype.hl.call(this, a, b, c); var e = c; if (this.dp == null || this.dp.count == 0 || this.zl == null || this.acz == null || this.zl.qc == 0 || this.zr == null || isInfinity(this.zr.qy) || isInfinity(this.zr.qx) || e.da.b < 1) { d = false; } return d; }; AnchoredRadialSeries.prototype.getOffsetValue = function () { return this.ada(this.zl, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); }; AnchoredRadialSeries.prototype.getCategoryWidth = function () { return this.zl.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); }; AnchoredRadialSeries.prototype.get_ac5 = function () { return false; }; Object.defineProperty(AnchoredRadialSeries.prototype, "ac5", { get: function () { return this.get_ac5(); }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.get_em = function () { return true; }; AnchoredRadialSeries.prototype.get_gc = function () { return this.zr != null && this.zr.dn; }; AnchoredRadialSeries.prototype.ada = 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.aat(), b, c, d); break; } if (a.dn) { e = -e; } return e; }; AnchoredRadialSeries.prototype.ac9 = 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.r4(a, c, d, e); break; case 2: f = b.r3(a, this.aat(), c, d, e); break; } if (b.dn) { f = -f; } return f; }; AnchoredRadialSeries.prototype.adt = function (a, b, c, d) { var _this = this; if (d == 0) { this.qj(a, b, c); return; } var e = this.cw.ca; var f = this.cw.b9; var g = this.getEffectiveViewport1(this.cw); var h = this.dc.y0(this.xe, this.getEffectiveViewport(), e); var i = this.zr.pz(f, e, g, h); var j = this.zl != null && this.zl.ds; var k = new CollisionRect(0, this.dc.yx(a)); var _loop_1 = function (l) { var m = typeCast(RadialBaseView.$, this_1.cw); var n = m.da.getBucket(l); var o = this_1.ada(this_1.zl, e, f, g); if (j) { o = this_1.ac9(l, this_1.zl, e, f, g); if (isNaN_(o)) { o = 0; } } n[0] = this_1.zl.getScaledAngle(n[0]) + o; var p = Math.min(this_1.zs.b.to(n[2]), i.maxLength); var q = this_1.zs.d(n[0], p, e, f, g); var r = this_1.zs.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_ac7 = function () { return false; }; Object.defineProperty(AnchoredRadialSeries.prototype, "ac7", { get: function () { return this.get_ac7(); }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.get_ac1 = function () { return false; }; Object.defineProperty(AnchoredRadialSeries.prototype, "ac1", { get: function () { return this.get_ac1(); }, enumerable: false, configurable: true }); AnchoredRadialSeries.prototype.abw = function (a, b) { var _this = this; var c = b.ca; var d = b.b9; var e = this.getEffectiveViewport1(b); var f = this.zl; var g = this.zr; var h = g.qy; var i = g.qx; a.k.clear(); a.s.clear(); a.v.clear(); var j = this.x2(); var k = 0; var l = b; var m = f.ds; var n = new CollisionAvoider(); var o = 0; var p = 0; var q = b.da.d; o = this.ada(f, c, d, e); l.df.k = this.zr.ti; l.df.j = this.zr.th; l.df.l = function (r, s) { return _this.adb(r, s, c, d, e); }; l.df.m = function (r, s) { return _this.adc(r, s, c, d, e); }; var r = ((function () { var $ret = new Clipper(0, d, false); $ret.i = a.v; return $ret; })()); var s = ((function () { var $ret = new TrendResolutionParams(); $ret.e = b.da.b; $ret.f = b.da.c; $ret.g = q; $ret.a = o; $ret.d = _this.il; $ret.i = d; $ret.h = e; $ret.j = c; return $ret; })()); l.df.n(a.v, this.acx, this.acz, this.ade, function (t) { return _this.zl.getScaledAngle(t); }, function (t) { return _this.zr.to(t); }, s, r); a.i.clear(); for (var t = 0; t < b.aa.count; t++) { a.i.add(new List$1(Point_$type, 0)); var u = b.aa._inner[t]; u.k = this.zr.ti; u.j = this.zr.th; u.l = function (v, w) { return _this.adb(v, w, c, d, e); }; u.m = function (v, w) { return _this.adc(v, w, c, d, e); }; u.n(a.i._inner[t], u.g$b, this.acz, u.g$f, function (v) { return _this.zl.getScaledAngle(v); }, function (v) { return _this.zr.to(v); }, s, r); } var v = true; if (this.ac6(b)) { q--; } for (var w = b.da.c; w <= q; ++w) { var x = w; if (x * b.da.b >= this.zl.qc) { x -= intDivide((this.zl.qc), b.da.b); } var y = b.da.getBucket(x); p = 0; if (m) { p = this.aal(x, c, d, e); } y[3] = p; if (!isNaN_(y[0])) { var z = false; if (m) { o = this.ac9(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.ac7) { if (y[1] > i && this.ac1) { } else { z = true; } } else { if (y[1] > i && this.ac1) { } else { continue; } } } if (z) { y[1] = NaN; y[2] = NaN; } y[1] = g.to(y[1]); if (b.da.b > 1) { if (y[2] < h || y[2] > i) { continue; } y[2] = g.to(y[2]); } else { y[2] = y[1]; } if ((isNaN_(y[1]) || isNaN_(y[2])) && v && this.ac5 && this.ac3()) { q++; } else { v = false; } a.k.add(y); if (j) { var aa = Math.min(x * b.da.b, this.dp.count - 1); var ab = false; if (this.zl.ds) { var ac = this.zl; var ad = ac.hasOthersCategory && (x * b.da.b) == this.zl.qc - 1; ab = ad; } var ae = this.zs.d(y[0], y[1], c, d, e); var af = this.zs.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.s.add({ $type: Point_$type, x: y[0], y: y[1] }); var ah = b.db.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.zl; ah.content.item = this.zl.to(true); } ++k; } } } else { if (v && this.ac5 && this.ac3()) { q++; } } } b.db.count = k; return; }; AnchoredRadialSeries.prototype.adb = function (a, b, c, d, e) { return this.zs.d(a, b, c, d, e); }; AnchoredRadialSeries.prototype.adc = function (a, b, c, d, e) { return this.zs.e(a, b, c, d, e); }; AnchoredRadialSeries.prototype.ac6 = function (a) { var b = a; return !this.ac5 && b.da.c == 0 && b.da.d == this.zl.qc; }; AnchoredRadialSeries.prototype.acs = function (a, b, c) { var d = null; var e = c.ca; var f = c.b9; 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.adx = function (a, b, c, d, e) { if (a.count > 0 && d.count > 0) { if (!e || this.ac2()) { a.add(this.aef); a.add(a._inner[0]); d.add(this.aef); d.add(d._inner[0]); } } }; AnchoredRadialSeries.prototype.ac3 = function () { return !this.ac2(); }; AnchoredRadialSeries.prototype.ac2 = function () { var a = this.cw.ca; return !a.containsPoint({ $type: Point_$type, x: 0.5, y: 0.5 }); }; AnchoredRadialSeries.prototype.pj = function (a, b) { _super.prototype.pj.call(this, a, b); var c = b; if (a) { c.db.clear(); } c.df.g$h(); }; AnchoredRadialSeries.prototype.abz = function (a, b) { this.re(); var c = b.ca; var d = b.b9; var e = this.getEffectiveViewport1(b); var f = this.w5(b); var g = b; g.df.g$k(a.v); for (var h = 0; h < b.aa.count; h++) { var i = b.aa._inner[h]; i.g$k(a.i._inner[h]); } var j = new List$1(Point_$type, 0); for (var k = 0; k < a.s.count; k++) { var l = a.s._inner[k]; var m = this.zs.d(l.x, l.y, c, d, e); var n = this.zs.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.db, this.x4); this.adr(b, a); g.c4(); this.adq(d, c, e, f, g); }; AnchoredRadialSeries.prototype.acr = function (a, b, c) { if (b < a || a < 0 || a > this.acz.count || b < 0 || b > this.acz.count || c == null) { return null; } var d = new Array((b - a) + 1); var e = c.dw; 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.adv = 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.z0.a3(this.z0.d, d.dw, a, b, c, d, e, f, true); this.z0.aa(this.ij); var k = this.z0.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.v9(k.z); var t = this.wa(k.z); this.z0.ag = s; this.z0.ah = t; k.aa = s; k.ab = t; } if (g && this.dc != null) { l = this.dc.d7.getHighlightingInfo(this, o, k.z, k.y, true); if (this.dc.d7.isCrossContextHighlight(this)) { p = this.dc.d7.getHighlightingInfo(this, o, k.z, k.y, true); } k.c = l; } if (h && this.dc != null) { m = this.dc.d8.getHighlightingInfo(this, o, k.z, k.y, true); if (m == null && this.bo != null) { m = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, true); } if (this.dc.d8.isCrossContextHighlight(this)) { q = this.dc.d8.getHighlightingInfo(this, o, k.z, k.y, true); } k.d = m; } if (i && this.dc != null) { n = this.dc.d6.getHighlightingInfo(this, o, k.z, k.y, true); if (this.dc.d6.isCrossContextHighlight(this)) { r = this.dc.d6.getHighlightingInfo(this, o, k.z, k.y, true); } k.b = n; } k.h = f; this.abx(k); this.z0.y(this, l, m, n, f, g, h, i, k.v, this.dc.d7.totalHighWaterMark, k.x, this.dc.d8.totalHighWaterMark, k.t, this.dc.d6.totalHighWaterMark); }; AnchoredRadialSeries.prototype.adw = 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.z0.a3(this.z0.b, d.dw, a, b, c, d, e, f, false); this.z0.ab(this.ij); var k = this.z0.ay; var l = null; var m = null; var n = null; var o = this.dp; if (j && this.dc != null && !k.e) { var p = this.v8(k.z); var q = this.wb(k.z); this.z0.ag = p; this.z0.ah = q; k.aa = p; k.ab = q; } if (g && this.dc != null) { l = this.dc.d7.getHighlightingInfo(this, o, k.z, k.y, false); k.c = l; } if (h && this.dc != null) { m = this.dc.d8.getHighlightingInfo(this, o, k.z, k.y, false); if (m == null && this.bo != null) { m = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, false); } k.d = m; } k.h = f; this.aby(k); this.z0.z(this, l, m, n, f, g, h, i, b < 0); }; AnchoredRadialSeries.prototype.adr = function (a, b) { a.ck = true; this.z0.a1(this, this.aag(), runOn(this, this.y9), this.aar(a), this.aas(a)); var c = this.z0.d; var d = c != null; var e = this.zl; if (e == null) { return; } var f = this.getEffectiveViewport1(a); var g = new ScalerParams(0, a.ca, a.b9, e.dn, f); var h = this.dp == null ? 0 : this.dp.count; var i = a; var j = b.k; var k = i.da.c; var l = i.da.d; var m = i.da.b; var n = k * m; for (var o = 0; o < a.db.count; o++) { var p = a.db.item(o); var q = p.content; if (d) { var r = p.al; this.adv(j, r, h, e, g, a.t); } this.z0.ac(p, q); } }; AnchoredRadialSeries.prototype.adq = function (a, b, c, d, e) { e.dg(a, b, c, d); }; AnchoredRadialSeries.prototype.s0 = function () { _super.prototype.s0.call(this); if (this.index < 0) { return; } this.act.dh(); }; AnchoredRadialSeries.prototype.k7 = function (a, b) { if (a == this.act.df.g$n) { return null; } return _super.prototype.k7.call(this, a, b); }; AnchoredRadialSeries.prototype.gk = 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.zl == null || this.acz == null || this.zr == null) { return false; } if (d < 0 || d > this.acz.count - 1) { return false; } var e = this.zl.getScaledAngle(d); var f = this.zr.to(this.acz.item(d)); if (isNaN_(f)) { f = (this.zr.th + this.zr.ti) / 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.sb = function (a, b) { _super.prototype.sb.call(this, a, b); if (!this.g7) { this.cw.be(b); return; } this.cw.be(b); var c = typeCast(AnchoredRadialSeriesView.$, this.cv); c.da.e(this.il); if (this.d7(this.cv)) { return; } this.sc(); this.g7 = false; }; AnchoredRadialSeries.prototype.sc = function () { _super.prototype.sc.call(this); var a = typeCast(AnchoredRadialSeriesView.$, this.cv); if (!this.gz) { this.acw = new RadialFrame(3); this.abw(this.acw, a); } this.gz = false; this.abz(this.acw, a); }; AnchoredRadialSeries.prototype.r8 = function (a, b, c, d, e) { _super.prototype.r8.call(this, a, b, c, d, e); var f = this.ba.a$k.item(d); var g = f; g.da.e(this.il); f.bd(c); if (this.d7(g)) { return; } if (this.acv == null) { this.acv = new RadialFrame(3); } this.acv.aa(); this.abw(this.acv, g); this.abz(this.acv, g); }; AnchoredRadialSeries.prototype.qe = function (a) { _super.prototype.qe.call(this, a); this.bc.exportTrendlineData(this, a, this.act.df.g$n); }; AnchoredRadialSeries.prototype.fm = function (a) { if (this.zl.ds && this.zl.hasOthersCategory && this.zl.othersIndex == a) { return true; } return _super.prototype.fm.call(this, a); }; AnchoredRadialSeries.prototype.bd = function () { return new RadialTrendLineManager(); }; AnchoredRadialSeries.$t = markType(AnchoredRadialSeries, 'AnchoredRadialSeries', RadialBase.$); AnchoredRadialSeries.ady = 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:adg:adz', [2, null], 'UseCategoryNormalizedValues:ac8:ad7', [0, false], 'ValueMemberAsLegendLabel:adk:ad8', [2, null], 'ValueMemberAsLegendUnit:adm:ad9', [2, null], 'ValueMemberPath:ado:aea', [2, null], 'TrendLineType:acx:ad5', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness:add:ad4', [1, 1.5], 'TrendLinePeriod:ade:ad3', [1, 7], 'TrendLineZIndex:adf:ad6', [1, 1], 'TrendLineBrush:aec:ad0', [Brush.$, null], 'TrendLineDashArray:aed:ad1', [DoubleCollection.$], 'TrendLineDashCap:aee:ad2', [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.de = null; _this.df = null; _this.da = new AnchoredRadialBucketCalculator(_this); _this.de = a; _this.df = new RadialTrendLineManager(); return _this; } AnchoredRadialSeriesView.prototype.dg = function (a, b, c, d) { }; AnchoredRadialSeriesView.prototype.dh = function () { this.de.aeb = null; if (this.de.aec != null) { this.de.aeb = this.de.aec; } else { this.de.aeb = this.de.vu; } }; AnchoredRadialSeriesView.prototype.bi = function (a, b) { if (a.d) { if (!b) { } if (this.de.acx != 0 && !b) { var c = this.df.g$n; c.ad = this.de.add; c._stroke = this.de.aeb; c.ai = this.de.aed; c.aj = this.de.aee; a.v(c); } } _super.prototype.bi.call(this, a, b); }; AnchoredRadialSeriesView.prototype.getDefaultTooltipTemplate = function () { var a = "<div class='ui-chart-default-tooltip-content'>"; if (this.de.zl.hz != null) { a += "<span>${item." + this.de.zl.hz + "}</span><br/>"; } a += "<span"; var b = this.f.ba.a$v(this.f); if (!stringIsNullOrEmpty(b)) { a += " style='color:" + b + "'"; } a += ">" + this.de.title + ": </span><span class='ui-priority-primary'>" + "${item." + this.de.ado + "}</span></div>"; return a; }; AnchoredRadialSeriesView.$t = markType(AnchoredRadialSeriesView, 'AnchoredRadialSeriesView', RadialBaseView.$); return AnchoredRadialSeriesView; }(RadialBaseView)); export { AnchoredRadialSeriesView };