UNPKG

igniteui-react-charts

Version:

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

396 lines (395 loc) 14 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 { AxisAnnotationFramePrepareSettings } from "./AxisAnnotationFramePrepareSettings"; 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.aay = null; _this.aax = null; var a = new FinalValueLayerFrame(); var b = new FinalValueLayerFrame(); var c = new FinalValueLayerFrame(); var d = _this.km / 1000; _this.xx = a; _this.xw = b; _this.xy = c; _this.ab = FinalValueLayer.$; return _this; } FinalValueLayer.prototype.bk = function () { return new FinalValueLayer(); }; FinalValueLayer.prototype.get_et = function () { return true; }; FinalValueLayer.prototype.ct = function () { return new FinalValueLayerView(this); }; FinalValueLayer.prototype.rh = function (a) { _super.prototype.rh.call(this, a); this.aat = a; }; Object.defineProperty(FinalValueLayer.prototype, "ab3", { get: function () { return new Thickness(1, this.aa1, this.aa3, this.aa2, this.aa0); }, enumerable: false, configurable: true }); FinalValueLayer.prototype.aaw = function () { return this.axisAnnotationFormatLabel != null; }; FinalValueLayer.prototype.zd = function (a, b) { if (this.aav == null || this.aav == a) { if (!this.a1.c) { this.r8(b); } } }; FinalValueLayer.prototype.zf = function (a, b) { var e_1, _a; var _this = this; _super.prototype.zf.call(this, a, b); var c = a; c.i.clear(); c.ad.clear(); c.ac.clear(); c.ax.clear(); c.ab.clear(); c.aw.clear(); c.k.clear(); c.j.clear(); c.t.clear(); c.v.clear(); c.x.clear(); c.w.clear(); c.u.clear(); c.y.clear(); c.z.clear(); c.af.clear(); c.ae.clear(); c.ao.clear(); c.aq.clear(); c.as.clear(); c.ar.clear(); c.ap.clear(); c.at.clear(); c.au.clear(); if (this.x4(this.aav)) { this.abk(this.aav, c); } else { try { for (var _b = __values(fromEnum(this.dc.b9)), _c = _b.next(); !_c.done; _c = _b.next()) { var d = _c.value; if (this.x4(d)) { this.abk(d, c); } if (d.isStacked) { d.qh(function (e) { if (_this.x4(e)) { _this.abk(e, c); } if (e.ei) { e.qf(function (f) { if (_this.x4(f)) { _this.abk(f, c); } return true; }); } return true; }); } if (d.ei) { d.qf(function (e) { if (_this.x4(e)) { _this.abk(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.x4 = function (a) { if (!_super.prototype.x4.call(this, a)) { return false; } if (this.abh != null) { if (a.isFragment) { var b = a.nn(); if (!Base.equalsStatic(this.abh, b)) { return false; } } else { if (!Base.equalsStatic(this.abh, a.name)) { return false; } } } return true; }; FinalValueLayer.prototype.q4 = function () { _super.prototype.q4.call(this); if (!this.a1.c && !this.d4()) { return; } if (this.d4()) { this.abl(this.xy, false); } else { this.abl(this.xw, false); } }; FinalValueLayer.prototype.ab2 = function (a) { var b = NaN; var c = NaN; var d = this.aau; 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.w4(this.cw); if (f.dn) { c = a.w2({ $type: Point_$type, x: g.right, y: g.bottom }).y; } else { c = a.w2({ $type: Point_$type, x: g.right, y: g.top }).y; } } else { if (f.dn) { c = 1; } else { c = 0; } } } return a.ww({ $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.w4(this.cw); if (h.dn) { b = a.w2({ $type: Point_$type, x: i.left, y: i.top }).x; } else { b = a.w2({ $type: Point_$type, x: i.right, y: i.top }).x; } } else { if (h.dn) { b = 0; } else { b = 1; } } } if (a.fa) { return a.ww({ $type: Point_$type, x: b, y: 0 }, e, true); } else { return a.ww({ $type: Point_$type, x: b, y: 0 }, e, true); } } }; FinalValueLayer.prototype.abk = function (a, b) { var c = this.ab2(a); var d = this.w2(c); var e = this.vt; if (e == null) { e = this.vz; } if (e == null) { e = a.vt; if (e != null) { e = this.aat.co(e); } } var f = new AxisAnnotationFramePrepareSettings(); f.u = this.abz; f.y = this.ab1; f.x = this.ab0; f.g = this.aaz; f.ae = this.ab3; f.l = this.aa4; f.c = this._visibility == 0 && a.isVertical; f.z = this.abz; f.ad = this.ab1; f.ac = this.ab0; f.m = this.aaz; f.af = this.ab3; f.r = this.aa4; f.d = this._visibility == 0 && !a.isVertical; AxisAnnotationFrameManager.c(b, c, a, this.dc, this.getEffectiveViewport(), e, f); }; FinalValueLayer.prototype.abl = function (a, b) { var c = false; if (this.aax == null) { c = true; this.aay = new List$1(Axis.$, 0); this.aax = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0); } AxisAnnotationFrameManager.d(this, a, c, this.aax, this.aay, b, this.aa5, this.aa5, this.axisAnnotationFormatLabel, this.axisAnnotationFormatLabel); }; FinalValueLayer.prototype.zi = function (a, b) { _super.prototype.zi.call(this, a, b); if (this.d4()) { this.abl(this.xy, true); } else { this.abl(this.xw, false); } }; FinalValueLayer.prototype.gg = function () { return true; }; FinalValueLayer.prototype.rq = function (a, b, c, d) { var e_2, _a; _super.prototype.rq.call(this, a, b, c, d); switch (b) { case FinalValueLayer.$$p[11]: case FinalValueLayer.$$p[12]: this.r8(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.r8(true); break; case "SeriesViewer": var e = this.aay; var f = this.aax; if (f != null) { var _loop_1 = function (g) { var h = g.value; h.c(function (i) { return g.key.as.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.pi = function (a, b) { _super.prototype.pi.call(this, a, b); if (a) { AxisAnnotationFrameManager.b(this.xw); this.abl(this.xw, false); } }; FinalValueLayer.$t = markType(FinalValueLayer, 'FinalValueLayer', AnnotationLayer.$); FinalValueLayer.$$p = markDep(DependencyProperty, PropertyMetadata, FinalValueLayer, 'raisePropertyChanged', ['AxisAnnotationBackgroundCornerRadius:aaz:abm', [1, DeviceUtils.g(3)], 'AxisAnnotationBackground:abz:abn', [Brush.$, null], 'AxisAnnotationInterpolatedValuePrecision:aa5:abo', [1, -1], 'AxisAnnotationOutline:ab0:abp', [Brush.$, null], 'AxisAnnotationPaddingBottom:aa0:abq', [1, NaN], 'AxisAnnotationPaddingLeft:aa1:abr', [1, NaN], 'AxisAnnotationPaddingRight:aa2:abs', [1, NaN], 'AxisAnnotationPaddingTop:aa3:abt', [1, NaN], 'AxisAnnotationStrokeThickness:aa4:abu', [1, NaN], 'AxisAnnotationTextColor:ab1:abv', [Brush.$, null], 'FinalValueSelectionMode:aau:abw', [FinalValueSelectionMode_$type, enumGetBox(FinalValueSelectionMode_$type, 0)], 'TargetSeriesName:abh:abx', [2, null], 'TargetSeries:aav:aby', [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 };