UNPKG

igniteui-react-charts

Version:

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

180 lines (179 loc) 7.26 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 { 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"; /** * @hidden */ export let DataAnnotationBandLayer = /*@__PURE__*/ (() => { class DataAnnotationBandLayer extends DataAnnotationPointLayer { constructor() { super(); this.ak9 = null; this.ab = DataAnnotationBandLayer.$; } bk() { return new DataAnnotationBandLayer(); } afr(a) { if (!this.adx(a)) { return; } let 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.ain); b.centerLabelY = this.aev(a, this.aio); b.startLabelX = this.aev(a, this.ait); b.startLabelY = this.aev(a, this.aiu); b.endLabelX = this.aev(a, this.aip); b.endLabelY = this.aev(a, this.aiq); b.shapeStartX = this.aec(a, this.aiv, this.adg); b.shapeStartY = this.aec(a, this.aiw, this.adh); b.shapeEndX = this.aec(a, this.air, this.adg); b.shapeEndY = this.aec(a, this.ais, this.adh); let c = this.aec(a, this.ala, this.adh); if (isNaN_(c)) { c = this.adz ? 0.2 : 20; } let 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(((() => { let $ret = new DataAnnotationInfo(); $ret.q = b.ab.x; $ret.r = b.ab.y + d; return $ret; })())); b.c.add(((() => { let $ret = new DataAnnotationInfo(); $ret.q = b.ab.x; $ret.r = b.ab.y - d; return $ret; })())); b.c.add(((() => { let $ret = new DataAnnotationInfo(); $ret.q = b.aa.x; $ret.r = b.aa.y - d; return $ret; })())); b.c.add(((() => { let $ret = new DataAnnotationInfo(); $ret.q = b.aa.x; $ret.r = b.aa.y + d; return $ret; })())); let e = this.aax != null && this.aax != this.adg; let f = this.aax != null && this.aax != this.adh; b.b.add(((() => { let $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.ahu(this.ahv, e); $ret.b = this.ahu(this.ahw, f); return $ret; })())); b.b.add(((() => { let $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.ahu(this.ahr, e); $ret.b = this.ahu(this.ahs, f); return $ret; })())); let g = this.aht(this.ahp, e, b.centerLabelX); let h = this.aht(this.ahq, f, b.centerLabelY); b.b.add(((() => { let $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 = g; $ret.b = h; return $ret; })())); } rs(a, b, c, d) { super.rs(a, b, c, d); switch (b) { case "BreadthAnnotationColumn": this.acc(); break; case DataAnnotationBandLayer.$$p[0]: if (this.dp != null) { this.dp.deregisterColumn(this.ala); this.ala = this.dl(this.alb); } break; } } aft(a, b) { super.aft(a, b); if (typeCast(IFastItemsSource_$type, a) != null) { a.deregisterColumn(this.ala); this.ala = null; } if (typeCast(IFastItemsSource_$type, b) != null) { this.ala = this.dl(this.alb); } } get ala() { return this.ak9; } set ala(a) { if (this.ak9 != a) { let b = this.ak9; this.ak9 = a; this.raisePropertyChanged("BreadthAnnotationColumn", b, this.ak9); } } } DataAnnotationBandLayer.$t = /*@__PURE__*/ markType(DataAnnotationBandLayer, 'DataAnnotationBandLayer', DataAnnotationPointLayer.$); DataAnnotationBandLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, DataAnnotationBandLayer, 'raisePropertyChanged', ['AnnotationBreadthMemberPath:alb:ale', [2, null]]); return DataAnnotationBandLayer; })();