UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

124 lines (123 loc) 5.05 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 { DataAnnotationPointLayer } from "./DataAnnotationPointLayer"; import { markType } from "igniteui-angular-core"; import { List$1 } from "igniteui-angular-core"; import { DataAnnotationInfo } from "./DataAnnotationInfo"; import { isNaN_ } from "igniteui-angular-core"; import { stringIsNullOrEmpty } from "igniteui-angular-core"; /** * @hidden */ export let DataAnnotationLineLayer = /*@__PURE__*/ (() => { class DataAnnotationLineLayer extends DataAnnotationPointLayer { constructor() { super(); this.ab = DataAnnotationLineLayer.$; } bk() { return new DataAnnotationLineLayer(); } get_ad2() { return false; } afp(a) { if (!this.adv(a)) { return; } let 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.aij); b.centerLabelY = this.aet(a, this.aik); b.startLabelX = this.aet(a, this.aip); b.startLabelY = this.aet(a, this.aiq); b.endLabelX = this.aet(a, this.ail); b.endLabelY = this.aet(a, this.aim); b.shapeStartX = this.aea(a, this.air, this.ade); b.shapeStartY = this.aea(a, this.ais, this.adf); b.shapeEndX = this.aea(a, this.ain, this.ade); b.shapeEndY = this.aea(a, this.aio, 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); b.c.add(((() => { let $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.ahr; $ret.b = this.ahs; return $ret; })())); b.c.add(((() => { let $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.ahp; $ret.b = this.ahq; return $ret; })())); let c = this.ahn; if (c == 0) { if (stringIsNullOrEmpty(b.centerLabelX)) { c = 6; } } let d = this.aho; if (d == 0) { if (stringIsNullOrEmpty(b.centerLabelY)) { d = 6; } } b.b.add(((() => { let $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 = c; $ret.b = d; return $ret; })())); } } DataAnnotationLineLayer.$t = markType(DataAnnotationLineLayer, 'DataAnnotationLineLayer', DataAnnotationPointLayer.$); return DataAnnotationLineLayer; })();