igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
118 lines (117 loc) • 4.8 kB
JavaScript
/*
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 DataAnnotationLineLayer = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DataAnnotationLineLayer, _super);
function DataAnnotationLineLayer() {
var _this = _super.call(this) || this;
_this.ab = DataAnnotationLineLayer.$;
return _this;
}
DataAnnotationLineLayer.prototype.bk = function () {
return new DataAnnotationLineLayer();
};
DataAnnotationLineLayer.prototype.get_ad2 = function () {
return false;
};
DataAnnotationLineLayer.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.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.ahs(_this.aht, c);
$ret.b = _this.ahs(_this.ahu, d);
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.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.ahs(_this.ahp, c);
$ret.b = _this.ahs(_this.ahq, d);
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.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 = e;
$ret.b = f;
return $ret;
})()));
};
DataAnnotationLineLayer.$t = markType(DataAnnotationLineLayer, 'DataAnnotationLineLayer', DataAnnotationPointLayer.$);
return DataAnnotationLineLayer;
}(DataAnnotationPointLayer));
export { DataAnnotationLineLayer };