UNPKG

igniteui-react-charts

Version:

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

262 lines (261 loc) 10.5 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 { DataAnnotationRangeLayer } from "./DataAnnotationRangeLayer"; import { DependencyProperty } from "igniteui-react-core"; import { typeCast, enumGetBox, markType, markDep } from "igniteui-react-core"; import { DataAnnotationDisplayMode_$type } from "./DataAnnotationDisplayMode"; 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 DataAnnotationStripLayer = /*@__PURE__*/ (() => { class DataAnnotationStripLayer extends DataAnnotationRangeLayer { constructor() { super(); this.agn = null; this.agm = null; this.agl = null; this.agk = null; this.agj = null; this.ab = DataAnnotationStripLayer.$; } bk() { return new DataAnnotationStripLayer(); } ael(a) { if (!this.act(a)) { return; } let 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.ago); b.centerLabelY = this.adp(a, this.ago); b.startLabelX = this.adp(a, this.agr); b.startLabelY = this.adp(a, this.agr); b.endLabelX = this.adp(a, this.agp); b.endLabelY = this.adp(a, this.agp); let c = NaN; let d = this.ac8(a, this.ags); let e = this.ac8(a, this.agq); if (isNaN_(d) && !isNaN_(e)) { b.startLabelX = null; b.startLabelY = null; } if (!isNaN_(d) && isNaN_(e)) { b.endLabelX = null; b.endLabelY = null; } if (isNaN_(d)) { d = e; } if (isNaN_(e)) { e = d; } if (isNaN_(c)) { c = d + ((e - d) / 2); } if (this.acs) { b.shapeStartX = d; b.shapeStartY = Number.NEGATIVE_INFINITY; b.shapeEndX = e; b.shapeEndY = Number.POSITIVE_INFINITY; b.shapeCenterX = c; b.shapeCenterY = 0; } else { b.shapeStartX = Number.NEGATIVE_INFINITY; b.shapeStartY = d; b.shapeEndX = Number.POSITIVE_INFINITY; b.shapeEndY = e; b.shapeCenterX = 0; b.shapeCenterY = c; } b.c.add(((() => { let $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.acs ? this.agi : 6; $ret.b = !this.acs ? this.agi : 6; return $ret; })())); b.c.add(((() => { let $ret = new DataAnnotationInfo(); $ret.j = b.ab.x; $ret.k = b.aa.y; return $ret; })())); b.c.add(((() => { let $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.acs ? this.agh : 6; $ret.b = !this.acs ? this.agh : 6; return $ret; })())); b.c.add(((() => { let $ret = new DataAnnotationInfo(); $ret.j = b.aa.x; $ret.k = b.ab.y; return $ret; })())); b.b.add(((() => { let $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 = this.acs ? this.agg : 6; $ret.b = !this.acs ? this.agg : 6; return $ret; })())); } rh(a, b, c, d) { super.rh(a, b, c, d); switch (b) { case DataAnnotationStripLayer.$$p[7]: if (this.dp != null) { this.dp.deregisterColumn(this.ags); this.ags = this.dl(this.ag9); } break; case DataAnnotationStripLayer.$$p[4]: if (this.dp != null) { this.dp.deregisterColumn(this.agq); this.agq = this.dl(this.ag2); } break; case DataAnnotationStripLayer.$$p[6]: if (this.dp != null) { this.dp.deregisterColumn(this.agr); this.agr = this.dn(this.ag6); } break; case DataAnnotationStripLayer.$$p[3]: if (this.dp != null) { this.dp.deregisterColumn(this.agp); this.agp = this.dn(this.agz); } break; case DataAnnotationStripLayer.$$p[1]: if (this.dp != null) { this.dp.deregisterColumn(this.ago); this.ago = this.dn(this.agv); } break; case "StartValueColumn": case "StartLabelColumn": case DataAnnotationStripLayer.$$p[5]: case "EndValueColumn": case "EndLabelColumn": case DataAnnotationStripLayer.$$p[2]: case "CenterLabelColumn": case DataAnnotationStripLayer.$$p[0]: this.abk(); break; } } aen(a, b) { super.aen(a, b); if (typeCast(IFastItemsSource_$type, a) != null) { a.deregisterColumn(this.ags); a.deregisterColumn(this.agr); a.deregisterColumn(this.agq); a.deregisterColumn(this.agp); a.deregisterColumn(this.ago); this.ags = null; this.agr = null; this.agq = null; this.agp = null; this.ago = null; } if (typeCast(IFastItemsSource_$type, b) != null) { this.ags = this.dl(this.ag9); this.agr = this.dn(this.ag6); this.agq = this.dl(this.ag2); this.agp = this.dn(this.agz); this.ago = this.dn(this.agv); } } get ags() { return this.agn; } set ags(a) { if (this.agn != a) { let b = this.agn; this.agn = a; this.raisePropertyChanged("StartValueColumn", b, this.agn); } } get agr() { return this.agm; } set agr(a) { if (this.agm != a) { let b = this.agm; this.agm = a; this.raisePropertyChanged("StartLabelColumn", b, this.agm); } } get agq() { return this.agl; } set agq(a) { if (this.agl != a) { let b = this.agl; this.agl = a; this.raisePropertyChanged("EndValueColumn", b, this.agl); } } get agp() { return this.agk; } set agp(a) { if (this.agk != a) { let b = this.agk; this.agk = a; this.raisePropertyChanged("EndLabelColumn", b, this.agk); } } get ago() { return this.agj; } set ago(a) { if (this.agj != a) { let b = this.agj; this.agj = a; this.raisePropertyChanged("CenterLabelColumn", b, this.agj); } } } DataAnnotationStripLayer.$t = /*@__PURE__*/ markType(DataAnnotationStripLayer, 'DataAnnotationStripLayer', DataAnnotationRangeLayer.$); DataAnnotationStripLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, DataAnnotationStripLayer, 'raisePropertyChanged', ['CenterLabelDisplayMode:agg:ahb', [DataAnnotationDisplayMode_$type, /*@__PURE__*/ enumGetBox(DataAnnotationDisplayMode_$type, 2)], 'CenterLabelMemberPath:agv:ahc', [2, null], 'EndLabelDisplayMode:agh:ahd', [DataAnnotationDisplayMode_$type, /*@__PURE__*/ enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'EndLabelMemberPath:agz:ahe', [2, null], 'EndValueMemberPath:ag2:ahf', [2, null], 'StartLabelDisplayMode:agi:ahg', [DataAnnotationDisplayMode_$type, /*@__PURE__*/ enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'StartLabelMemberPath:ag6:ahh', [2, null], 'StartValueMemberPath:ag9:ahi', [2, null]]); return DataAnnotationStripLayer; })();