UNPKG

igniteui-react-charts

Version:

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

127 lines (126 loc) 5.17 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 { DataAnnotationPointLayer } from "./DataAnnotationPointLayer"; import { markType } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { DataAnnotationInfo } from "./DataAnnotationInfo"; import { isNaN_ } from "igniteui-react-core"; /** * @hidden */ var DataAnnotationRectLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(DataAnnotationRectLayer, _super); function DataAnnotationRectLayer() { var _this = _super.call(this) || this; _this.ab = DataAnnotationRectLayer.$; return _this; } DataAnnotationRectLayer.prototype.bk = function () { return new DataAnnotationRectLayer(); }; DataAnnotationRectLayer.prototype.afp = function (a) { var _this = this; if (!this.adv(a)) { return; } var b = this.ad5._inner[a]; b.c = new List$1(DataAnnotationInfo.$, 0); b.b = new List$1(DataAnnotationInfo.$, 0); b.centerLabelX = this.aet(a, this.ail); b.centerLabelY = this.aet(a, this.aim); b.startLabelX = this.aet(a, this.air); b.startLabelY = this.aet(a, this.ais); b.endLabelX = this.aet(a, this.ain); b.endLabelY = this.aet(a, this.aio); b.shapeStartX = this.aea(a, this.ait, this.ade); b.shapeStartY = this.aea(a, this.aiu, this.adf); b.shapeEndX = this.aea(a, this.aip, this.ade); b.shapeEndY = this.aea(a, this.aiq, this.adf); if (isNaN_(b.shapeStartX)) { b.shapeStartX = b.shapeEndX; } if (isNaN_(b.shapeStartY)) { b.shapeStartY = b.shapeEndY; } if (isNaN_(b.shapeEndX)) { b.shapeEndX = b.shapeStartX; } if (isNaN_(b.shapeEndY)) { b.shapeEndY = b.shapeStartY; } b.shapeCenterX = b.shapeStartX + ((b.shapeEndX - b.shapeStartX) / 2); b.shapeCenterY = b.shapeStartY + ((b.shapeEndY - b.shapeStartY) / 2); var c = this.aav != null && this.aav != this.ade; var d = this.aav != null && this.aav != this.adf; b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.isStartLabel = true; $ret.textColor = _this.ahm; $ret.background = _this.ahk; $ret.borderColor = _this.ahl; $ret.q = b.shapeStartX; $ret.r = b.shapeStartY; $ret.dataLabelX = b.startLabelX; $ret.dataLabelY = b.startLabelY; $ret.dataValueX = b.shapeStartX; $ret.dataValueY = b.shapeStartY; $ret.a = _this.ahs(_this.aht, c); $ret.b = _this.ahs(_this.ahu, d); return $ret; })())); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.q = b.shapeStartX; $ret.r = b.shapeEndY; return $ret; })())); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.isEndLabel = true; $ret.textColor = _this.ahj; $ret.background = _this.ahh; $ret.borderColor = _this.ahi; $ret.q = b.shapeEndX; $ret.r = b.shapeEndY; $ret.dataLabelX = b.endLabelX; $ret.dataLabelY = b.endLabelY; $ret.dataValueX = b.shapeEndX; $ret.dataValueY = b.shapeEndY; $ret.a = _this.ahs(_this.ahp, c); $ret.b = _this.ahs(_this.ahq, d); return $ret; })())); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.q = b.shapeEndX; $ret.r = b.shapeStartY; return $ret; })())); var e = this.ahr(this.ahn, c, b.centerLabelX); var f = this.ahr(this.aho, d, b.centerLabelY); b.b.add(((function () { var $ret = new DataAnnotationInfo(); $ret.isCenterLabel = true; $ret.textColor = _this.ahg; $ret.background = _this.ahe; $ret.borderColor = _this.ahf; $ret.q = b.shapeCenterX; $ret.r = b.shapeCenterY; $ret.dataLabelX = b.centerLabelX; $ret.dataLabelY = b.centerLabelY; $ret.dataValueX = b.shapeCenterX; $ret.dataValueY = b.shapeCenterY; $ret.a = e; $ret.b = f; return $ret; })())); }; DataAnnotationRectLayer.$t = markType(DataAnnotationRectLayer, 'DataAnnotationRectLayer', DataAnnotationPointLayer.$); return DataAnnotationRectLayer; }(DataAnnotationPointLayer)); export { DataAnnotationRectLayer };