UNPKG

igniteui-angular-charts

Version:

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

1,470 lines (1,469 loc) 73.4 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 { AnnotationLayer } from "./AnnotationLayer"; import { Axis } from "./Axis"; import { DependencyProperty } from "igniteui-angular-core"; import { DataToolTipLayerGroupingMode_$type } from "igniteui-angular-core"; import { Series } from "./Series"; import { Rect } from "igniteui-angular-core"; import { Base, enumGetBox, EnumUtil, fromEnum, typeCast, String_$type, typeGetValue, Point_$type, Array_$type, markType, markDep, runOn, TypeRegistrar } from "igniteui-angular-core"; import { Size } from "igniteui-angular-core"; import { RectUtil } from "igniteui-angular-core"; import { DataTooltipGroupedPositionX_$type } from "igniteui-angular-core"; import { DataTooltipGroupedPositionY_$type } from "igniteui-angular-core"; import { DataAbbreviationMode_$type } from "igniteui-angular-core"; import { DataLegendValueMode_$type } from "igniteui-angular-core"; import { Thickness } from "igniteui-angular-core"; import { Brush } from "igniteui-angular-core"; import { DataLegendHeaderDateMode_$type } from "igniteui-angular-core"; import { DataLegendHeaderTimeMode_$type } from "igniteui-angular-core"; import { DataLegendSummaryType_$type } from "igniteui-angular-core"; import { LegendItemBadgeShape_$type } from "igniteui-angular-core"; import { DataLegendLayoutMode_$type } from "igniteui-angular-core"; import { DataLegendUnitsMode_$type } from "igniteui-angular-core"; import { DataLegendLabelMode_$type } from "igniteui-angular-core"; import { DataToolTipLayerFrame } from "./DataToolTipLayerFrame"; import { Dictionary$2 } from "igniteui-angular-core"; import { List$1 } from "igniteui-angular-core"; import { Pool$1 } from "igniteui-angular-core"; import { DataToolTipSeriesInfo } from "./DataToolTipSeriesInfo"; import { DataContext } from "igniteui-angular-core"; import { DataTooltipCollisionInfo } from "./DataTooltipCollisionInfo"; import { DeviceUtils } from "igniteui-angular-core"; import { HashSet$1 } from "igniteui-angular-core"; import { PropertyMetadata } from "igniteui-angular-core"; import { isNaN_ } from "igniteui-angular-core"; import { stringEmpty } from "igniteui-angular-core"; import { AnnotationLayerView } from "./AnnotationLayerView"; import { PointerTooltip } from "./PointerTooltip"; import { IOnDemandRender_$type } from "igniteui-angular-core"; /** * @hidden */ var DataToolTipLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(DataToolTipLayer, _super); function DataToolTipLayer() { var _this = _super.call(this) || this; _this.aam = 1; _this.abr = new Dictionary$2(String_$type, Base.$, 0); _this.abs = new List$1(String_$type, 0); _this.aae = 8; _this.aai = 11; _this.aa2 = null; _this.aau = null; _this.aat = null; _this.aax = null; _this.aaz = null; _this.aaw = null; _this.aay = null; _this.aa1 = null; _this.aa0 = null; _this.aav = null; var a = new DataToolTipLayerFrame(); var b = new DataToolTipLayerFrame(); var c = new DataToolTipLayerFrame(); _this.xb = a; _this.xa = b; _this.xc = c; _this.ab = DataToolTipLayer.$; return _this; } DataToolTipLayer.prototype.bj = function () { return new DataToolTipLayer(); }; DataToolTipLayer.prototype.get_er = function () { return true; }; DataToolTipLayer.prototype.cs = function () { return new DataToolTipLayerView(this); }; DataToolTipLayer.prototype.q0 = function (a) { _super.prototype.q0.call(this, a); this.aaq = a; }; DataToolTipLayer.prototype.get_e2 = function () { return true; }; Object.defineProperty(DataToolTipLayer.prototype, "aan", { get: function () { return this.aam; }, set: function (a) { var b = this.aam; this.aam = a; if (b != this.aam) { this.raisePropertyChanged("ActualGroupingMode", enumGetBox(DataToolTipLayerGroupingMode_$type, b), enumGetBox(DataToolTipLayerGroupingMode_$type, this.aam)); } }, enumerable: false, configurable: true }); DataToolTipLayer.prototype.aap = function () { var e_1, _a; var a = true; var b = true; var c = true; var d = true; if (this.aao != 0) { return this.aao; } var e = this.z4(); if (e != null) { try { for (var _b = __values(fromEnum(e.db())), _c = _b.next(); !_c.done; _c = _b.next()) { var f = _c.value; if (!f.es && !f.fv) { a = false; } if (!f.es && !f.fo) { b = false; } if (!f.es && !f.fw) { c = false; } if (!f.es && !f.fs) { d = false; } } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_1) throw e_1.error; } } } if (a || b || c || d) { return 2; } return 1; }; DataToolTipLayer.prototype.q8 = function (a, b, c, d) { _super.prototype.q8.call(this, a, b, c, d); switch (b) { case DataToolTipLayer.$$p[42]: this.rq(true); break; case DataToolTipLayer.$$p[49]: this.rq(true); break; case DataToolTipLayer.$$p[12]: this.aan = this.aap(); break; case "ActualGroupingMode": this.rq(true); break; case DataToolTipLayer.$$p[10]: this.aaf = this.aah(); break; case DataToolTipLayer.$$p[11]: this.aaj = this.aal(); break; case "SeriesViewer": this.aaq.cl(); break; case DataToolTipLayer.$$p[31]: case DataToolTipLayer.$$p[24]: case DataToolTipLayer.$$p[5]: case DataToolTipLayer.$$p[23]: case DataToolTipLayer.$$p[4]: case DataToolTipLayer.$$p[28]: case DataToolTipLayer.$$p[50]: case DataToolTipLayer.$$p[52]: case DataToolTipLayer.$$p[53]: case DataToolTipLayer.$$p[54]: case DataToolTipLayer.$$p[51]: case DataToolTipLayer.$$p[57]: case DataToolTipLayer.$$p[56]: case DataToolTipLayer.$$p[55]: case DataToolTipLayer.$$p[58]: case DataToolTipLayer.$$p[59]: case DataToolTipLayer.$$p[63]: case DataToolTipLayer.$$p[62]: case DataToolTipLayer.$$p[61]: case DataToolTipLayer.$$p[60]: case "ValueTextStyle": case DataToolTipLayer.$$p[16]: case DataToolTipLayer.$$p[15]: case DataToolTipLayer.$$p[13]: case DataToolTipLayer.$$p[14]: case DataToolTipLayer.$$p[17]: case DataToolTipLayer.$$p[22]: case DataToolTipLayer.$$p[20]: case DataToolTipLayer.$$p[21]: case DataToolTipLayer.$$p[18]: case DataToolTipLayer.$$p[19]: case "HeaderTextStyle": case DataToolTipLayer.$$p[8]: case DataToolTipLayer.$$p[9]: case DataToolTipLayer.$$p[6]: case DataToolTipLayer.$$p[7]: case "GroupTextStyle": case DataToolTipLayer.$$p[35]: case "SummaryTitleTextStyle": case DataToolTipLayer.$$p[38]: case DataToolTipLayer.$$p[37]: case DataToolTipLayer.$$p[36]: case DataToolTipLayer.$$p[34]: case DataToolTipLayer.$$p[41]: case "SummaryValueTextStyle": case DataToolTipLayer.$$p[33]: case DataToolTipLayer.$$p[32]: case "SummaryLabelTextStyle": case DataToolTipLayer.$$p[40]: case DataToolTipLayer.$$p[39]: case "SummaryUnitsTextStyle": case DataToolTipLayer.$$p[0]: case DataToolTipLayer.$$p[1]: case DataToolTipLayer.$$p[45]: case DataToolTipLayer.$$p[48]: case DataToolTipLayer.$$p[46]: case DataToolTipLayer.$$p[47]: case "UnitsTextStyle": case DataToolTipLayer.$$p[44]: case DataToolTipLayer.$$p[43]: case "TitleTextStyle": case DataToolTipLayer.$$p[25]: case DataToolTipLayer.$$p[26]: case DataToolTipLayer.$$p[27]: case "LabelTextStyle": this.aff(b, c, d); break; } }; DataToolTipLayer.prototype.aff = function (a, b, c) { if (!this.abr.containsKey(a)) { this.abs.add(a); this.abr.addItem(a, c); } else { this.abr.item(a, c); } this.rq(true); }; DataToolTipLayer.prototype.afj = function (a, b) { switch (a) { case DataToolTipLayer.$$p[12]: this.aao = EnumUtil.getEnumValue(DataToolTipLayerGroupingMode_$type, b); break; case DataToolTipLayer.$$p[29]: this.abw = b; break; case DataToolTipLayer.$$p[30]: this.abx = b; break; case DataToolTipLayer.$$p[2]: this.abu = b; break; case DataToolTipLayer.$$p[3]: this.abv = b; break; case DataToolTipLayer.$$p[10]: this.aag = EnumUtil.getEnumValue(DataTooltipGroupedPositionX_$type, b); break; case DataToolTipLayer.$$p[11]: this.aak = EnumUtil.getEnumValue(DataTooltipGroupedPositionY_$type, b); break; case DataToolTipLayer.$$p[31]: this.abm = b; break; case DataToolTipLayer.$$p[24]: this.z2 = b; break; case DataToolTipLayer.$$p[5]: this.zx = b; break; case DataToolTipLayer.$$p[23]: this.z1 = b; break; case DataToolTipLayer.$$p[4]: this.zw = b; break; case DataToolTipLayer.$$p[50]: this.z6 = EnumUtil.getEnumValue(DataAbbreviationMode_$type, b); break; case DataToolTipLayer.$$p[52]: this.acw = typeGetValue(b); break; case DataToolTipLayer.$$p[53]: this.acx = typeGetValue(b); break; case DataToolTipLayer.$$p[54]: this.aad = EnumUtil.getEnumValue(DataLegendValueMode_$type, b); break; case DataToolTipLayer.$$p[51]: this.aex = b; break; case DataToolTipLayer.$$p[57]: this.abo = b; break; case DataToolTipLayer.$$p[56]: this.ae3 = b; break; case DataToolTipLayer.$$p[55]: this.z3 = b; break; case DataToolTipLayer.$$p[58]: this.ah2 = b; break; case DataToolTipLayer.$$p[59]: this.abp = b; break; case DataToolTipLayer.$$p[63]: this.afc = b; break; case DataToolTipLayer.$$p[62]: this.abq = b; break; case DataToolTipLayer.$$p[61]: this.ah3 = b; break; case DataToolTipLayer.$$p[60]: this.ahl = b; break; case "ValueTextStyle": this.abc = b; break; case DataToolTipLayer.$$p[16]: this.adk = b; break; case DataToolTipLayer.$$p[15]: this.z0 = b; break; case DataToolTipLayer.$$p[13]: this.adg = b; break; case DataToolTipLayer.$$p[14]: this.z7 = EnumUtil.getEnumValue(DataLegendHeaderDateMode_$type, b); break; case DataToolTipLayer.$$p[17]: this.z8 = EnumUtil.getEnumValue(DataLegendHeaderTimeMode_$type, b); break; case DataToolTipLayer.$$p[22]: this.adp = b; break; case DataToolTipLayer.$$p[20]: this.ahd = b; break; case DataToolTipLayer.$$p[21]: this.ahw = b; break; case DataToolTipLayer.$$p[18]: this.ahv = b; break; case DataToolTipLayer.$$p[19]: this.abf = b; break; case "HeaderTextStyle": this.aa4 = b; break; case DataToolTipLayer.$$p[28]: this.aaa = EnumUtil.getEnumValue(DataLegendLayoutMode_$type, b); break; case DataToolTipLayer.$$p[8]: this.ahc = b; break; case DataToolTipLayer.$$p[9]: this.ahu = b; break; case DataToolTipLayer.$$p[6]: this.aht = b; break; case DataToolTipLayer.$$p[7]: this.abe = b; break; case "GroupTextStyle": this.aa3 = b; break; case DataToolTipLayer.$$p[35]: this.ahg = b; break; case "SummaryTitleTextStyle": this.aa7 = b; break; case DataToolTipLayer.$$p[38]: this.aab = EnumUtil.getEnumValue(DataLegendSummaryType_$type, b); break; case DataToolTipLayer.$$p[37]: this.ad9 = b; break; case DataToolTipLayer.$$p[36]: this.ahz = b; break; case DataToolTipLayer.$$p[34]: this.ahy = b; break; case DataToolTipLayer.$$p[41]: this.ahi = b; break; case "SummaryValueTextStyle": this.aa9 = b; break; case DataToolTipLayer.$$p[33]: this.ad4 = b; break; case DataToolTipLayer.$$p[32]: this.ahf = b; break; case "SummaryLabelTextStyle": this.aa6 = b; break; case DataToolTipLayer.$$p[40]: this.aef = b; break; case DataToolTipLayer.$$p[39]: this.ahh = b; break; case "SummaryUnitsTextStyle": this.aa8 = b; break; case DataToolTipLayer.$$p[0]: this.ahs = b; break; case DataToolTipLayer.$$p[1]: this.aas = EnumUtil.getEnumValue(LegendItemBadgeShape_$type, b); break; case DataToolTipLayer.$$p[45]: this.aac = EnumUtil.getEnumValue(DataLegendUnitsMode_$type, b); break; case DataToolTipLayer.$$p[48]: this.aeq = b; break; case DataToolTipLayer.$$p[46]: this.ahk = b; break; case DataToolTipLayer.$$p[47]: this.ah1 = b; break; case "UnitsTextStyle": this.abb = b; break; case DataToolTipLayer.$$p[44]: this.ah0 = b; break; case DataToolTipLayer.$$p[43]: this.ahj = b; break; case "TitleTextStyle": this.aba = b; break; case DataToolTipLayer.$$p[25]: this.z9 = EnumUtil.getEnumValue(DataLegendLabelMode_$type, b); break; case DataToolTipLayer.$$p[26]: this.ahe = b; break; case DataToolTipLayer.$$p[27]: this.ahx = b; break; case "LabelTextStyle": this.aa5 = b; break; } }; DataToolTipLayer.prototype.afg = function (a) { for (var b = 0; b < this.abs.count; b++) { var c = this.abs._inner[b]; a.updatePropertyByName(c, this.abr.item(c)); } }; DataToolTipLayer.prototype.yn = function (a, b) { { if (!this.a1.c) { this.rq(b); } } }; DataToolTipLayer.prototype.yo = function (a, b) { if (!this.a1.c) { this.rq(b); } }; DataToolTipLayer.prototype.yq = function (a, b) { var e_2, _a; var _this = this; _super.prototype.yq.call(this, a, b); this.aam = this.aap(); var c = a; var d = this.aaq.b9; var e = this.abn; var f = false; c.m.clear(); c.i.clear(); c.l.clear(); c.g.clear(); c.f.clear(); c.k.clear(); c.j.clear(); c.h.clear(); if (isNaN_(this.zt.x) && isNaN_(this.zt.y)) { d.count = 0; return; } { if (this.aan == 2) { var g_1 = 0; { try { for (var _b = __values(fromEnum(this.db.series)), _c = _b.next(); !_c.done; _c = _b.next()) { var h = _c.value; if (this.xh(h)) { this.afi(h, c, e, f, g_1); g_1++; } if (h.isStacked) { h.p2(function (i) { if (_this.xh(i)) { _this.afi(i, c, e, f, g_1); g_1++; } if (i.eg) { i.p0(function (j) { if (_this.xh(j)) { _this.afi(j, c, e, f, g_1); g_1++; } return true; }); } return true; }); } if (h.eg) { h.p0(function (i) { if (_this.xh(i)) { _this.afi(i, c, e, f, g_1); g_1++; } return true; }); } } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_2) throw e_2.error; } } this.afe(c); } d.count = g_1; } else { var i = this.z4(); var j = this.abt(i); var k = this.aar(i, j, e); this.afh(k, c, e); } } }; DataToolTipLayer.prototype.abt = function (a) { var e_3, _a; var b = new List$1(Series.$, 0); if (a == null) { return b; } try { for (var _b = __values(fromEnum(a.df)), _c = _b.next(); !_c.done; _c = _b.next()) { var c = _c.value; b.add(c); } } catch (e_3_1) { e_3 = { error: e_3_1 }; } finally { try { if (_c && !_c.done && (_a = _b.return)) _a.call(_b); } finally { if (e_3) throw e_3.error; } } return b; }; DataToolTipLayer.prototype.z4 = function () { var e_4, _a, e_5, _b; if (this.z5 != null) { return this.z5; } if (this.db == null) { return null; } try { for (var _c = __values(fromEnum(this.db.series)), _d = _c.next(); !_d.done; _d = _c.next()) { var a = _d.value; if (a.ey) { var b = a.a0(); if (b != null && b.co()) { return b; } } } } catch (e_4_1) { e_4 = { error: e_4_1 }; } finally { try { if (_d && !_d.done && (_a = _c.return)) _a.call(_c); } finally { if (e_4) throw e_4.error; } } try { for (var _e = __values(fromEnum(this.db.series)), _f = _e.next(); !_f.done; _f = _e.next()) { var c = _f.value; if (!c.ey) { var d = c.ai(); var e = d != null && d.length > 0 ? d[0] : null; if (e != null && e.co()) { return e; } } } } catch (e_5_1) { e_5 = { error: e_5_1 }; } finally { try { if (_f && !_f.done && (_b = _e.return)) _b.call(_e); } finally { if (e_5) throw e_5.error; } } return null; }; DataToolTipLayer.prototype.aar = function (a, b, c) { var d = 1.7976931348623157E+308; var e = -1.7976931348623157E+308; var f = new List$1(DataContext.$, 0); var g = new List$1(Base.$, 0); var h = false; var i = true; var j = { $type: Point_$type, x: NaN, y: NaN }; var k = 0; var l = 0; var _loop_1 = function (m) { var n = b.item(m); k = n.db.l; l = n.db.m; if (n.ey) { var o = n; var p_1 = new List$1(Series.$, 0); if (o.isStacked) { o.p2(function (q) { p_1.add(q); if (q.eg) { q.p0(function (r) { p_1.add(r); return true; }); } return true; }); } else if (o.eg) { p_1.add(o); o.p0(function (q) { p_1.add(q); return true; }); } else { p_1.add(o); } for (var q = 0; q < p_1.count; q++) { var r = p_1._inner[q]; var s = p_1._inner[q]; if (s.db == null) { continue; } if (!r.categoryAxis.co()) { continue; } if (i) { h = s.isVertical; } else { if (h != s.isVertical) { continue; } } var t = this_1.yj(s); if (!t.c) { continue; } j = s.v6(t.d); var u = s.wb(t.d, c, false); if (h) { if (!isNaN_(u.y)) { d = Math.min(d, u.y); e = Math.max(e, u.y); } } else { if (!isNaN_(u.x)) { d = Math.min(d, u.x); e = Math.max(e, u.x); } } } } else { var v = n.ai(); for (var w = 0; w < v.length; w++) { if (!v[w].co()) { continue; } } var x = n.wb(this_1.zt, c, false); j = n.v6(this_1.zt); if (h) { if (!isNaN_(x.y)) { d = Math.min(d, x.y); e = Math.max(e, x.y); } } else { if (!isNaN_(x.x)) { d = Math.min(d, x.x); e = Math.max(e, x.x); } } } var y = null; var z = n.km(this_1.zt); if (n.e3 && z != null) { y = n.a3(z); } else { y = new DataContext(); y.item = z; y.series = n; } f.add(y); }; var this_1 = this; for (var m = 0; m < b.count; m++) { _loop_1(m); } var aa = 0; var ab = 0; if (h) { ab = (d + e) / 2; aa = this.wr.right; if (!isNaN_(j.x)) { aa = j.x; } if (ab < 0 || ab > this.wr.bottom) { ab = NaN; } } else { aa = (d + e) / 2; if (!isNaN_(j.y)) { ab = j.y; } if (aa < 0 || aa > this.wr.right) { aa = NaN; } } var ac = new DataToolTipSeriesInfo(); ac.f = { $type: Point_$type, x: aa, y: ab }; ac.e = { $type: Point_$type, x: j.x, y: j.y }; ac.b = f; ac.a = h; return ac; }; DataToolTipLayer.prototype.p6 = function () { this.zt = { $type: Point_$type, x: NaN, y: NaN }; this.rq(false); this.aaq.cj(false); }; DataToolTipLayer.prototype.p7 = function () { this.zt = { $type: Point_$type, x: NaN, y: NaN }; this.rq(false); this.aaq.cj(true); }; Object.defineProperty(DataToolTipLayer.prototype, "ahp", { get: function () { var a = RectUtil.n(this.cv.bx); var b = new Size(1, this.cv.bx.width, this.cv.bx.height); return new Rect(3, a, b); }, enumerable: false, configurable: true }); Object.defineProperty(DataToolTipLayer.prototype, "aho", { get: function () { var a = RectUtil.n(this.cv.bx); var b = new Size(1, this.cv.bx.width, this.cv.bx.height); return new Rect(3, this.aaq.cm(a), b); }, enumerable: false, configurable: true }); Object.defineProperty(DataToolTipLayer.prototype, "ahn", { get: function () { var a = new Rect(0, 0, 0, this.db.m, this.db.l); var b = RectUtil.n(a); var c = new Size(1, a.width, a.height); return new Rect(3, this.aaq.cm(b), c); }, enumerable: false, configurable: true }); Object.defineProperty(DataToolTipLayer.prototype, "ahr", { get: function () { var a = { $type: Point_$type, x: 0, y: 0 }; return new Rect(3, a, this.aaq.cr()); }, enumerable: false, configurable: true }); DataToolTipLayer.prototype.ahq = function () { return this.ahp; }; DataToolTipLayer.prototype.abj = function (a, b, c) { if (Rect.l_op_Equality(a, Rect.empty)) { return false; } var d = a.top; return c < d; }; DataToolTipLayer.prototype.abg = function (a, b, c, d) { if (Rect.l_op_Equality(a, Rect.empty)) { return false; } var e = a.bottom; return c + d.height >= e; }; DataToolTipLayer.prototype.abh = function (a, b, c) { if (Rect.l_op_Equality(a, Rect.empty)) { return false; } var d = a.left; return c < d; }; DataToolTipLayer.prototype.abi = function (a, b, c, d) { if (Rect.l_op_Equality(a, Rect.empty)) { return false; } var e = a.right; return c + d.width > e; }; DataToolTipLayer.prototype.acm = function (a, b) { return a.top + b; }; DataToolTipLayer.prototype.ack = function (a, b, c) { return a.bottom - c.height - b; }; DataToolTipLayer.prototype.acl = function (a, b) { return ((a.bottom + a.top) / 2) - (b.height / 2); }; DataToolTipLayer.prototype.acv = function (a, b, c, d, e) { var f = c.y - d.height - b; return f; }; DataToolTipLayer.prototype.act = function (a, b, c, d, e) { var f = c.y + b; return f; }; DataToolTipLayer.prototype.acu = function (a, b, c, d, e) { var f = c.y - (d.height / 2); return f; }; DataToolTipLayer.prototype.acp = function (a, b, c, d, e) { var f = c.y - d.height; f = f - b; return f; }; DataToolTipLayer.prototype.acn = function (a, b, c, d, e) { var f = c.y; f = f + b; return f; }; DataToolTipLayer.prototype.aco = function (a, b, c, d, e) { var f = c.y - (d.height / 2); return f; }; DataToolTipLayer.prototype.ab5 = function (a, b) { return a.left + b; }; DataToolTipLayer.prototype.ab7 = function (a, b, c) { return (a.right - (c.width)) - b; }; DataToolTipLayer.prototype.ab6 = function (a, b, c) { return ((a.right + a.left) / 2) - (c.width / 2) + b; }; DataToolTipLayer.prototype.ace = function (a, b, c, d, e) { var f = (c.x - d.width) - b; return f; }; DataToolTipLayer.prototype.acg = function (a, b, c, d, e) { var f = c.x + b; return f; }; DataToolTipLayer.prototype.acf = function (a, b, c, d, e) { var f = (c.x - (d.width / 2)); f = f + b; return f; }; DataToolTipLayer.prototype.acb = function (a, b, c, d, e) { var f = c.x - d.width; f = f - b; return f; }; DataToolTipLayer.prototype.acd = function (a, b, c, d, e) { var f = c.x; f = f + b; return f; }; DataToolTipLayer.prototype.acc = function (a, b, c, d, e) { var f = c.x - (d.width / 2); f = f + b; return f; }; DataToolTipLayer.prototype.ab1 = function (a, b, c, d, e, f, g, h) { switch (a) { case 1: { return this.acp(e, b, h, f, true); } case 2: { return this.acn(e, b, h, f, true); } case 3: { return this.aco(e, b, h, f, true); } case 5: return this.acq(e, c, b, h, f); case 6: return this.acr(e, c, b, h, f); case 4: return this.acs(e, c, b, h, f); case 8: return this.ach(e, c, b, h, f); case 9: return this.aci(e, c, b, h, f); case 7: return this.acj(e, c, b, h, f); case 13: return this.acm(d, b); case 14: return this.ack(d, b, f); case 15: return this.acl(d, f); case 10: return this.acv(e, b, g, f, true); case 12: return this.acu(e, b, g, f, true); case 11: default: return this.act(e, b, g, f, true); } }; DataToolTipLayer.prototype.ab8 = function (a, b, c, d, e) { var f = d.x; f = f + b / 2; f = f - e.width; f = f - c; return f; }; DataToolTipLayer.prototype.ab9 = function (a, b, c, d, e) { var f = d.x; f = f + b / 2; f = f - e.width / 2; f = f + c; return f; }; DataToolTipLayer.prototype.aca = function (a, b, c, d, e) { var f = d.x; f = f + b / 2; f = f + c; return f; }; DataToolTipLayer.prototype.ab2 = function (a, b, c, d, e) { var f = d.x; f = f - b / 2; f = f - e.width; f = f - c; return f; }; DataToolTipLayer.prototype.ab3 = function (a, b, c, d, e) { var f = d.x; f = f - b / 2; f = f - e.width / 2; f = f + c; return f; }; DataToolTipLayer.prototype.ab4 = function (a, b, c, d, e) { var f = d.x; f = f - b / 2; f = f + c; return f; }; DataToolTipLayer.prototype.acj = function (a, b, c, d, e) { var f = d.y; f = f + b / 2; f = f - e.height; f = f - c; return f; }; DataToolTipLayer.prototype.aci = function (a, b, c, d, e) { var f = d.y; f = f + b / 2; f = f - e.height / 2; f = f + c; return f; }; DataToolTipLayer.prototype.ach = function (a, b, c, d, e) { var f = d.y; f = f + b / 2; f = f + c; return f; }; DataToolTipLayer.prototype.acs = function (a, b, c, d, e) { var f = d.y; f = f - b / 2; f = f - e.height; f = f - c; return f; }; DataToolTipLayer.prototype.acr = function (a, b, c, d, e) { var f = d.y; f = f - b / 2; f = f - e.height / 2; f = f + c; return f; }; DataToolTipLayer.prototype.acq = function (a, b, c, d, e) { var f = d.y; f = f - b / 2; f = f + c; return f; }; DataToolTipLayer.prototype.ab0 = function (a, b, c, d, e, f, g, h) { switch (a) { case 10: return this.ace(e, b, g, f, true); case 11: return this.acg(e, b, g, f, true); case 12: return this.acf(e, b, g, f, true); case 13: return this.ab5(d, b); case 14: return this.ab7(e, b, f); case 15: return this.ab6(e, b, f); case 5: return this.ab4(e, c, b, h, f); case 6: return this.ab3(e, c, b, h, f); case 4: return this.ab2(e, c, b, h, f); case 8: return this.aca(e, c, b, h, f); case 9: return this.ab9(e, c, b, h, f); case 7: return this.ab8(e, c, b, h, f); case 1: { return this.acb(e, b, h, f, true); } case 3: { return this.acc(e, b, h, f, true); } case 2: default: { return this.acd(e, b, h, f, true); } } }; DataToolTipLayer.prototype.ahm = function (a, b, c, d) { var e = this.aaf; var f = this.aaj; var g = this.z4(); var h = 0; if (g != null && g.cb && this.db != null) { h = g.getCategorySize(this.db.v4, this.wr, this.getEffectiveViewport()); if (g.categoryMode == 0) { h = 0; } } var i = this.aby(e); var j = this.abz(f); var k = this.ab0(e, i, h, this.ahp, a, b, c, d); var l = this.ab1(f, j, h, this.ahp, a, b, c, d); var m = this.abk(a, i, k, b); var n = this.abl(a, j, l, b); if (!m) { var o = this.zy(e); var p = 0; while (!m && p < o.length) { e = o[p]; i = this.aby(e); k = this.ab0(e, i, h, this.ahp, a, b, c, d); m = this.abk(a, i, k, b); p++; } } if (!n) { var q = this.zz(f); var r = 0; while (!n && r < q.length) { f = q[r]; j = this.abz(f); l = this.ab1(f, j, h, this.ahp, a, b, c, d); n = this.abl(a, j, l, b); r++; } } return { $type: Point_$type, x: k, y: l }; }; DataToolTipLayer.prototype.abz = function (a) { if (!isNaN_(this.abx)) { return this.abx; } switch (a) { case 1: return this.abv; case 2: return this.abv; case 3: return 0; case 4: return this.abv; case 5: return this.abv; case 6: return this.abv; case 7: return this.abv; case 8: return this.abv; case 9: return 0; case 10: return this.abv; case 11: return this.abv; case 12: return 0; case 13: return this.abv; case 14: return this.abv; case 15: return 0; } return this.abv; }; DataToolTipLayer.prototype.aby = function (a) { if (!isNaN_(this.abw)) { return this.abw; } switch (a) { case 4: return this.abu; case 6: return 0; case 5: return this.abu; case 13: return this.abu; case 15: return 0; case 14: return this.abu; case 7: return this.abu; case 9: return 0; case 8: return this.abu; case 1: return this.abu; case 3: return 0; case 2: return this.abu; case 10: return this.abu; case 12: return 0; case 11: return this.abu; } return this.abu; }; DataToolTipLayer.prototype.zz = function (a) { var b = [a]; switch (a) { case 1: b = [2, 3, 13, 14]; break; case 2: b = [1, 3, 14, 13]; break; case 3: b = [1, 2]; break; case 4: b = [8, 7, 3, 13, 14]; break; case 5: b = [7, 8, 3, 13, 14]; break; case 6: b = [9, 8, 4, 3]; break; case 7: b = [5, 4, 2, 14, 13]; break; case 8: b = [4, 5, 3, 14, 13]; break; case 9: b = [6, 4, 8, 3]; break; case 10: b = [11, 12, 2, 1, 3, 13, 14]; break; case 11: b = [10, 12, 1, 2, 3, 14, 13]; break; case 12: b = [10, 11]; break; case 13: break; case 14: break; case 15: break; } return b; }; DataToolTipLayer.prototype.zy = function (a) { var b = [a]; switch (a) { case 1: b = [2, 3, 13, 14]; break; case 2: b = [1, 3, 14, 13]; break; case 3: b = [1, 2]; break; case 4: b = [8, 7, 3, 13, 14]; break; case 5: b = [7, 8, 1, 14, 13]; break; case 6: b = [9, 8, 4, 3]; break; case 7: b = [5, 4, 2, 14, 13]; break; case 8: b = [4, 5, 3, 13, 14]; break; case 9: b = [6, 4, 8, 3]; break; case 10: b = [11, 12, 2, 1, 3, 13, 14]; break; case 11: b = [10, 12, 1, 2, 3, 14, 13]; break; case 12: b = [10, 11]; break; case 13: break; case 14: break; case 15: break; } return b; }; DataToolTipLayer.prototype.abk = function (a, b, c, d) { return !(this.abh(a, b, c) || this.abi(a, b, c, d)); }; DataToolTipLayer.prototype.abl = function (a, b, c, d) { return !(this.abj(a, b, c) || this.abg(a, b, c, d)); }; DataToolTipLayer.prototype.afe = function (a) { var b = new List$1(DataTooltipCollisionInfo.$, 0); for (var c = 0; c < a.f.count; c++) { var d = new DataTooltipCollisionInfo(); d.d = c; d.e = { $type: Point_$type, x: a.f._inner[c], y: a.g._inner[c] }; d.c = a.k._inner[c]; d.a = a.j._inner[c]; d.b = a.m._inner[c]; if (isNaN_(d.e.x) || isNaN_(d.e.y)) { continue; } b.add(d); } b.aa(function (e, f) { if (e.e.y < f.e.y) { return -1; } if (e.e.y > f.e.y) { return 1; } if (e.b < f.b) { return -1; } if (e.b > f.b) { return 1; } return 0; }); var e = this.abd(b); if (!e) { return; } for (var f = 0; f < b.count - 1; f++) { var g = b._inner[f]; var h = b._inner[f + 1]; var i = new Rect(0, g.e.x, g.e.y, g.c, g.a); var j = new Rect(0, h.e.x, h.e.y, h.c, h.a); if (i.intersectsWith(j) || i.top > j.bottom) { h.e = { $type: Point_$type, x: h.e.x, y: i.bottom + 1 }; } } if (b._inner[b.count - 1].e.y + b._inner[b.count - 1].a > this.cv.bx.height) { b._inner[b.count - 1].e = { $type: Point_$type, x: b._inner[b.count - 1].e.x, y: b._inner[b.count - 1].e.y - ((b._inner[b.count - 1].e.y + b._inner[b.count - 1].a) - this.cv.bx.height) }; } for (var k = b.count - 1; k >= 1; k--) { var l = b._inner[k]; var m = b._inner[k - 1]; var n = new Rect(0, l.e.x, l.e.y, l.c, l.a); var o = new Rect(0, m.e.x, m.e.y, m.c, m.a); if (n.intersectsWith(o) || n.top < o.bottom) { m.e = { $type: Point_$type, x: m.e.x, y: n.top - (o.height + 1) }; } } for (var p = 0; p < b.count; p++) { var q = b._inner[p].d; var r = b._inner[p]; a.f._inner[q] = r.e.x; a.g._inner[q] = r.e.y; } }; DataToolTipLayer.prototype.abd = function (a) { if (a.count <= 1) { return false; } var b = this.cv.bx; for (var c = 0; c < a.count - 1; c++) { var d = a._inner[c]; var e = a._inner[c + 1]; var f = new Rect(0, d.e.x, d.e.y, d.c, d.a); var g = new Rect(0, e.e.x, e.e.y, e.c, e.a); if (f.intersectsWith(g)) { return true; } } return false; }; DataToolTipLayer.prototype.afi = function (a, b, c, d, e) { var _this = this; var f = this.yj(a); if (!f.c) { return; } var g = a.wb(f.d, c, d); var h = this.aaq.b9; var i = this.zt; if (!c) { i = this.wg(g); } var j = a.km(i); var k = h.item(e); var l = this.cv.bx; var m = this.aaq.b8(k); if (!Base.equalsStatic(m.target, this.db)) { m.target = this.db; } var n = new List$1(String_$type, 0); if (a.eg && this.aan == 2) { a.p0(function (o) { if (_this.xh(o)) { n.add(o.dataLegendKey); } return true; }); } m.includedSeries = [a.dataLegendKey]; m.excludedSeries = n.toArray(); this.afg(m); m.targetCursorPositionX = this.zt.x; m.targetCursorPositionY = this.zt.y; if (!this.aaq.cb(k, a)) { return; } var o = this.aaq.cq(k); b.i.add1(k); var p = g.x; var q = g.x; q = Math.max(q, l.left); q = Math.min(q, l.right); b.l.add(q); var r = g.y; r = Math.max(r, l.top); r = Math.min(r, l.bottom); b.m.add(r); var s = DeviceUtils.g(10); var t = g.x + s; if (t + o.width > l.right) { t = (l.right - o.width) - s; } if (t < l.left) { t = l.left; } b.f.add(t); var u = (g.y - o.height) - s; if (u + o.height > l.bottom) { u = (l.bottom - o.height) - s; } if (u < l.top) { u = l.top; } b.g.add(u); b.k.add(o.width); b.j.add(o.height); var v = this.u8; if (v == null) { v = this.ve; } if (v == null) { v = a.u8; } b.h.add(v); }; DataToolTipLayer.prototype.afh = function (a, b, c) { var e_6, _a; this.aae = this.aah(); this.aai = this.aal(); var d = a.f; var e = a.e; var f = 0; var g = this.aaq.b9.item(0); this.aaq.cb(g, null); var h = this.aaq.b8(g); if (!Base.equalsStatic(h.target, this.db)) { h.target = this.db; } var i = new List$1(String_$type, 0); var j = this.z4(); if (j != null) { try { for (var _b = __values(fromEnum(j.db())), _c = _b.next(); !_c.done; _c = _b.next()) { var k = _c.value; if (k.isStacked) { k.p2(function (l) { i.add(l.dataLegendKey); if (l.eg) { l.p0(function (m) { i.add(m.dataLegendKey); return true; }); } return true; }); } else if (k.eg) { i.add(k.dataLegendKey); k.p0(function (l) { i.add(l.dataLegendKey); return true; }); } else { i.add(k.dataLegendKey);