UNPKG

igniteui-react-charts

Version:

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

380 lines (379 loc) 13.7 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 { DependencyProperty } from "igniteui-react-core"; import { Series } from "./Series"; import { FinalValueSelectionMode_$type } from "./FinalValueSelectionMode"; import { Brush } from "igniteui-react-core"; import { Thickness } from "igniteui-react-core"; import { FinalValueLayerFrame } from "./FinalValueLayerFrame"; import { List$1 } from "igniteui-react-core"; import { Axis } from "./Axis"; import { Dictionary$2 } from "igniteui-react-core"; import { Pool$1 } from "igniteui-react-core"; import { AxisAnnotation } from "./AxisAnnotation"; import { Base, enumGetBox, fromEnum, Point_$type, markType, markDep } from "igniteui-react-core"; import { AxisAnnotationFrameManager } from "./AxisAnnotationFrameManager"; import { PropertyMetadata } from "igniteui-react-core"; import { DeviceUtils } from "igniteui-react-core"; import { AnnotationLayerView } from "./AnnotationLayerView"; import { BrushUtil } from "igniteui-react-core"; /** * @hidden */ var FinalValueLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(FinalValueLayer, _super); function FinalValueLayer() { var _this = _super.call(this) || this; _this.axisAnnotationFormatLabel = null; _this.aag = null; _this.aaf = null; var a = new FinalValueLayerFrame(); var b = new FinalValueLayerFrame(); var c = new FinalValueLayerFrame(); var d = _this.ke / 1000; _this.xh = a; _this.xg = b; _this.xi = c; _this.ab = FinalValueLayer.$; return _this; } FinalValueLayer.prototype.bk = function () { return new FinalValueLayer(); }; FinalValueLayer.prototype.get_es = function () { return true; }; FinalValueLayer.prototype.ct = function () { return new FinalValueLayerView(this); }; FinalValueLayer.prototype.q3 = function (a) { _super.prototype.q3.call(this, a); this.aab = a; }; Object.defineProperty(FinalValueLayer.prototype, "abl", { get: function () { return new Thickness(1, this.aaj, this.aal, this.aak, this.aai); }, enumerable: false, configurable: true }); FinalValueLayer.prototype.aae = function () { return this.axisAnnotationFormatLabel != null; }; FinalValueLayer.prototype.yw = function (a, b) { if (this.aad == null || this.aad == a) { if (!this.a1.c) { this.ru(b); } } }; FinalValueLayer.prototype.yy = function (a, b) { var e_1, _a; var _this = this; _super.prototype.yy.call(this, a, b); var c = a; c.f.clear(); c.r.clear(); c.q.clear(); c.ac.clear(); c.p.clear(); c.ab.clear(); c.h.clear(); c.g.clear(); c.i.clear(); c.k.clear(); c.m.clear(); c.l.clear(); c.j.clear(); c.n.clear(); c.o.clear(); c.t.clear(); c.s.clear(); c.u.clear(); c.w.clear(); c.y.clear(); c.x.clear(); c.v.clear(); c.z.clear(); c.aa.clear(); if (this.xn(this.aad)) { this.aa2(this.aad, c); } else { try { for (var _b = __values(fromEnum(this.dc.series)), _c = _b.next(); !_c.done; _c = _b.next()) { var d = _c.value; if (this.xn(d)) { this.aa2(d, c); } if (d.isStacked) { d.p5(function (e) { if (_this.xn(e)) { _this.aa2(e, c); } if (e.ei) { e.p3(function (f) { if (_this.xn(f)) { _this.aa2(f, c); } return true; }); } return true; }); } if (d.ei) { d.p3(function (e) { if (_this.xn(e)) { _this.aa2(e, c); } return true; }); } } } 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; } } } }; FinalValueLayer.prototype.xn = function (a) { if (!_super.prototype.xn.call(this, a)) { return false; } if (this.aaz != null) { if (a.isFragment) { var b = a.ne(); if (!Base.equalsStatic(this.aaz, b)) { return false; } } else { if (!Base.equalsStatic(this.aaz, a.name)) { return false; } } } return true; }; FinalValueLayer.prototype.qr = function () { _super.prototype.qr.call(this); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.aa3(this.xi, false); } else { this.aa3(this.xg, false); } }; FinalValueLayer.prototype.abk = function (a) { var b = NaN; var c = NaN; var d = this.aac; if (d == 0) { d = 1; } var e = false; if (d == 2) { e = true; } if (a.isVertical) { var f = a.a0(); if (f != null) { if (d == 1 || d == 2) { var g = this.wo(this.cw); if (f.ch) { c = a.wm({ $type: Point_$type, x: g.right, y: g.bottom }).y; } else { c = a.wm({ $type: Point_$type, x: g.right, y: g.top }).y; } } else { if (f.ch) { c = 1; } else { c = 0; } } } return a.wh({ $type: Point_$type, x: 0, y: c }, e, true); } else { var h = a.a0(); if (h != null) { if (d == 1 || d == 2) { var i = this.wo(this.cw); if (h.ch) { b = a.wm({ $type: Point_$type, x: i.left, y: i.top }).x; } else { b = a.wm({ $type: Point_$type, x: i.right, y: i.top }).x; } } else { if (h.ch) { b = 0; } else { b = 1; } } } if (a.e8) { return a.wh({ $type: Point_$type, x: b, y: 0 }, e, true); } else { return a.wh({ $type: Point_$type, x: b, y: 0 }, e, true); } } }; FinalValueLayer.prototype.aa2 = function (a, b) { var c = this.abk(a); var d = this.wm(c); var e = this.ve; if (e == null) { e = this.vk; } if (e == null) { e = a.ve; if (e != null) { e = this.aab.co(e); } } AxisAnnotationFrameManager.c(b, c, a, this.dc, this.getEffectiveViewport(), e, this.abh, this.aah, this.abj, this.abi, this.abl, this.aam, this.abh, this.aah, this.abj, this.abi, this.abl, this.aam, this._visibility == 0 && a.isVertical, this._visibility == 0 && !a.isVertical); }; FinalValueLayer.prototype.aa3 = function (a, b) { var c = false; if (this.aaf == null) { c = true; this.aag = new List$1(Axis.$, 0); this.aaf = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.aaf, this.aag, b, this.aan, this.aan, this.axisAnnotationFormatLabel, this.axisAnnotationFormatLabel); }; FinalValueLayer.prototype.y1 = function (a, b) { _super.prototype.y1.call(this, a, b); if (this.d4()) { this.aa3(this.xi, true); } else { this.aa3(this.xg, false); } }; FinalValueLayer.prototype.gb = function () { return true; }; FinalValueLayer.prototype.rc = function (a, b, c, d) { var e_2, _a; _super.prototype.rc.call(this, a, b, c, d); switch (b) { case FinalValueLayer.$$p[11]: case FinalValueLayer.$$p[12]: this.ru(true); break; case FinalValueLayer.$$p[1]: case FinalValueLayer.$$p[0]: case FinalValueLayer.$$p[3]: case FinalValueLayer.$$p[5]: case FinalValueLayer.$$p[7]: case FinalValueLayer.$$p[6]: case FinalValueLayer.$$p[4]: case "Visibility": case FinalValueLayer.$$p[8]: case FinalValueLayer.$$p[9]: case FinalValueLayer.$$p[10]: this.ru(true); break; case "SeriesViewer": var e = this.aag; var f = this.aaf; if (f != null) { var _loop_1 = function (g) { var h = g.value; h.c(function (i) { return g.key.an.remove(i); }); h.clear(); }; try { for (var _b = __values(fromEnum(f)), _c = _b.next(); !_c.done; _c = _b.next()) { var g = _c.value; _loop_1(g); } } 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; } } e.clear(); f.clear(); } break; } }; FinalValueLayer.prototype.o7 = function (a, b) { _super.prototype.o7.call(this, a, b); if (a) { AxisAnnotationFrameManager.b(this.xg); this.aa3(this.xg, false); } }; FinalValueLayer.$t = markType(FinalValueLayer, 'FinalValueLayer', AnnotationLayer.$); FinalValueLayer.$$p = markDep(DependencyProperty, PropertyMetadata, FinalValueLayer, 'raisePropertyChanged', ['AxisAnnotationBackgroundCornerRadius:aah:aa4', [1, DeviceUtils.g(3)], 'AxisAnnotationBackground:abh:aa5', [Brush.$, null], 'AxisAnnotationInterpolatedValuePrecision:aan:aa6', [1, -1], 'AxisAnnotationOutline:abi:aa7', [Brush.$, null], 'AxisAnnotationPaddingBottom:aai:aa8', [1, NaN], 'AxisAnnotationPaddingLeft:aaj:aa9', [1, NaN], 'AxisAnnotationPaddingRight:aak:aba', [1, NaN], 'AxisAnnotationPaddingTop:aal:abb', [1, NaN], 'AxisAnnotationStrokeThickness:aam:abc', [1, NaN], 'AxisAnnotationTextColor:abj:abd', [Brush.$, null], 'FinalValueSelectionMode:aac:abe', [FinalValueSelectionMode_$type, enumGetBox(FinalValueSelectionMode_$type, 0)], 'TargetSeriesName:aaz:abf', [2, null], 'TargetSeries:aad:abg', [Series.$, null]]); return FinalValueLayer; }(AnnotationLayer)); export { FinalValueLayer }; /** * @hidden */ var FinalValueLayerView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(FinalValueLayerView, _super); function FinalValueLayerView(a) { var _this = _super.call(this, a) || this; _this.cn = null; _this.cn = a; return _this; } FinalValueLayerView.prototype.a4 = function () { _super.prototype.a4.call(this); }; FinalValueLayerView.prototype.co = function (a) { if (a == null) { return a; } return BrushUtil.o(a, 0.1); }; FinalValueLayerView.prototype.ax = function (a) { _super.prototype.ax.call(this, a); }; FinalValueLayerView.$t = markType(FinalValueLayerView, 'FinalValueLayerView', AnnotationLayerView.$); return FinalValueLayerView; }(AnnotationLayerView)); export { FinalValueLayerView };