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.agh = null; this.agg = null; this.agf = null; this.age = null; this.agd = null; this.ab = DataAnnotationStripLayer.$; } bk() { return new DataAnnotationStripLayer(); } aef(a) { if (!this.acn(a)) { return; } let b = this.acx._inner[a]; b.c = new List$1(DataAnnotationInfo.$, 0); b.b = new List$1(DataAnnotationInfo.$, 0); b.centerLabelX = this.adj(a, this.agi); b.centerLabelY = this.adj(a, this.agi); b.startLabelX = this.adj(a, this.agl); b.startLabelY = this.adj(a, this.agl); b.endLabelX = this.adj(a, this.agj); b.endLabelY = this.adj(a, this.agj); let c = NaN; let d = this.ac2(a, this.agm); let e = this.ac2(a, this.agk); 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.acm) { 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.af9; $ret.background = this.af7; $ret.borderColor = this.af8; $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.acm ? this.agc : 6; $ret.b = !this.acm ? this.agc : 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.af6; $ret.background = this.af4; $ret.borderColor = this.af5; $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.acm ? this.agb : 6; $ret.b = !this.acm ? this.agb : 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.af3; $ret.background = this.af1; $ret.borderColor = this.af2; $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.acm ? this.aga : 6; $ret.b = !this.acm ? this.aga : 6; return $ret; })())); } rc(a, b, c, d) { super.rc(a, b, c, d); switch (b) { case DataAnnotationStripLayer.$$p[7]: if (this.dp != null) { this.dp.deregisterColumn(this.agm); this.agm = this.dl(this.ag3); } break; case DataAnnotationStripLayer.$$p[4]: if (this.dp != null) { this.dp.deregisterColumn(this.agk); this.agk = this.dl(this.agw); } break; case DataAnnotationStripLayer.$$p[6]: if (this.dp != null) { this.dp.deregisterColumn(this.agl); this.agl = this.dn(this.ag0); } break; case DataAnnotationStripLayer.$$p[3]: if (this.dp != null) { this.dp.deregisterColumn(this.agj); this.agj = this.dn(this.agt); } break; case DataAnnotationStripLayer.$$p[1]: if (this.dp != null) { this.dp.deregisterColumn(this.agi); this.agi = this.dn(this.agp); } break; case "StartValueColumn": case "StartLabelColumn": case DataAnnotationStripLayer.$$p[5]: case "EndValueColumn": case "EndLabelColumn": case DataAnnotationStripLayer.$$p[2]: case "CenterLabelColumn": case DataAnnotationStripLayer.$$p[0]: this.abe(); break; } } aeh(a, b) { super.aeh(a, b); if (typeCast(IFastItemsSource_$type, a) != null) { a.deregisterColumn(this.agm); a.deregisterColumn(this.agl); a.deregisterColumn(this.agk); a.deregisterColumn(this.agj); a.deregisterColumn(this.agi); this.agm = null; this.agl = null; this.agk = null; this.agj = null; this.agi = null; } if (typeCast(IFastItemsSource_$type, b) != null) { this.agm = this.dl(this.ag3); this.agl = this.dn(this.ag0); this.agk = this.dl(this.agw); this.agj = this.dn(this.agt); this.agi = this.dn(this.agp); } } get agm() { return this.agh; } set agm(a) { if (this.agh != a) { let b = this.agh; this.agh = a; this.raisePropertyChanged("StartValueColumn", b, this.agh); } } get agl() { return this.agg; } set agl(a) { if (this.agg != a) { let b = this.agg; this.agg = a; this.raisePropertyChanged("StartLabelColumn", b, this.agg); } } get agk() { return this.agf; } set agk(a) { if (this.agf != a) { let b = this.agf; this.agf = a; this.raisePropertyChanged("EndValueColumn", b, this.agf); } } get agj() { return this.age; } set agj(a) { if (this.age != a) { let b = this.age; this.age = a; this.raisePropertyChanged("EndLabelColumn", b, this.age); } } get agi() { return this.agd; } set agi(a) { if (this.agd != a) { let b = this.agd; this.agd = a; this.raisePropertyChanged("CenterLabelColumn", b, this.agd); } } } DataAnnotationStripLayer.$t = /*@__PURE__*/ markType(DataAnnotationStripLayer, 'DataAnnotationStripLayer', DataAnnotationRangeLayer.$); DataAnnotationStripLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, DataAnnotationStripLayer, 'raisePropertyChanged', ['CenterLabelDisplayMode:aga:ag5', [DataAnnotationDisplayMode_$type, /*@__PURE__*/ enumGetBox(DataAnnotationDisplayMode_$type, 2)], 'CenterLabelMemberPath:agp:ag6', [2, null], 'EndLabelDisplayMode:agb:ag7', [DataAnnotationDisplayMode_$type, /*@__PURE__*/ enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'EndLabelMemberPath:agt:ag8', [2, null], 'EndValueMemberPath:agw:ag9', [2, null], 'StartLabelDisplayMode:agc:aha', [DataAnnotationDisplayMode_$type, /*@__PURE__*/ enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'StartLabelMemberPath:ag0:ahb', [2, null], 'StartValueMemberPath:ag3:ahc', [2, null]]); return DataAnnotationStripLayer; })();