UNPKG

igniteui-react-charts

Version:

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

1,453 lines (1,452 loc) 68.9 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 { AnnotationLayer } from "./AnnotationLayer"; import { Axis } from "./Axis"; import { DependencyProperty } from "igniteui-react-core"; import { DataToolTipLayerGroupingMode_$type } from "igniteui-react-core"; import { Series } from "./Series"; import { Rect } from "igniteui-react-core"; import { Base, enumGetBox, EnumUtil, fromEnum, typeCast, String_$type, typeGetValue, Point_$type, Array_$type, markType, markDep, runOn, TypeRegistrar } from "igniteui-react-core"; import { Size } from "igniteui-react-core"; import { RectUtil } from "igniteui-react-core"; import { DataTooltipGroupedPositionX_$type } from "igniteui-react-core"; import { DataTooltipGroupedPositionY_$type } from "igniteui-react-core"; import { DataAbbreviationMode_$type } from "igniteui-react-core"; import { DataLegendValueMode_$type } from "igniteui-react-core"; import { Thickness } from "igniteui-react-core"; import { Brush } from "igniteui-react-core"; import { DataLegendHeaderDateMode_$type } from "igniteui-react-core"; import { DataLegendHeaderTimeMode_$type } from "igniteui-react-core"; import { DataLegendSummaryType_$type } from "igniteui-react-core"; import { LegendItemBadgeShape_$type } from "igniteui-react-core"; import { DataLegendLayoutMode_$type } from "igniteui-react-core"; import { DataLegendUnitsMode_$type } from "igniteui-react-core"; import { DataLegendLabelMode_$type } from "igniteui-react-core"; import { DataToolTipLayerFrame } from "./DataToolTipLayerFrame"; import { Dictionary$2 } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { Pool$1 } from "igniteui-react-core"; import { DataToolTipSeriesInfo } from "./DataToolTipSeriesInfo"; import { DataContext } from "igniteui-react-core"; import { DataTooltipCollisionInfo } from "./DataTooltipCollisionInfo"; import { CanvasScalingHelpers } from "igniteui-react-core"; import { DeviceUtils } from "igniteui-react-core"; import { HashSet$1 } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; import { isNaN_ } from "igniteui-react-core"; import { stringEmpty } from "igniteui-react-core"; import { AnnotationLayerView } from "./AnnotationLayerView"; import { PointerTooltip } from "./PointerTooltip"; import { XamDataLegend } from "./XamDataLegend"; import { IOnDemandRender_$type } from "igniteui-react-core"; import { PointerTooltipStyle } from "./PointerTooltipStyle"; import { PointerTooltipUtils } from "./PointerTooltipUtils"; /** * @hidden */ export let DataToolTipLayer = /*@__PURE__*/ (() => { class DataToolTipLayer extends AnnotationLayer { get_f7() { return true; } bk() { return new DataToolTipLayer(); } get_eu() { return true; } constructor() { super(); this.abi = 1; this.acn = new Dictionary$2(String_$type, Base.$, 0); this.aco = new List$1(String_$type, 0); this.aba = 8; this.abe = 11; this.aby = null; this.abq = null; this.abp = null; this.abt = null; this.abv = null; this.abs = null; this.abu = null; this.abx = null; this.abw = null; this.abr = null; let a = new DataToolTipLayerFrame(); let b = new DataToolTipLayerFrame(); let c = new DataToolTipLayerFrame(); this.xx = a; this.xw = b; this.xy = c; this.ab = DataToolTipLayer.$; } ct() { return new DataToolTipLayerView(this); } rh(a) { super.rh(a); this.abm = a; } q7() { super.q7(); this.abm.c1(); } get_e5() { return true; } get abj() { return this.abi; } set abj(a) { let b = this.abi; this.abi = a; if (b != this.abi) { this.raisePropertyChanged("ActualGroupingMode", enumGetBox(DataToolTipLayerGroupingMode_$type, b), enumGetBox(DataToolTipLayerGroupingMode_$type, this.abi)); } } abl() { let a = true; let b = true; let c = true; let d = true; if (this.abk != 0) { return this.abk; } let e = this.aa0(); if (e != null) { for (let f of fromEnum(e.eo())) { if (!f.ev && !f.fz) { a = false; } if (!f.ev && !f.fs) { b = false; } if (!f.ev && !f.f0) { c = false; } if (!f.ev && !f.fw) { d = false; } } } if (a || b || c || d) { return 2; } return 1; } rq(a, b, c, d) { super.rq(a, b, c, d); switch (b) { case DataToolTipLayer.$$p[42]: this.r8(true); break; case DataToolTipLayer.$$p[52]: this.r8(true); break; case DataToolTipLayer.$$p[12]: this.abj = this.abl(); break; case "ActualGroupingMode": this.r8(true); break; case DataToolTipLayer.$$p[10]: this.abb = this.abd(); break; case DataToolTipLayer.$$p[11]: this.abf = this.abh(); break; case "SeriesViewer": this.abm.c2(); 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[53]: case DataToolTipLayer.$$p[55]: case DataToolTipLayer.$$p[56]: case DataToolTipLayer.$$p[57]: case DataToolTipLayer.$$p[54]: case DataToolTipLayer.$$p[60]: case DataToolTipLayer.$$p[59]: case DataToolTipLayer.$$p[58]: case DataToolTipLayer.$$p[61]: case DataToolTipLayer.$$p[62]: case DataToolTipLayer.$$p[66]: case DataToolTipLayer.$$p[65]: case DataToolTipLayer.$$p[64]: case DataToolTipLayer.$$p[63]: 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[48]: case DataToolTipLayer.$$p[51]: case DataToolTipLayer.$$p[49]: case DataToolTipLayer.$$p[50]: 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.agf(b, c, d); break; case DataToolTipLayer.$$p[45]: case DataToolTipLayer.$$p[46]: case DataToolTipLayer.$$p[47]: this.r8(true); break; } } agf(a, b, c) { if (!this.acn.containsKey(a)) { this.aco.add(a); this.acn.addItem(a, c); } else { this.acn.item(a, c); } this.r8(true); } agj(a, b) { switch (a) { case DataToolTipLayer.$$p[12]: this.abk = EnumUtil.getEnumValue(DataToolTipLayerGroupingMode_$type, b); break; case DataToolTipLayer.$$p[29]: this.acs = b; break; case DataToolTipLayer.$$p[30]: this.act = b; break; case DataToolTipLayer.$$p[2]: this.acq = b; break; case DataToolTipLayer.$$p[3]: this.acr = b; break; case DataToolTipLayer.$$p[10]: this.abc = EnumUtil.getEnumValue(DataTooltipGroupedPositionX_$type, b); break; case DataToolTipLayer.$$p[11]: this.abg = EnumUtil.getEnumValue(DataTooltipGroupedPositionY_$type, b); break; case DataToolTipLayer.$$p[31]: this.aci = b; break; case DataToolTipLayer.$$p[24]: this.aay = b; break; case DataToolTipLayer.$$p[5]: this.aat = b; break; case DataToolTipLayer.$$p[23]: this.aax = b; break; case DataToolTipLayer.$$p[4]: this.aas = b; break; case DataToolTipLayer.$$p[53]: this.aa2 = EnumUtil.getEnumValue(DataAbbreviationMode_$type, b); break; case DataToolTipLayer.$$p[55]: this.adt = typeGetValue(b); break; case DataToolTipLayer.$$p[56]: this.adu = typeGetValue(b); break; case DataToolTipLayer.$$p[57]: this.aa9 = EnumUtil.getEnumValue(DataLegendValueMode_$type, b); break; case DataToolTipLayer.$$p[54]: this.afx = b; break; case DataToolTipLayer.$$p[60]: this.ack = b; break; case DataToolTipLayer.$$p[59]: this.af3 = b; break; case DataToolTipLayer.$$p[58]: this.aaz = b; break; case DataToolTipLayer.$$p[61]: this.ai7 = b; break; case DataToolTipLayer.$$p[62]: this.acl = b; break; case DataToolTipLayer.$$p[66]: this.agc = b; break; case DataToolTipLayer.$$p[65]: this.acm = b; break; case DataToolTipLayer.$$p[64]: this.ai8 = b; break; case DataToolTipLayer.$$p[63]: this.aiq = b; break; case "ValueTextStyle": this.ab8 = b; break; case DataToolTipLayer.$$p[16]: this.aeh = b; break; case DataToolTipLayer.$$p[15]: this.aaw = b; break; case DataToolTipLayer.$$p[13]: this.aed = b; break; case DataToolTipLayer.$$p[14]: this.aa3 = EnumUtil.getEnumValue(DataLegendHeaderDateMode_$type, b); break; case DataToolTipLayer.$$p[17]: this.aa4 = EnumUtil.getEnumValue(DataLegendHeaderTimeMode_$type, b); break; case DataToolTipLayer.$$p[22]: this.aem = b; break; case DataToolTipLayer.$$p[20]: this.aig = b; break; case DataToolTipLayer.$$p[21]: this.ai1 = b; break; case DataToolTipLayer.$$p[18]: this.ai0 = b; break; case DataToolTipLayer.$$p[19]: this.acb = b; break; case "HeaderTextStyle": this.ab0 = b; break; case DataToolTipLayer.$$p[28]: this.aa6 = EnumUtil.getEnumValue(DataLegendLayoutMode_$type, b); break; case DataToolTipLayer.$$p[8]: this.aif = b; break; case DataToolTipLayer.$$p[9]: this.aiz = b; break; case DataToolTipLayer.$$p[6]: this.aiy = b; break; case DataToolTipLayer.$$p[7]: this.aca = b; break; case "GroupTextStyle": this.abz = b; break; case DataToolTipLayer.$$p[35]: this.aij = b; break; case "SummaryTitleTextStyle": this.ab3 = b; break; case DataToolTipLayer.$$p[38]: this.aa7 = EnumUtil.getEnumValue(DataLegendSummaryType_$type, b); break; case DataToolTipLayer.$$p[37]: this.ae6 = b; break; case DataToolTipLayer.$$p[36]: this.ai4 = b; break; case DataToolTipLayer.$$p[34]: this.ai3 = b; break; case DataToolTipLayer.$$p[41]: this.ail = b; break; case "SummaryValueTextStyle": this.ab5 = b; break; case DataToolTipLayer.$$p[33]: this.ae1 = b; break; case DataToolTipLayer.$$p[32]: this.aii = b; break; case "SummaryLabelTextStyle": this.ab2 = b; break; case DataToolTipLayer.$$p[40]: this.afc = b; break; case DataToolTipLayer.$$p[39]: this.aik = b; break; case "SummaryUnitsTextStyle": this.ab4 = b; break; case DataToolTipLayer.$$p[0]: this.aix = b; break; case DataToolTipLayer.$$p[1]: this.abo = EnumUtil.getEnumValue(LegendItemBadgeShape_$type, b); break; case DataToolTipLayer.$$p[48]: this.aa8 = EnumUtil.getEnumValue(DataLegendUnitsMode_$type, b); break; case DataToolTipLayer.$$p[51]: this.afq = b; break; case DataToolTipLayer.$$p[49]: this.aip = b; break; case DataToolTipLayer.$$p[50]: this.ai6 = b; break; case "UnitsTextStyle": this.ab7 = b; break; case DataToolTipLayer.$$p[44]: this.ai5 = b; break; case DataToolTipLayer.$$p[43]: this.aim = b; break; case "TitleTextStyle": this.ab6 = b; break; case DataToolTipLayer.$$p[25]: this.aa5 = EnumUtil.getEnumValue(DataLegendLabelMode_$type, b); break; case DataToolTipLayer.$$p[26]: this.aih = b; break; case DataToolTipLayer.$$p[27]: this.ai2 = b; break; case "LabelTextStyle": this.ab1 = b; break; case DataToolTipLayer.$$p[47]: this.acy = b; break; case DataToolTipLayer.$$p[46]: this.aio = b; break; case DataToolTipLayer.$$p[45]: this.ain = b; break; } } agg(a) { for (let b = 0; b < this.aco.count; b++) { let c = this.aco._inner[b]; a.updatePropertyByName(c, this.acn.item(c)); } } zc(a, b) { { if (!this.a1.c) { this.r8(b); } } } zd(a, b) { if (!this.a1.c) { this.r8(b); } } zf(a, b) { super.zf(a, b); this.abi = this.abl(); let c = a; let d = this.abm.cp; let e = this.acj; let f = false; c.p.clear(); c.l.clear(); c.o.clear(); c.j.clear(); c.i.clear(); c.n.clear(); c.m.clear(); c.k.clear(); if (isNaN_(this.aap.x) && isNaN_(this.aap.y)) { d.count = 0; return; } { if (this.abj == 2) { let g = 0; { for (let h of fromEnum(this.dc.b9)) { if (this.x4(h)) { this.agi(h, c, e, f, g); g++; } if (h.isStacked) { h.qh((i) => { if (this.x4(i)) { this.agi(i, c, e, f, g); g++; } if (i.ei) { i.qf((j) => { if (this.x4(j)) { this.agi(j, c, e, f, g); g++; } return true; }); } return true; }); } if (h.ei) { h.qf((i) => { if (this.x4(i)) { this.agi(i, c, e, f, g); g++; } return true; }); } } this.age(c); } d.count = g; } else { let i = this.aa0(); let j = this.acp(i); let k = this.abn(i, j, e); this.agh(k, c, e); } } } acp(a) { let b = new List$1(Series.$, 0); if (a == null) { return b; } for (let c of fromEnum(a.es)) { b.add(c); } return b; } aa0() { if (this.aa1 != null) { return this.aa1; } if (this.dc == null) { return null; } for (let a of fromEnum(this.dc.b9)) { if (a.e1) { let b = a.a0(); if (b != null && b.dx()) { return b; } } } for (let c of fromEnum(this.dc.b9)) { if (!c.e1) { let d = c.ai(); let e = d != null && d.length > 0 ? d[0] : null; if (e != null && e.dx()) { return e; } } } return null; } abn(a, b, c) { let d = 1.7976931348623157E+308; let e = -1.7976931348623157E+308; let f = new List$1(DataContext.$, 0); let g = new List$1(Base.$, 0); let h = false; let i = true; let j = { $type: Point_$type, x: NaN, y: NaN }; let k = 0; let l = 0; for (let m = 0; m < b.count; m++) { let n = b.item(m); k = n.dc.l; l = n.dc.m; if (n.e1) { let o = n; let p = new List$1(Series.$, 0); if (o.isStacked) { o.qh((q) => { p.add(q); if (q.ei) { q.qf((r) => { p.add(r); return true; }); } return true; }); } else if (o.ei) { p.add(o); o.qf((q) => { p.add(q); return true; }); } else { p.add(o); } for (let q = 0; q < p.count; q++) { let r = p._inner[q]; let s = p._inner[q]; if (s.dc == null) { continue; } if (!r.categoryAxis.dx()) { continue; } if (i) { h = s.isVertical; } else { if (h != s.isVertical) { continue; } } let t = this.oz(s, this.aap); if (!t.c) { continue; } j = s.wr(t.d); let u = s.ww(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 { let v = n.ai(); for (let w = 0; w < v.length; w++) { if (!v[w].dx()) { continue; } } let x = n.ww(this.aap, c, false); j = n.wr(this.aap); 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); } } } let y = null; let z = n.kw(this.aap); if (n.e7 && z != null) { y = n.a3(z); } else { y = new DataContext(); y.item = z; y.series = n; } f.add(y); } let aa = 0; let ab = 0; if (h) { ab = (d + e) / 2; aa = this.xd.right; if (!isNaN_(j.x)) { aa = j.x; } if (ab < 0 || ab > this.xd.bottom) { ab = NaN; } } else { aa = (d + e) / 2; if (!isNaN_(j.y)) { ab = j.y; } if (aa < 0 || aa > this.xd.right) { aa = NaN; } } let 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; } ql() { this.aap = { $type: Point_$type, x: NaN, y: NaN }; this.r8(false); this.abm.cz(false); } qm() { this.aap = { $type: Point_$type, x: NaN, y: NaN }; this.r8(false); this.abm.cz(true); } get aiu() { let a = RectUtil.n(this.cw.b9); let b = new Size(1, this.cw.b9.width, this.cw.b9.height); return new Rect(3, a, b); } get ait() { let a = RectUtil.n(this.cw.b9); let b = new Size(1, this.cw.b9.width, this.cw.b9.height); return new Rect(3, this.abm.c3(a), b); } get ais() { let a = new Rect(0, 0, 0, this.dc.m, this.dc.l); let b = RectUtil.n(a); let c = new Size(1, a.width, a.height); return new Rect(3, this.abm.c3(b), c); } get aiw() { let a = { $type: Point_$type, x: 0, y: 0 }; return new Rect(3, a, this.abm.c8()); } aiv() { return this.aiu; } acf(a, b, c) { if (Rect.l_op_Equality(a, Rect.empty)) { return false; } let d = a.top; return c < d; } acc(a, b, c, d) { if (Rect.l_op_Equality(a, Rect.empty)) { return false; } let e = a.bottom; return c + d.height >= e; } acd(a, b, c) { if (Rect.l_op_Equality(a, Rect.empty)) { return false; } let d = a.left; return c < d; } ace(a, b, c, d) { if (Rect.l_op_Equality(a, Rect.empty)) { return false; } let e = a.right; return c + d.width > e; } adj(a, b) { return a.top + b; } adh(a, b, c) { return a.bottom - c.height - b; } adi(a, b) { return ((a.bottom + a.top) / 2) - (b.height / 2); } ads(a, b, c, d, e) { let f = c.y - d.height - b; return f; } adq(a, b, c, d, e) { let f = c.y + b; return f; } adr(a, b, c, d, e) { let f = c.y - (d.height / 2); return f; } adm(a, b, c, d, e) { let f = c.y - d.height; f = f - b; return f; } adk(a, b, c, d, e) { let f = c.y; f = f + b; return f; } adl(a, b, c, d, e) { let f = c.y - (d.height / 2); return f; } ac2(a, b) { return a.left + b; } ac4(a, b, c) { return (a.right - (c.width)) - b; } ac3(a, b, c) { return ((a.right + a.left) / 2) - (c.width / 2) + b; } adb(a, b, c, d, e) { let f = (c.x - d.width) - b; return f; } add(a, b, c, d, e) { let f = c.x + b; return f; } adc(a, b, c, d, e) { let f = (c.x - (d.width / 2)); f = f + b; return f; } ac8(a, b, c, d, e) { let f = c.x - d.width; f = f - b; return f; } ada(a, b, c, d, e) { let f = c.x; f = f + b; return f; } ac9(a, b, c, d, e) { let f = c.x - (d.width / 2); f = f + b; return f; } acx(a, b, c, d, e, f, g, h) { switch (a) { case 1: { return this.adm(e, b, h, f, true); } case 2: { return this.adk(e, b, h, f, true); } case 3: { return this.adl(e, b, h, f, true); } case 5: return this.adn(e, c, b, h, f); case 6: return this.ado(e, c, b, h, f); case 4: return this.adp(e, c, b, h, f); case 8: return this.ade(e, c, b, h, f); case 9: return this.adf(e, c, b, h, f); case 7: return this.adg(e, c, b, h, f); case 13: return this.adj(d, b); case 14: return this.adh(d, b, f); case 15: return this.adi(d, f); case 10: return this.ads(e, b, g, f, true); case 12: return this.adr(e, b, g, f, true); case 11: default: return this.adq(e, b, g, f, true); } } ac5(a, b, c, d, e) { let f = d.x; f = f + b / 2; f = f - e.width; f = f - c; return f; } ac6(a, b, c, d, e) { let f = d.x; f = f + b / 2; f = f - e.width / 2; f = f + c; return f; } ac7(a, b, c, d, e) { let f = d.x; f = f + b / 2; f = f + c; return f; } acz(a, b, c, d, e) { let f = d.x; f = f - b / 2; f = f - e.width; f = f - c; return f; } ac0(a, b, c, d, e) { let f = d.x; f = f - b / 2; f = f - e.width / 2; f = f + c; return f; } ac1(a, b, c, d, e) { let f = d.x; f = f - b / 2; f = f + c; return f; } adg(a, b, c, d, e) { let f = d.y; f = f + b / 2; f = f - e.height; f = f - c; return f; } adf(a, b, c, d, e) { let f = d.y; f = f + b / 2; f = f - e.height / 2; f = f + c; return f; } ade(a, b, c, d, e) { let f = d.y; f = f + b / 2; f = f + c; return f; } adp(a, b, c, d, e) { let f = d.y; f = f - b / 2; f = f - e.height; f = f - c; return f; } ado(a, b, c, d, e) { let f = d.y; f = f - b / 2; f = f - e.height / 2; f = f + c; return f; } adn(a, b, c, d, e) { let f = d.y; f = f - b / 2; f = f + c; return f; } acw(a, b, c, d, e, f, g, h) { switch (a) { case 10: return this.adb(e, b, g, f, true); case 11: return this.add(e, b, g, f, true); case 12: return this.adc(e, b, g, f, true); case 13: return this.ac2(d, b); case 14: return this.ac4(e, b, f); case 15: return this.ac3(e, b, f); case 5: return this.ac1(e, c, b, h, f); case 6: return this.ac0(e, c, b, h, f); case 4: return this.acz(e, c, b, h, f); case 8: return this.ac7(e, c, b, h, f); case 9: return this.ac6(e, c, b, h, f); case 7: return this.ac5(e, c, b, h, f); case 1: { return this.ac8(e, b, h, f, true); } case 3: { return this.ac9(e, b, h, f, true); } case 2: default: { return this.ada(e, b, h, f, true); } } } air(a, b, c, d) { let e = this.abb; let f = this.abf; let g = this.aa0(); let h = 0; if (g != null && g.df && this.dc != null) { h = g.getCategorySize(this.dc.yr, this.xd, this.getEffectiveViewport()); if (g.categoryMode == 0) { h = 0; } } let i = this.acu(e); let j = this.acv(f); let k = this.acw(e, i, h, this.aiu, a, b, c, d); let l = this.acx(f, j, h, this.aiu, a, b, c, d); let m = this.acg(a, i, k, b); let n = this.ach(a, j, l, b); if (!m) { let o = this.aau(e); let p = 0; while (!m && p < o.length) { e = o[p]; i = this.acu(e); k = this.acw(e, i, h, this.aiu, a, b, c, d); m = this.acg(a, i, k, b); p++; } } if (!n) { let q = this.aav(f); let r = 0; while (!n && r < q.length) { f = q[r]; j = this.acv(f); l = this.acx(f, j, h, this.aiu, a, b, c, d); n = this.ach(a, j, l, b); r++; } } return { $type: Point_$type, x: k, y: l }; } acv(a) { if (!isNaN_(this.act)) { return this.act; } switch (a) { case 1: return this.acr; case 2: return this.acr; case 3: return 0; case 4: return this.acr; case 5: return this.acr; case 6: return this.acr; case 7: return this.acr; case 8: return this.acr; case 9: return 0; case 10: return this.acr; case 11: return this.acr; case 12: return 0; case 13: return this.acr; case 14: return this.acr; case 15: return 0; } return this.acr; } acu(a) { if (!isNaN_(this.acs)) { return this.acs; } switch (a) { case 4: return this.acq; case 6: return 0; case 5: return this.acq; case 13: return this.acq; case 15: return 0; case 14: return this.acq; case 7: return this.acq; case 9: return 0; case 8: return this.acq; case 1: return this.acq; case 3: return 0; case 2: return this.acq; case 10: return this.acq; case 12: return 0; case 11: return this.acq; } return this.acq; } aav(a) { let 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; } aau(a) { let 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; } acg(a, b, c, d) { return !(this.acd(a, b, c) || this.ace(a, b, c, d)); } ach(a, b, c, d) { return !(this.acf(a, b, c) || this.acc(a, b, c, d)); } age(a) { let b = new List$1(DataTooltipCollisionInfo.$, 0); for (let c = 0; c < a.i.count; c++) { let d = new DataTooltipCollisionInfo(); d.d = c; d.e = { $type: Point_$type, x: a.i._inner[c], y: a.j._inner[c] }; d.c = a.n._inner[c]; d.a = a.m._inner[c]; d.b = a.p._inner[c]; if (isNaN_(d.e.x) || isNaN_(d.e.y)) { continue; } b.add(d); } b.aa((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; }); let e = this.ab9(b); if (!e) { return; } for (let f = 0; f < b.count - 1; f++) { let g = b._inner[f]; let h = b._inner[f + 1]; let i = new Rect(0, g.e.x, g.e.y, g.c, g.a); let 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.cw.b9.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.cw.b9.height) }; } for (let k = b.count - 1; k >= 1; k--) { let l = b._inner[k]; let m = b._inner[k - 1]; let n = new Rect(0, l.e.x, l.e.y, l.c, l.a); let 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 (let p = 0; p < b.count; p++) { let q = b._inner[p].d; let r = b._inner[p]; a.i._inner[q] = r.e.x; a.j._inner[q] = r.e.y; } } ab9(a) { if (a.count <= 1) { return false; } let b = this.cw.b9; for (let c = 0; c < a.count - 1; c++) { let d = a._inner[c]; let e = a._inner[c + 1]; let f = new Rect(0, d.e.x, d.e.y, d.c, d.a); let g = new Rect(0, e.e.x, e.e.y, e.c, e.a); if (f.intersectsWith(g)) { return true; } } return false; } agi(a, b, c, d, e) { let f = this.oz(a, this.aap); if (!f.c) { return; } let g = a.ww(f.d, c, d); let h = this.abm.cp; let i = this.aap; if (!c) { i = this.w2(g); } let j = a.kw(i); let k = h.item(e); let l = this.cw.b9; let m = this.abm.co(k); if (!Base.equalsStatic(m.target, this.dc)) { m.target = this.dc; } let n = new List$1(String_$type, 0); if (a.ei && this.abj == 2) { a.qf((o) => { if (this.x4(o)) { n.add(o.dataLegendKey); } return true; }); } m.includedSeries = [a.dataLegendKey]; m.excludedSeries = n.toArray(); this.agg(m); m.targetCursorPositionX = this.aap.x; m.targetCursorPositionY = this.aap.y; if (!this.abm.cr(k, a)) { return; } let o = this.abm.c7(k); b.l.add1(k); let p = CanvasScalingHelpers.c(this.dc.dw.j.ae.rootWrapper); let q = g.x; let r = g.x * p; r = Math.max(r, l.left); r = Math.min(r, l.right); b.o.add(r); let s = g.y * p; s = Math.max(s, l.top); s = Math.min(s, l.bottom); b.p.add(s); let t = DeviceUtils.g(10); let u = (g.x * p) + t; if (u + o.width > l.right) { u = (l.right - o.width) - t; } if (u < l.left) { u = l.left; } b.i.add(u); let v = (g.y * p - o.height) - t; if (v + o.height > l.bottom) { v = (l.bottom - o.height) - t; } if (v < l.top) { v = l.top; } b.j.add(v); b.n.add(o.width); b.m.add(o.height); let w = this.vt; if (w == null) { w = this.vz; } if (w == null) { w = a.vt; } b.k.add(w); } agh(a, b, c) { this.aba = this.abd(); this.abe = this.abh(); let d = a.f; let e = a.e; let f = 0; let g = this.abm.cp.item(0); this.abm.cr(g, null); let h = this.abm.co(g); if (!Base.equalsStatic(h.target, this.dc)) { h.target = this.dc; } let i = new List$1(String_$type, 0); let j = this.aa0(); if (j != null) { for (let k of fromEnum(j.eo())) { if (k.isStacked) { k.qh((l) => { i.add(l.dataLegendKey); if (l.ei) { l.qf((m) => { i.add(m.dataLegendKey); return true; }); } return true; }); } else if (k.ei) { i.add(k.dataLegendKey); k.qf((l) => { i.add(l.dataLegendKey); return true; }); } else { i.add(k.dataLegendKey); } } h.includedSeries = i.toArray(); h.excludedSeries = null; } else { h.includedSeries = null; h.excludedSeries = null; } this.agg(h); h.targetCursorPositionX = this.aap.x; h.targetCursorPositionY = this.aap.y; let l = this.abm.c7(g); let m = 0; let n = 0; let o = 0; let p = 0; let q = false; let r = false; o = d.x; p = d.y; let s = this.cw.b9; let t = this.abm.c8(); let u = this.aiv(); let v = CanvasScalingHelpers.c(this.dc.dw.j.ae.rootWrapper); d.x *= v; d.y *= v; u.x *= v; u.y *= v; u.width *= v; u.height *= v; e.x *= v; e.y *= v; let w = this.air(u, l, e, d); let x = w.x; let y = w.y; { } b.o.add(x); b.p.add(y); b.i.add(x); b.j.add(y); b.n.add(l.width); b.m.add(l.height); b.l.add1(g); let z = null; b.k.add(z); this.abm.cp.count = 1; } adv(a) { return a.toolTip; } zi(a, b) { super.zi(a, b); let c = a; let d = c.p.count; let e = b.b9.left; let f = b.b9.right; let g = b.b9.top; let h = b.b9.bottom; for (let i = 0; i < d; i++) { if (isNaN_(c.o._inner[i]) || isNaN_(c.p._inner[i]) || isNaN_(c.i._inner[i]) || isNaN_(c.j._inner[i])) { this.abm.cy(c.l._inner[i]); continue; } let j = c.i._inner[i]; let k = c.j._inner[i]; let l = c.n._inner[i]; let m = c.m._inner[i]; let n = false; if (n) { this.abm.cy(c.l._inner[i]);