UNPKG

igniteui-react-charts

Version:

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

416 lines (415 loc) 15.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 } from "tslib"; import { DataAnnotationRangeLayer } from "./DataAnnotationRangeLayer"; import { DependencyProperty } from "igniteui-react-core"; import { typeCast, enumGetBox, markType, markDep } from "igniteui-react-core"; import { DataAnnotationDisplayMode_$type } from "./DataAnnotationDisplayMode"; import { List$1 } from "igniteui-react-core"; import { DataAnnotationInfo } from "./DataAnnotationInfo"; import { IFastItemsSource_$type } from "igniteui-react-core"; import { PropertyMetadata } from "igniteui-react-core"; import { isNaN_ } from "igniteui-react-core"; /** * @hidden */ var DataAnnotationStripLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(DataAnnotationStripLayer, _super); function DataAnnotationStripLayer() { var _this = _super.call(this) || this; _this.ah0 = null; _this.ahz = null; _this.ahy = null; _this.ahx = null; _this.ahw = null; _this.aht = null; _this.ahs = null; _this.ahv = null; _this.ahu = null; _this.ab = DataAnnotationStripLayer.$; return _this; } DataAnnotationStripLayer.prototype.bk = function () { return new DataAnnotationStripLayer(); }; DataAnnotationStripLayer.prototype.aen = function (a) { if (isNaN_(this.aed)) { return a.dm ? 90 : 0; } return this.aed; }; DataAnnotationStripLayer.prototype.afr = function (a) { var _this = this; if (!this.adx(a)) { return; } var b = this.ad7._inner[a]; b.c = new List$1(DataAnnotationInfo.$, 0); b.b = new List$1(DataAnnotationInfo.$, 0); b.centerLabelX = this.aev(a, this.ah5); b.centerLabelY = this.aev(a, this.ah5); b.startLabelX = this.aev(a, this.ah8); b.startLabelY = this.aev(a, this.ah8); b.endLabelX = this.aev(a, this.ah6); b.endLabelY = this.aev(a, this.ah6); var c = NaN; var d = this.adw ? this.adg : this.adh; var e = this.aec(a, this.ah9, d); var f = this.aec(a, this.ah7, d); if (isNaN_(e) && !isNaN_(f)) { b.startLabelX = null; b.startLabelY = null; } if (!isNaN_(e) && isNaN_(f)) { b.endLabelX = null; b.endLabelY = null; } if (isNaN_(e)) { e = f; } if (isNaN_(f)) { f = e; } if (isNaN_(c)) { c = e + ((f - e) / 2); } if (this.adw) { b.shapeStartX = e; b.shapeStartY = Number.NEGATIVE_INFINITY; b.shapeEndX = f; b.shapeEndY = Number.POSITIVE_INFINITY; b.shapeCenterX = c; b.shapeCenterY = 0; } else { b.shapeStartX = Number.NEGATIVE_INFINITY; b.shapeStartY = e; b.shapeEndX = Number.POSITIVE_INFINITY; b.shapeEndY = f; b.shapeCenterX = 0; b.shapeCenterY = c; } b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.isStartLabel = true; $ret.textColor = _this.aho; $ret.background = _this.ahm; $ret.borderColor = _this.ahn; $ret.q = b.ab.x; $ret.r = b.ab.y; $ret.dataLabelX = b.startLabelX; $ret.dataLabelY = b.startLabelY; $ret.dataValueX = b.ab.x; $ret.dataValueY = b.ab.y; $ret.a = _this.adw ? _this.ahr : 6; $ret.b = !_this.adw ? _this.ahr : 6; return $ret; })())); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.q = b.ab.x; $ret.r = b.aa.y; return $ret; })())); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.isEndLabel = true; $ret.textColor = _this.ahl; $ret.background = _this.ahj; $ret.borderColor = _this.ahk; $ret.q = b.aa.x; $ret.r = b.aa.y; $ret.dataLabelX = b.endLabelX; $ret.dataLabelY = b.endLabelY; $ret.dataValueX = b.aa.x; $ret.dataValueY = b.aa.y; $ret.a = _this.adw ? _this.ahq : 6; $ret.b = !_this.adw ? _this.ahq : 6; return $ret; })())); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.q = b.aa.x; $ret.r = b.ab.y; return $ret; })())); b.b.add(((function () { var $ret = new DataAnnotationInfo(); $ret.isCenterLabel = true; $ret.textColor = _this.ahi; $ret.background = _this.ahg; $ret.borderColor = _this.ahh; $ret.q = b.z.x; $ret.r = b.z.y; $ret.dataLabelX = b.centerLabelX; $ret.dataLabelY = b.centerLabelY; $ret.dataValueX = b.z.x; $ret.dataValueY = b.z.y; $ret.a = _this.adw ? _this.ahp : 6; $ret.b = !_this.adw ? _this.ahp : 6; return $ret; })())); }; DataAnnotationStripLayer.prototype.rs = function (a, b, c, d) { _super.prototype.rs.call(this, a, b, c, d); switch (b) { case DataAnnotationStripLayer.$$p[11]: if (this.dp != null) { this.dp.deregisterColumn(this.ah9); this.ah9 = this.dl(this.ai2); } break; case DataAnnotationStripLayer.$$p[8]: if (this.dp != null) { this.dp.deregisterColumn(this.ah7); this.ah7 = this.dl(this.aiv); } break; case DataAnnotationStripLayer.$$p[10]: if (this.dp != null) { this.dp.deregisterColumn(this.ah8); this.ah8 = this.dn(this.aiz); } break; case DataAnnotationStripLayer.$$p[7]: if (this.dp != null) { this.dp.deregisterColumn(this.ah6); this.ah6 = this.dn(this.ais); } break; case DataAnnotationStripLayer.$$p[5]: if (this.dp != null) { this.dp.deregisterColumn(this.ah5); this.ah5 = this.dn(this.aio); } break; case "StartValueColumn": case "StartLabelColumn": case DataAnnotationStripLayer.$$p[9]: case "EndValueColumn": case "EndLabelColumn": case DataAnnotationStripLayer.$$p[6]: case "CenterLabelColumn": case DataAnnotationStripLayer.$$p[4]: this.acc(); break; case DataAnnotationStripLayer.$$p[0]: this.afp(this.ah1); this.ah1 = this.dn(this.aib); break; case DataAnnotationStripLayer.$$p[3]: this.afp(this.ah4); this.ah4 = this.dn(this.aik); break; case DataAnnotationStripLayer.$$p[1]: this.afp(this.ah2); this.ah2 = this.dn(this.aie); break; case DataAnnotationStripLayer.$$p[2]: this.afp(this.ah3); this.ah3 = this.dn(this.aih); break; case "AnnotationBadgeBackgroundColumn": case "AnnotationBadgeOutlineColumn": case "AnnotationBadgeEnabledColumn": case "AnnotationBadgeImageColumn": this.acc(); break; } }; DataAnnotationStripLayer.prototype.aft = function (a, b) { _super.prototype.aft.call(this, a, b); if (typeCast(IFastItemsSource_$type, a) != null) { a.deregisterColumn(this.ah9); a.deregisterColumn(this.ah8); a.deregisterColumn(this.ah7); a.deregisterColumn(this.ah6); a.deregisterColumn(this.ah5); a.deregisterColumn(this.ah1); a.deregisterColumn(this.ah4); a.deregisterColumn(this.ah2); a.deregisterColumn(this.ah3); this.ah9 = null; this.ah8 = null; this.ah7 = null; this.ah6 = null; this.ah5 = null; this.ah1 = null; this.ah4 = null; this.ah2 = null; this.ah3 = null; } if (typeCast(IFastItemsSource_$type, b) != null) { this.ah9 = this.dl(this.ai2); this.ah8 = this.dn(this.aiz); this.ah7 = this.dl(this.aiv); this.ah6 = this.dn(this.ais); this.ah5 = this.dn(this.aio); this.ah1 = this.dn(this.aib); this.ah4 = this.dn(this.aik); this.ah2 = this.dn(this.aie); this.ah3 = this.dn(this.aih); } }; DataAnnotationStripLayer.prototype.agn = function (a, b, c, d) { if (b) { var e = this.ago(a, this.ah4); if (e == null) { e = this.agp(this.ac8, d); } return e; } else { var f = this.ago(a, this.ah1); if (f == null) { f = this.agp(this.ac7, d); } return f; } }; DataAnnotationStripLayer.prototype.adv = function (a, b) { if (this.ah2 == null || this.ah2.count <= a) { return this.aa2; } var c = this.ah2.item(a); return c != null ? c : this.aa2; }; DataAnnotationStripLayer.prototype.aeu = function (a, b) { var c = this.aev(a, this.ah3); return c != null ? c : this.abp; }; Object.defineProperty(DataAnnotationStripLayer.prototype, "ah9", { get: function () { return this.ah0; }, set: function (a) { if (this.ah0 != a) { var b = this.ah0; this.ah0 = a; this.raisePropertyChanged("StartValueColumn", b, this.ah0); } }, enumerable: false, configurable: true }); Object.defineProperty(DataAnnotationStripLayer.prototype, "ah8", { get: function () { return this.ahz; }, set: function (a) { if (this.ahz != a) { var b = this.ahz; this.ahz = a; this.raisePropertyChanged("StartLabelColumn", b, this.ahz); } }, enumerable: false, configurable: true }); Object.defineProperty(DataAnnotationStripLayer.prototype, "ah7", { get: function () { return this.ahy; }, set: function (a) { if (this.ahy != a) { var b = this.ahy; this.ahy = a; this.raisePropertyChanged("EndValueColumn", b, this.ahy); } }, enumerable: false, configurable: true }); Object.defineProperty(DataAnnotationStripLayer.prototype, "ah6", { get: function () { return this.ahx; }, set: function (a) { if (this.ahx != a) { var b = this.ahx; this.ahx = a; this.raisePropertyChanged("EndLabelColumn", b, this.ahx); } }, enumerable: false, configurable: true }); Object.defineProperty(DataAnnotationStripLayer.prototype, "ah5", { get: function () { return this.ahw; }, set: function (a) { if (this.ahw != a) { var b = this.ahw; this.ahw = a; this.raisePropertyChanged("CenterLabelColumn", b, this.ahw); } }, enumerable: false, configurable: true }); Object.defineProperty(DataAnnotationStripLayer.prototype, "ah2", { get: function () { return this.aht; }, set: function (a) { if (this.aht != a) { var b = this.aht; this.aht = a; this.raisePropertyChanged("AnnotationBadgeEnabledColumn", b, this.aht); } }, enumerable: false, configurable: true }); Object.defineProperty(DataAnnotationStripLayer.prototype, "ah1", { get: function () { return this.ahs; }, set: function (a) { if (this.ahs != a) { var b = this.ahs; this.ahs = a; this.raisePropertyChanged("AnnotationBadgeBackgroundColumn", b, this.ahs); } }, enumerable: false, configurable: true }); Object.defineProperty(DataAnnotationStripLayer.prototype, "ah4", { get: function () { return this.ahv; }, set: function (a) { if (this.ahv != a) { var b = this.ahv; this.ahv = a; this.raisePropertyChanged("AnnotationBadgeOutlineColumn", b, this.ahv); } }, enumerable: false, configurable: true }); Object.defineProperty(DataAnnotationStripLayer.prototype, "ah3", { get: function () { return this.ahu; }, set: function (a) { if (this.ahu != a) { var b = this.ahu; this.ahu = a; this.raisePropertyChanged("AnnotationBadgeImageColumn", b, this.ahu); } }, enumerable: false, configurable: true }); DataAnnotationStripLayer.$t = markType(DataAnnotationStripLayer, 'DataAnnotationStripLayer', DataAnnotationRangeLayer.$); DataAnnotationStripLayer.$$p = markDep(DependencyProperty, PropertyMetadata, DataAnnotationStripLayer, 'raisePropertyChanged', ['AnnotationBadgeBackgroundMemberPath:aib:ai4', [2, null], 'AnnotationBadgeEnabledMemberPath:aie:ai5', [2, null], 'AnnotationBadgeImageMemberPath:aih:ai6', [2, null], 'AnnotationBadgeOutlineMemberPath:aik:ai7', [2, null], 'CenterLabelDisplayMode:ahp:ai8', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 2)], 'CenterLabelMemberPath:aio:ai9', [2, null], 'EndLabelDisplayMode:ahq:aja', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'EndLabelMemberPath:ais:ajb', [2, null], 'EndValueMemberPath:aiv:ajc', [2, null], 'StartLabelDisplayMode:ahr:ajd', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'StartLabelMemberPath:aiz:aje', [2, null], 'StartValueMemberPath:ai2:ajf', [2, null]]); return DataAnnotationStripLayer; }(DataAnnotationRangeLayer)); export { DataAnnotationStripLayer };