UNPKG

igniteui-react-charts

Version:

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

193 lines (192 loc) 7.19 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 { DependencyProperty } from "igniteui-react-core"; import { typeCast, markType, markDep } from "igniteui-react-core"; 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"; import { stringIsNullOrEmpty } from "igniteui-react-core"; /** * @hidden */ var DataAnnotationBandLayer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(DataAnnotationBandLayer, _super); function DataAnnotationBandLayer() { var _this = _super.call(this) || this; _this.aim = null; _this.ab = DataAnnotationBandLayer.$; return _this; } DataAnnotationBandLayer.prototype.bk = function () { return new DataAnnotationBandLayer(); }; DataAnnotationBandLayer.prototype.ael = function (a) { var _this = this; if (!this.act(a)) { return; } var b = this.ac3._inner[a]; b.c = new List$1(DataAnnotationInfo.$, 0); b.b = new List$1(DataAnnotationInfo.$, 0); b.centerLabelX = this.adp(a, this.agw); b.centerLabelY = this.adp(a, this.agx); b.startLabelX = this.adp(a, this.ag2); b.startLabelY = this.adp(a, this.ag3); b.endLabelX = this.adp(a, this.agy); b.endLabelY = this.adp(a, this.agz); b.shapeStartX = this.ac8(a, this.ag4); b.shapeStartY = this.ac8(a, this.ag5); b.shapeEndX = this.ac8(a, this.ag0); b.shapeEndY = this.ac8(a, this.ag1); var c = this.ac8(a, this.ain); if (isNaN_(c)) { c = this.acv ? 0.2 : 20; } var d = c / 2; 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); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.j = b.ab.x; $ret.k = b.ab.y + d; return $ret; })())); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.j = b.ab.x; $ret.k = b.ab.y - d; return $ret; })())); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.j = b.aa.x; $ret.k = b.aa.y - d; return $ret; })())); b.c.add(((function () { var $ret = new DataAnnotationInfo(); $ret.j = b.aa.x; $ret.k = b.aa.y + d; return $ret; })())); b.b.add(((function () { var $ret = new DataAnnotationInfo(); $ret.textColor = _this.agf; $ret.background = _this.agd; $ret.borderColor = _this.age; $ret.j = b.ab.x; $ret.k = b.ab.y; $ret.dataLabelX = b.startLabelX; $ret.dataLabelY = b.startLabelY; $ret.dataValueX = b.ab.x; $ret.dataValueY = b.ab.y; $ret.a = _this.agk; $ret.b = _this.agl; return $ret; })())); b.b.add(((function () { var $ret = new DataAnnotationInfo(); $ret.textColor = _this.agc; $ret.background = _this.aga; $ret.borderColor = _this.agb; $ret.j = b.aa.x; $ret.k = b.aa.y; $ret.dataLabelX = b.endLabelX; $ret.dataLabelY = b.endLabelY; $ret.dataValueX = b.aa.x; $ret.dataValueY = b.aa.y; $ret.a = _this.agi; $ret.b = _this.agj; return $ret; })())); var e = this.agg; if (e == 0) { if (stringIsNullOrEmpty(b.centerLabelX)) { e = 6; } } var f = this.agh; if (f == 0) { if (stringIsNullOrEmpty(b.centerLabelY)) { f = 6; } } b.b.add(((function () { var $ret = new DataAnnotationInfo(); $ret.textColor = _this.af9; $ret.background = _this.af7; $ret.borderColor = _this.af8; $ret.j = b.z.x; $ret.k = b.z.y; $ret.dataLabelX = b.centerLabelX; $ret.dataLabelY = b.centerLabelY; $ret.dataValueX = b.z.x; $ret.dataValueY = b.z.y; $ret.a = e; $ret.b = f; return $ret; })())); }; DataAnnotationBandLayer.prototype.rh = function (a, b, c, d) { _super.prototype.rh.call(this, a, b, c, d); switch (b) { case "BreadthAnnotationColumn": this.abk(); break; case DataAnnotationBandLayer.$$p[0]: if (this.dp != null) { this.dp.deregisterColumn(this.ain); this.ain = this.dl(this.aio); } break; } }; DataAnnotationBandLayer.prototype.aen = function (a, b) { _super.prototype.aen.call(this, a, b); if (typeCast(IFastItemsSource_$type, a) != null) { a.deregisterColumn(this.ain); this.ain = null; } if (typeCast(IFastItemsSource_$type, b) != null) { this.ain = this.dl(this.aio); } }; Object.defineProperty(DataAnnotationBandLayer.prototype, "ain", { get: function () { return this.aim; }, set: function (a) { if (this.aim != a) { var b = this.aim; this.aim = a; this.raisePropertyChanged("BreadthAnnotationColumn", b, this.aim); } }, enumerable: false, configurable: true }); DataAnnotationBandLayer.$t = markType(DataAnnotationBandLayer, 'DataAnnotationBandLayer', DataAnnotationPointLayer.$); DataAnnotationBandLayer.$$p = markDep(DependencyProperty, PropertyMetadata, DataAnnotationBandLayer, 'raisePropertyChanged', ['AnnotationBreadthMemberPath:aio:air', [2, null]]); return DataAnnotationBandLayer; }(DataAnnotationPointLayer)); export { DataAnnotationBandLayer };