UNPKG

igniteui-react-charts

Version:

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

974 lines (973 loc) 35.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 { __extends, __values } from "tslib"; import { AnnotationLayer } from "./AnnotationLayer"; import { ValueLayerValueMode_$type } from "./ValueLayerValueMode"; import { DependencyProperty } from "igniteui-react-core"; import { Brush } from "igniteui-react-core"; import { Series } from "./Series"; import { Axis } from "./Axis"; import { enumGetBox, Delegate_$type, Number_$type, typeCast, fromEnum, Point_$type, markType, markDep, runOn } from "igniteui-react-core"; import { Thickness } from "igniteui-react-core"; import { Visibility_$type } from "igniteui-react-core"; import { OverlayTextLocation_$type } from "./OverlayTextLocation"; import { AnnotationAppearanceMode_$type } from "./AnnotationAppearanceMode"; import { OverlayTextUtil } from "./OverlayTextUtil"; import { ValueLayerFrame } from "./ValueLayerFrame"; import { List$1 } from "igniteui-react-core"; import { Dictionary$2 } from "igniteui-react-core"; import { Pool$1 } from "igniteui-react-core"; import { AxisAnnotation } from "./AxisAnnotation"; import { DataLegendSeriesContext } from "igniteui-react-core"; import { DataLegendSeriesValueInfo } from "igniteui-react-core"; import { AxisAnnotationFrameManager } from "./AxisAnnotationFrameManager"; import { DoubleCollection } from "igniteui-react-core"; import { DeviceUtils } from "igniteui-react-core"; import { OverlayTextUpdatingEventArgs } from "./OverlayTextUpdatingEventArgs"; import { OverlayTextInfo } from "./OverlayTextInfo"; import { AxisAnnotationFramePrepareSettings } from "./AxisAnnotationFramePrepareSettings"; import { AnnotationLayerView } from "./AnnotationLayerView"; import { TextBlock } from "igniteui-react-core"; import { Rectangle } from "igniteui-react-core"; import { Rect } from "igniteui-react-core"; import { Tuple$2 } from "igniteui-react-core"; import { Path } from "igniteui-react-core"; import { PathGeometry } from "igniteui-react-core"; import { PathFigure } from "igniteui-react-core"; import { LineSegment } from "igniteui-react-core"; import { BrushUtil } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; import { isNaN_ } from "igniteui-react-core"; import { stringIsNullOrEmpty } from "igniteui-react-core"; import { Defaults } from "./Defaults"; import { TranslateTransform } from "igniteui-react-core"; import { LineGeometry } from "igniteui-react-core"; /** * @hidden */ var ValueLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ValueLayer, _super); function ValueLayer() { var _this = _super.call(this) || this; _this.aa7 = null; _this.aas = [NaN, NaN]; _this.aa1 = null; _this.aa2 = null; _this.aft = null; _this.stylingOverlayText = null; _this.abi = null; _this.abh = null; var a = new ValueLayerFrame(); var b = new ValueLayerFrame(); var c = new ValueLayerFrame(); var d = _this.km / 1000; _this.xx = a; _this.xw = b; _this.xy = c; _this.ab = ValueLayer.$; _this.aa7 = OverlayTextUtil.c(); return _this; } ValueLayer.prototype.bk = function () { return new ValueLayer(); }; ValueLayer.prototype.get_ew = function () { return true; }; ValueLayer.prototype.ct = function () { return new ValueLayerView(this); }; ValueLayer.prototype.rh = function (a) { _super.prototype.rh.call(this, a); this.aa6 = a; }; ValueLayer.prototype.g0 = function (a) { if (this.aa3 == null) { return true; } if (this.aa3 == a) { return true; } return false; }; Object.defineProperty(ValueLayer.prototype, "afv", { get: function () { return new Thickness(1, this.abv, this.abx, this.abw, this.abu); }, enumerable: false, configurable: true }); Object.defineProperty(ValueLayer.prototype, "afw", { get: function () { return new Thickness(1, this.ab1, this.ab3, this.ab2, this.ab0); }, enumerable: false, configurable: true }); Object.defineProperty(ValueLayer.prototype, "aa8", { get: function () { return this.aa7; }, set: function (a) { var b = this.aa7; if (OverlayTextUtil.q(a)) { a = OverlayTextUtil.c(); } this.aa7 = a; if (b != this.aa7) { this.raisePropertyChanged("OverlayTextStyle", b, this.aa7); } }, enumerable: false, configurable: true }); ValueLayer.prototype.mn = function () { return "Value Layer"; }; ValueLayer.prototype.get_isSummarizationSupported = function () { return false; }; ValueLayer.prototype.jd = function (a, b, c) { if (isNaN_(this.aas[0]) && isNaN_(this.aas[1])) { return _super.prototype.jd.call(this, a, b, c); } if (!isNaN_(this.aas[0])) { return this.aas[0]; } return this.aas[1]; }; ValueLayer.prototype.getDataLegendSeriesContextAt = function (a, b) { if (isNaN_(this.aas[0]) || isNaN_(this.aas[1])) { return _super.prototype.getDataLegendSeriesContextAt.call(this, a, b); } if (this.aa3 == null) { var c_1 = new DataLegendSeriesValueInfo(); c_1.l = this.aas[0]; c_1.a = 0; c_1.q = "Value"; c_1.r = "Value"; c_1.s = ""; var d_1 = new DataLegendSeriesValueInfo(); d_1.l = this.aas[1]; d_1.a = 0; d_1.q = "Value"; d_1.r = "Value"; d_1.s = ""; var e = new DataLegendSeriesContext(); e.e = ((function () { var $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(c_1); $ret.add(d_1); return $ret; })()); e.h = this.mn(); return e; } var f = this.aa3.getDataLegendSeriesContextAt(a, b); var g = typeCast(DataLegendSeriesContext.$, f); if (g == null || g.e == null) { return _super.prototype.getDataLegendSeriesContextAt.call(this, a, b); } if (g.e.count == 0) { g.e._inner[0].l = isNaN_(this.aas[0]) ? this.aas[1] : this.aas[0]; } else { g.e._inner[0].l = this.aas[0]; g.e._inner[1].l = this.aas[1]; } return g; }; ValueLayer.prototype.zd = function (a, b) { if (this.aa3 == null || this.aa3 == a) { if (!this.a1.c) { this.r8(b); } } }; ValueLayer.prototype.zf = function (a, b) { var e_1, _a, e_2, _b; _super.prototype.zf.call(this, a, b); var c = a; var d = this.abg; var e = this.abf; c.a1.clear(); c.a2.clear(); c.a0.clear(); c.a3.clear(); AxisAnnotationFrameManager.b(c); this.aas = [NaN, NaN]; this.aa1 = null; this.aa2 = null; this.aa6.cu(); var f = this.aa4(); if (this.x4(this.aa3)) { var g = this.aa3.aq(f); this.aas = g; this.adt(c, d, e, this.aa3); } else { if (f == 5 || f == 4 || f == 6) { var h = null; var i = null; var j = [NaN, NaN]; var k = 0; try { for (var _c = __values(fromEnum(this.dc.b9)), _d = _c.next(); !_d.done; _d = _c.next()) { var l = _d.value; if (!this.x4(l)) { continue; } var m = l.ai(); for (var o = 0; o < m.length; o++) { var n = m[o]; if (!this.aba(n)) { continue; } var p = n.dy ? 1 : 0; var q = j[p]; var r = null; if (f == 5) { var s = l.jg(2, n); if (!isNaN_(s) && (s > q || isNaN_(q))) { r = l; } q = !isNaN_(q) ? Math.max(s, q) : s; } else if (f == 4) { var t = l.jg(1, n); if (!isNaN_(t) && (t < q || isNaN_(q))) { r = l; } q = !isNaN_(q) ? Math.min(t, q) : t; } else if (f == 6) { var u = l.jg(3, n); r = l; q = !isNaN_(q) ? q + u : u; } if (n.dy) { i = r != null ? r : i; } else { h = r != null ? r : h; } j[p] = q; } k++; } } catch (e_1_1) { e_1 = { error: e_1_1 }; } finally { try { if (_d && !_d.done && (_a = _c.return)) _a.call(_c); } finally { if (e_1) throw e_1.error; } } if (f == 6) { j[0] = !isNaN_(j[0]) ? j[0] / k : NaN; j[1] = !isNaN_(j[1]) ? j[1] / k : NaN; } if (h != null && !isNaN_(j[0])) { var v = h.w0(j); this.adw(h, { $type: Point_$type, x: v.x, y: NaN }, c, d, e); } if (i != null && !isNaN_(j[1])) { var w = i.w0(j); this.adw(i, { $type: Point_$type, x: NaN, y: w.y }, c, d, e); } this.aas = j; this.aa1 = h; this.aa2 = i; } else { try { for (var _e = __values(fromEnum(this.dc.b9)), _f = _e.next(); !_f.done; _f = _e.next()) { var x = _f.value; this.adt(c, d, e, x); } } catch (e_2_1) { e_2 = { error: e_2_1 }; } finally { try { if (_f && !_f.done && (_b = _e.return)) _b.call(_e); } finally { if (e_2) throw e_2.error; } } } } }; ValueLayer.prototype.adt = function (a, b, c, d) { var _this = this; if (this.x4(d)) { this.adv(d, a, b, c); } if (d.isStacked) { d.qh(function (e) { if (_this.x4(e)) { _this.adv(e, a, b, c); } if (e.ei) { e.qf(function (f) { if (_this.x4(f)) { _this.adv(f, a, b, c); } return true; }); } return true; }); } if (d.ei) { d.qf(function (e) { if (_this.x4(e)) { _this.adv(e, a, b, c); } return true; }); } }; ValueLayer.prototype.x4 = function (a) { if (!_super.prototype.x4.call(this, a)) { return false; } return true; }; ValueLayer.prototype.aba = function (a) { if (!a.dq) { return false; } if (this.aaw != null && this.aaw != a) { return false; } return true; }; ValueLayer.prototype.q4 = function () { _super.prototype.q4.call(this); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.adx(this.xy, false); } else { this.adx(this.xw, false); } }; ValueLayer.prototype.aa4 = function () { if (this.aa5 == 0) { return 2; } return this.aa5; }; ValueLayer.prototype.xn = function () { return 3; }; ValueLayer.prototype.yb = function () { return 0.3; }; ValueLayer.prototype.ye = function () { return -0.4; }; ValueLayer.prototype.yd = function () { return 0.5; }; ValueLayer.prototype.aah = function () { return this.xk == 3 ? this.afu() : null; }; ValueLayer.prototype.aai = function () { return this.xl == 3 ? this.afu() : null; }; ValueLayer.prototype.afu = function () { if (this.aft == null) { this.aft = new DoubleCollection(); this.aft.add(DeviceUtils.g(5)); this.aft.add(DeviceUtils.g(5)); } return this.aft; }; ValueLayer.prototype.adu = function () { if (OverlayTextUtil.q(this.aa7)) { this.aa7 = OverlayTextUtil.c(); } else if (OverlayTextUtil.k(this.aa7)) { this.aa7 = this.cw.l(this.aa7.fontString); } }; ValueLayer.prototype.adw = function (a, b, c, d, e) { var f = false; var g = this.afh; if (g == null) { g = a.vt; f = true; } var h = false; var i = this.afn; if (i == null) { if (this.afh != null) { i = this.afh; } else { i = a.vt; h = true; } } var j = false; var k = this.afq; if (k == null) { if (this.afh != null) { k = this.afh; } else { k = a.vt; j = true; } } var l = g; var m = g; var n = i; var o = k; if (this.afi != null) { l = this.afi; } else if (f) { switch (this.xk) { case 1: l = this.aa6.ck(l, this.x8); break; case 2: l = this.aa6.cm(l, this.x8); break; case 4: l = this.aa6.cl(l, this.x8); break; } } if (this.afm != null) { m = this.afm; } else if (f) { switch (this.xl) { case 1: m = this.aa6.ck(m, this.ya); break; case 2: m = this.aa6.cm(m, this.ya); break; case 4: m = this.aa6.cl(m, this.ya); break; } } if (h) { switch (this.xl) { case 1: n = this.aa6.ck(n, this.ya); break; case 2: n = this.aa6.cm(n, this.ya); break; } } if (j) { switch (this.xk) { case 1: o = this.aa6.ck(o, this.x8); break; case 2: o = this.aa6.cm(o, this.x8); break; } } c.a0.add(l); c.a3.add(m); c.a1.add(b.y); c.a2.add(b.x); var p = isNaN_(b.x); var q = p ? b.y : b.x; this.adu(); var r = this.aa8; var s = OverlayTextUtil.o(r, this.abe); var t = this.aaz; if (t == 18) { s = false; } if (s && !stringIsNullOrEmpty(this.acb)) { var u = this.afl; if (u == null && this.abd) { u = g; } var v = this.afj; if (v == null && this.abb) { v = g; } var w = this.afk; if (w == null && this.abc) { w = g; } var x = new OverlayTextUpdatingEventArgs(); x.textLocation = this.aaz; x.textAngle = this.abj; x.textVisible = this.abe; x.textContent = this.acb; x.textColorMode = this.aav; x.textColorShift = this.abo; x.textColor = u; x.backgroundMode = this.aat; x.backgroundShift = this.abk; x.background = v; x.borderMode = this.aau; x.borderShift = this.abm; x.borderStroke = w; x.borderRadius = this.abl; x.borderThickness = this.abn; x.shapeBrush = g; x.shapeOutline = g; x.f = p; x.horizontalMargin = this.abp; x.verticalPadding = this.abs; x.verticalMargin = this.abr; x.horizontalPadding = this.abq; if (this.stylingOverlayText != null) { this.stylingOverlayText(this, x); } OverlayTextUtil.ad(x); var y = OverlayTextInfo.d(x); if (y.textVisible && !y.h) { this.aa6.cq.count += 1; this.aa6.cp.count += 1; var z = this.aa6.cq.count - 1; y.f = r; y.ad = this.cw.cc(y.textContent, y.f); y.u = this.aa6.cq.item(z); y.ac = this.aa6.cp.item(z); if (y.g) { var aa = this.dc.yj({ $type: Point_$type, x: 0, y: NaN }); var ab = this.dc.yj({ $type: Point_$type, x: 1, y: NaN }); var ac = ab.x - aa.x; y.ab = new Rect(0, aa.x, q, ac, 1); } else { var ad = this.dc.yj({ $type: Point_$type, x: NaN, y: 0 }); var ae = this.dc.yj({ $type: Point_$type, x: NaN, y: 1 }); var af = ae.y - ad.y; y.ab = new Rect(0, q, ad.y, 1, af); } OverlayTextUtil.ac(y); this.cw.av(y.u, y.f); this.cw.aw(y.u, y.f); } } if (this.aa9) { var ag = new AxisAnnotationFramePrepareSettings(); ag.u = n; ag.y = this.afp; ag.x = this.afo; ag.g = this.abt; ag.ae = this.afv; ag.l = this.aby; ag.c = this.afy == 0; ag.z = o; ag.ad = this.afs; ag.ac = this.afr; ag.m = this.abz; ag.af = this.afw; ag.r = this.ab4; ag.d = this.afx == 0; AxisAnnotationFrameManager.c(c, b, a, this.dc, this.getEffectiveViewport(), g, ag); } }; ValueLayer.prototype.adv = function (a, b, c, d) { var e = { $type: Point_$type, x: NaN, y: NaN }; var f = this.aa4(); switch (f) { case 5: e = a.wz(2); break; case 4: e = a.wz(1); break; case 6: e = a.wz(3); break; default: e = a.wz(f); break; } var i = a.ai(); for (var h = 0; h < i.length; h++) { var g = i[h]; if (!this.aba(g)) { continue; } if (g.dy) { this.adw(a, { $type: Point_$type, x: NaN, y: e.y }, b, c, d); } else { this.adw(a, { $type: Point_$type, x: e.x, y: NaN }, b, c, d); } } }; ValueLayer.prototype.adx = function (a, b) { var c = false; if (this.abh == null) { c = true; this.abi = new List$1(Axis.$, 0); this.abh = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.abh, this.abi, b, this.ab5, this.ab6, this.aax, this.aay); }; ValueLayer.prototype.ads = function (a, b, c, d, e) { var f = a.item(b); b++; if (e) { f._stroke = d.a3._inner[c]; f._fill = d.a3._inner[c]; } else { f._stroke = d.a0._inner[c]; f._fill = d.a0._inner[c]; } f.ad = this.il; f.ai = e ? this.aaf : this.aae; f.am = this.wp; f.al = this.wo; f.ak = this.wo; f.aj = this.wn; f.ac = this.jp; return new Tuple$2(Path.$, Number_$type, f, b); }; ValueLayer.prototype.zi = function (a, b) { _super.prototype.zi.call(this, a, b); var c = this.aa6.co; var d = a; var e = d.a1.count; var f = 0; var g = b.b9.left; var h = b.b9.right; var i = b.b9.top; var j = b.b9.bottom; var k = this.afy == 0; var l = this.afx == 0; for (var m = 0; m < e; m++) { var n = Math.floor(d.a1._inner[m]); var o = Math.floor(d.a2._inner[m]); var p = null; if (k) { if (!isNaN_(o)) { var q = this.ads(c, f, m, d, true); p = q.c; f = q.d; var r = new PathGeometry(); var s = new PathFigure(); s._startPoint = { $type: Point_$type, x: o, y: i }; var t = new LineSegment(1); t.c = { $type: Point_$type, x: o, y: j }; s._segments.add(t); r.c.add(s); p.an = r; } } if (l) { if (!isNaN_(n)) { var u = this.ads(c, f, m, d, false); p = u.c; f = u.d; var v = new PathGeometry(); var w = new PathFigure(); w._startPoint = { $type: Point_$type, x: g, y: n }; var x = new LineSegment(1); x.c = { $type: Point_$type, x: h, y: n }; w._segments.add(x); v.c.add(w); p.an = v; } } } c.count = f; if (this.d4()) { this.adx(this.xy, true); } else { this.adx(this.xw, false); } }; ValueLayer.prototype.gg = function () { return true; }; ValueLayer.prototype.rq = function (a, b, c, d) { _super.prototype.rq.call(this, a, b, c, d); switch (b) { case "SeriesViewer": if (d == null) { if (this.abh != null && this.abh.count > 0) { var e = void 0; if (this.d4()) { e = this.xy; } else { e = this.xw; } AxisAnnotationFrameManager.b(e); AxisAnnotationFrameManager.d(this, e, true, this.abh, this.abi, true, this.ab5, this.ab6, this.aax, this.aay); } } break; case ValueLayer.$$p[2]: this.r8(true); break; case ValueLayer.$$p[32]: this.r8(true); break; case ValueLayer.$$p[28]: case "Visibility": this.r8(true); break; case ValueLayer.$$p[3]: case ValueLayer.$$p[34]: case ValueLayer.$$p[33]: case ValueLayer.$$p[37]: case ValueLayer.$$p[39]: case ValueLayer.$$p[41]: case ValueLayer.$$p[40]: case ValueLayer.$$p[38]: case ValueLayer.$$p[42]: case ValueLayer.$$p[43]: case ValueLayer.$$p[45]: case ValueLayer.$$p[48]: case ValueLayer.$$p[50]: case ValueLayer.$$p[52]: case ValueLayer.$$p[51]: case ValueLayer.$$p[49]: case ValueLayer.$$p[53]: case ValueLayer.$$p[54]: case ValueLayer.$$p[1]: case ValueLayer.$$p[31]: case ValueLayer.$$p[29]: this.r8(true); break; case "Brush": case ValueLayer.$$p[30]: if (this.vz != null) { this.afh = this.vz; } else { switch (this.aa5) { case 6: this.afh = BrushUtil.j(255, 248, 173, 118); break; case 4: this.afh = BrushUtil.j(255, 246, 93, 80); break; case 5: this.afh = BrushUtil.j(255, 99, 208, 0); break; default: this.afh = this.aa3 != null ? this.aa3.vt : null; break; } } this.r8(true); break; case ValueLayer.$$p[22]: case ValueLayer.$$p[25]: case ValueLayer.$$p[21]: case ValueLayer.$$p[4]: case ValueLayer.$$p[17]: case ValueLayer.$$p[15]: case ValueLayer.$$p[16]: case ValueLayer.$$p[18]: case ValueLayer.$$p[7]: case ValueLayer.$$p[5]: case ValueLayer.$$p[6]: case ValueLayer.$$p[8]: case ValueLayer.$$p[10]: case ValueLayer.$$p[11]: case ValueLayer.$$p[13]: case ValueLayer.$$p[9]: case ValueLayer.$$p[12]: case ValueLayer.$$p[14]: case ValueLayer.$$p[19]: case ValueLayer.$$p[20]: case ValueLayer.$$p[24]: case ValueLayer.$$p[23]: this.r8(true); break; } }; ValueLayer.prototype.pi = function (a, b) { _super.prototype.pi.call(this, a, b); if (a) { AxisAnnotationFrameManager.b(this.xw); this.adx(this.xw, false); } }; ValueLayer.$t = markType(ValueLayer, 'ValueLayer', AnnotationLayer.$); ValueLayer.$$p = markDep(DependencyProperty, PropertyMetadata, ValueLayer, 'raisePropertyChanged', ['ActualValueLayerBrush:afh:ady', [Brush.$, null], 'HorizontalLineStroke:afi:adz', [Brush.$, null], 'HorizontalLineVisibility:afx:ad0', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'IsAxisAnnotationEnabled:aa9:ad1', [0, false], 'OverlayTextAngle:abj:ad2', [1, NaN], 'OverlayTextBackgroundMatchLayer:abb:ad3', [0, false], 'OverlayTextBackgroundMode:aat:ad4', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBackground:afj:ad5', [Brush.$, null], 'OverlayTextBackgroundShift:abk:ad6', [1, NaN], 'OverlayTextBorderColor:afk:ad7', [Brush.$, null], 'OverlayTextBorderMatchLayer:abc:ad8', [0, false], 'OverlayTextBorderMode:aau:ad9', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBorderRadius:abl:aea', [1, NaN], 'OverlayTextBorderShift:abm:aeb', [1, NaN], 'OverlayTextBorderThickness:abn:aec', [1, 1], 'OverlayTextColorMatchLayer:abd:aed', [0, true], 'OverlayTextColorMode:aav:aee', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextColor:afl:aef', [Brush.$, null], 'OverlayTextColorShift:abo:aeg', [1, NaN], 'OverlayTextHorizontalMargin:abp:aeh', [1, NaN], 'OverlayTextHorizontalPadding:abq:aei', [1, NaN], 'OverlayTextLocation:aaz:aej', [OverlayTextLocation_$type, enumGetBox(OverlayTextLocation_$type, 0)], 'OverlayText:acb:aek', [2, null], 'OverlayTextVerticalMargin:abr:ael', [1, NaN], 'OverlayTextVerticalPadding:abs:aem', [1, NaN], 'OverlayTextVisible:abe:aen', [0, true], 'SkipUnknownValues:abf:aeo', [0, true], 'TargetAxis:aaw:aep', [Axis.$, null], 'TargetSeries:aa3:aeq', [Series.$, null], 'UseInterpolation:abg:aer', [0, true], 'ValueMode:aa5:aes', [ValueLayerValueMode_$type, enumGetBox(ValueLayerValueMode_$type, 2)], 'VerticalLineStroke:afm:aet', [Brush.$, null], 'VerticalLineVisibility:afy:aeu', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'XAxisAnnotationBackgroundCornerRadius:abt:aev', [1, DeviceUtils.g(3)], 'XAxisAnnotationBackground:afn:aew', [Brush.$, null], 'XAxisAnnotationFormatLabel:aax:aex', [Delegate_$type], 'XAxisAnnotationInterpolatedValuePrecision:ab5:aey', [1, -1], 'XAxisAnnotationOutline:afo:aez', [Brush.$, null], 'XAxisAnnotationPaddingBottom:abu:ae0', [1, NaN], 'XAxisAnnotationPaddingLeft:abv:ae1', [1, NaN], 'XAxisAnnotationPaddingRight:abw:ae2', [1, NaN], 'XAxisAnnotationPaddingTop:abx:ae3', [1, NaN], 'XAxisAnnotationStrokeThickness:aby:ae4', [1, NaN], 'XAxisAnnotationTextColor:afp:ae5', [Brush.$, null], 'YAxisAnnotationBackgroundCornerRadius:abz:ae6', [1, DeviceUtils.g(3)], 'YAxisAnnotationBackground:afq:ae7', [Brush.$, null], 'YAxisAnnotationFormatLabel:aay:ae8', [Delegate_$type], 'YAxisAnnotationInterpolatedValuePrecision:ab6:ae9', [1, -1], 'YAxisAnnotationOutline:afr:afa', [Brush.$, null], 'YAxisAnnotationPaddingBottom:ab0:afb', [1, NaN], 'YAxisAnnotationPaddingLeft:ab1:afc', [1, NaN], 'YAxisAnnotationPaddingRight:ab2:afd', [1, NaN], 'YAxisAnnotationPaddingTop:ab3:afe', [1, NaN], 'YAxisAnnotationStrokeThickness:ab4:aff', [1, NaN], 'YAxisAnnotationTextColor:afs:afg', [Brush.$, null]]); return ValueLayer; }(AnnotationLayer)); export { ValueLayer }; /** * @hidden */ var ValueLayerView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ValueLayerView, _super); function ValueLayerView(a) { var _this = _super.call(this, a) || this; _this.cn = null; _this.co = null; _this.ct = null; _this.cs = null; _this.cq = null; _this.cr = null; _this.cp = null; _this.cn = a; _this.ct = new List$1(Path.$, 0); return _this; } ValueLayerView.prototype.cu = function () { OverlayTextUtil.u(this.cq); OverlayTextUtil.v(this.cs); this.cp.clear(); this.cr.clear(); this.cq.count = 0; this.cp.count = 0; }; ValueLayerView.prototype.a4 = function () { var _this = this; _super.prototype.a4.call(this); this.co = ((function () { var $ret = new Pool$1(Path.$); $ret.create = runOn(_this, _this.c6); $ret.activate = runOn(_this, _this.cv); $ret.disactivate = runOn(_this, _this.cx); $ret.destroy = runOn(_this, _this.cw); return $ret; })()); this.cs = new List$1(TextBlock.$, 0); this.cq = ((function () { var $ret = new Pool$1(TextBlock.$); $ret.create = runOn(_this, _this.c5); $ret.activate = runOn(_this, _this.c1); $ret.disactivate = runOn(_this, _this.c3); $ret.destroy = runOn(_this, _this.c2); return $ret; })()); this.cr = new List$1(Rectangle.$, 0); this.cp = ((function () { var $ret = new Pool$1(Rectangle.$); $ret.create = runOn(_this, _this.c7); $ret.activate = runOn(_this, _this.cy); $ret.disactivate = runOn(_this, _this.c0); $ret.destroy = runOn(_this, _this.cz); return $ret; })()); this.cn.jy = Defaults.crosshairLineThickness; }; ValueLayerView.prototype.c5 = function () { var a = new TextBlock(); this.cs.add(a); return a; }; ValueLayerView.prototype.c2 = function (a) { if (this.cs.contains(a)) { this.cs.remove(a); } }; ValueLayerView.prototype.c1 = function (a) { a._visibility = 0; a.s = 0; }; ValueLayerView.prototype.c3 = function (a) { a._visibility = 1; }; ValueLayerView.prototype.c7 = function () { var a = new Rectangle(); this.cr.add(a); return a; }; ValueLayerView.prototype.cz = function (a) { a.dataContext = null; if (this.cr.contains(a)) { this.cr.remove(a); } }; ValueLayerView.prototype.cy = function (a) { a._visibility = 0; }; ValueLayerView.prototype.c0 = function (a) { a._visibility = 1; }; ValueLayerView.prototype.c6 = function () { var a = new Path(); a.j = new TranslateTransform(); this.ct.add(a); return a; }; ValueLayerView.prototype.cv = function (a) { a._visibility = 0; }; ValueLayerView.prototype.cx = function (a) { a._visibility = 1; }; ValueLayerView.prototype.cw = function (a) { this.ct.remove(a); }; ValueLayerView.prototype.c4 = function (a, b, c, d) { if (a.an == null || a.an.c.x != d || a.an.d.x != c) { var e = ((function () { var $ret = new LineGeometry(); $ret.d = { $type: Point_$type, x: c, y: b }; $ret.c = { $type: Point_$type, x: d, y: b }; return $ret; })()); a.an = e; } }; ValueLayerView.prototype.bj = function (a, b) { _super.prototype.bj.call(this, a, b); if (a.d && !b) { for (var c = 0; c < this.ct.count; c++) { var d = this.ct._inner[c]; if (d._visibility == 0) { a.t(d); } } for (var e = 0; e < this.cp.count; e++) { var f = this.cp.item(e); if (f._visibility == 0) { a.w(f); } } for (var g = 0; g < this.cq.count; g++) { var h = this.cq.item(g); a.af(h.dataContext); a.x(h); } } }; ValueLayerView.prototype.ax = function (a) { _super.prototype.ax.call(this, a); for (var b = 0; b < this.ct.count; b++) { this.f.bc.exportPathData(a, this.ct._inner[b], "crosshairLine", ["Main", "Crosshair"]); } }; ValueLayerView.$t = markType(ValueLayerView, 'ValueLayerView', AnnotationLayerView.$); return ValueLayerView; }(AnnotationLayerView)); export { ValueLayerView };