igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
377 lines (376 loc) • 14.5 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 { 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.ahz = null;
this.ahy = null;
this.ahx = null;
this.ahw = null;
this.ahv = null;
this.ahs = null;
this.ahr = null;
this.ahu = null;
this.aht = null;
this.ab = DataAnnotationStripLayer.$;
}
bk() {
return new DataAnnotationStripLayer();
}
aem(a) {
if (isNaN_(this.aec)) {
return a.dm ? 90 : 0;
}
return this.aec;
}
afq(a) {
if (!this.adw(a)) {
return;
}
let b = this.ad6._inner[a];
b.c = new List$1(DataAnnotationInfo.$, 0);
b.b = new List$1(DataAnnotationInfo.$, 0);
b.centerLabelX = this.aeu(a, this.ah4);
b.centerLabelY = this.aeu(a, this.ah4);
b.startLabelX = this.aeu(a, this.ah7);
b.startLabelY = this.aeu(a, this.ah7);
b.endLabelX = this.aeu(a, this.ah5);
b.endLabelY = this.aeu(a, this.ah5);
let c = NaN;
let d = this.adv ? this.adf : this.adg;
let e = this.aeb(a, this.ah8, d);
let f = this.aeb(a, this.ah6, d);
if (isNaN_(e) && !isNaN_(f)) {
b.startLabelX = null;
b.startLabelY = null;
}
if (!isNaN_(e) && isNaN_(f)) {
b.endLabelX = null;
b.endLabelY = null;
}
if (isNaN_(e)) {
e = f;
}
if (isNaN_(f)) {
f = e;
}
if (isNaN_(c)) {
c = e + ((f - e) / 2);
}
if (this.adv) {
b.shapeStartX = e;
b.shapeStartY = Number.NEGATIVE_INFINITY;
b.shapeEndX = f;
b.shapeEndY = Number.POSITIVE_INFINITY;
b.shapeCenterX = c;
b.shapeCenterY = 0;
}
else {
b.shapeStartX = Number.NEGATIVE_INFINITY;
b.shapeStartY = e;
b.shapeEndX = Number.POSITIVE_INFINITY;
b.shapeEndY = f;
b.shapeCenterX = 0;
b.shapeCenterY = c;
}
b.c.add(((() => {
let $ret = new DataAnnotationInfo();
$ret.isStartLabel = true;
$ret.textColor = this.ahn;
$ret.background = this.ahl;
$ret.borderColor = this.ahm;
$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.adv ? this.ahq : 6;
$ret.b = !this.adv ? this.ahq : 6;
return $ret;
})()));
b.c.add(((() => {
let $ret = new DataAnnotationInfo();
$ret.q = b.ab.x;
$ret.r = b.aa.y;
return $ret;
})()));
b.c.add(((() => {
let $ret = new DataAnnotationInfo();
$ret.isEndLabel = true;
$ret.textColor = this.ahk;
$ret.background = this.ahi;
$ret.borderColor = this.ahj;
$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.adv ? this.ahp : 6;
$ret.b = !this.adv ? this.ahp : 6;
return $ret;
})()));
b.c.add(((() => {
let $ret = new DataAnnotationInfo();
$ret.q = b.aa.x;
$ret.r = b.ab.y;
return $ret;
})()));
b.b.add(((() => {
let $ret = new DataAnnotationInfo();
$ret.isCenterLabel = true;
$ret.textColor = this.ahh;
$ret.background = this.ahf;
$ret.borderColor = this.ahg;
$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 = this.adv ? this.aho : 6;
$ret.b = !this.adv ? this.aho : 6;
return $ret;
})()));
}
rr(a, b, c, d) {
super.rr(a, b, c, d);
switch (b) {
case DataAnnotationStripLayer.$$p[11]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah8);
this.ah8 = this.dl(this.ai1);
}
break;
case DataAnnotationStripLayer.$$p[8]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah6);
this.ah6 = this.dl(this.aiu);
}
break;
case DataAnnotationStripLayer.$$p[10]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah7);
this.ah7 = this.dn(this.aiy);
}
break;
case DataAnnotationStripLayer.$$p[7]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah5);
this.ah5 = this.dn(this.air);
}
break;
case DataAnnotationStripLayer.$$p[5]:
if (this.dp != null) {
this.dp.deregisterColumn(this.ah4);
this.ah4 = this.dn(this.ain);
}
break;
case "StartValueColumn":
case "StartLabelColumn":
case DataAnnotationStripLayer.$$p[9]:
case "EndValueColumn":
case "EndLabelColumn":
case DataAnnotationStripLayer.$$p[6]:
case "CenterLabelColumn":
case DataAnnotationStripLayer.$$p[4]:
this.acb();
break;
case DataAnnotationStripLayer.$$p[0]:
this.afo(this.ah0);
this.ah0 = this.dn(this.aia);
break;
case DataAnnotationStripLayer.$$p[3]:
this.afo(this.ah3);
this.ah3 = this.dn(this.aij);
break;
case DataAnnotationStripLayer.$$p[1]:
this.afo(this.ah1);
this.ah1 = this.dn(this.aid);
break;
case DataAnnotationStripLayer.$$p[2]:
this.afo(this.ah2);
this.ah2 = this.dn(this.aig);
break;
case "AnnotationBadgeBackgroundColumn":
case "AnnotationBadgeOutlineColumn":
case "AnnotationBadgeEnabledColumn":
case "AnnotationBadgeImageColumn":
this.acb();
break;
}
}
afs(a, b) {
super.afs(a, b);
if (typeCast(IFastItemsSource_$type, a) != null) {
a.deregisterColumn(this.ah8);
a.deregisterColumn(this.ah7);
a.deregisterColumn(this.ah6);
a.deregisterColumn(this.ah5);
a.deregisterColumn(this.ah4);
a.deregisterColumn(this.ah0);
a.deregisterColumn(this.ah3);
a.deregisterColumn(this.ah1);
a.deregisterColumn(this.ah2);
this.ah8 = null;
this.ah7 = null;
this.ah6 = null;
this.ah5 = null;
this.ah4 = null;
this.ah0 = null;
this.ah3 = null;
this.ah1 = null;
this.ah2 = null;
}
if (typeCast(IFastItemsSource_$type, b) != null) {
this.ah8 = this.dl(this.ai1);
this.ah7 = this.dn(this.aiy);
this.ah6 = this.dl(this.aiu);
this.ah5 = this.dn(this.air);
this.ah4 = this.dn(this.ain);
this.ah0 = this.dn(this.aia);
this.ah3 = this.dn(this.aij);
this.ah1 = this.dn(this.aid);
this.ah2 = this.dn(this.aig);
}
}
agm(a, b, c, d) {
if (b) {
let e = this.agn(a, this.ah3);
if (e == null) {
e = this.ago(this.ac7, d);
}
return e;
}
else {
let f = this.agn(a, this.ah0);
if (f == null) {
f = this.ago(this.ac6, d);
}
return f;
}
}
adu(a, b) {
if (this.ah1 == null || this.ah1.count <= a) {
return this.aa1;
}
let c = this.ah1.item(a);
return c != null ? c : this.aa1;
}
aet(a, b) {
let c = this.aeu(a, this.ah2);
return c != null ? c : this.abo;
}
get ah8() {
return this.ahz;
}
set ah8(a) {
if (this.ahz != a) {
let b = this.ahz;
this.ahz = a;
this.raisePropertyChanged("StartValueColumn", b, this.ahz);
}
}
get ah7() {
return this.ahy;
}
set ah7(a) {
if (this.ahy != a) {
let b = this.ahy;
this.ahy = a;
this.raisePropertyChanged("StartLabelColumn", b, this.ahy);
}
}
get ah6() {
return this.ahx;
}
set ah6(a) {
if (this.ahx != a) {
let b = this.ahx;
this.ahx = a;
this.raisePropertyChanged("EndValueColumn", b, this.ahx);
}
}
get ah5() {
return this.ahw;
}
set ah5(a) {
if (this.ahw != a) {
let b = this.ahw;
this.ahw = a;
this.raisePropertyChanged("EndLabelColumn", b, this.ahw);
}
}
get ah4() {
return this.ahv;
}
set ah4(a) {
if (this.ahv != a) {
let b = this.ahv;
this.ahv = a;
this.raisePropertyChanged("CenterLabelColumn", b, this.ahv);
}
}
get ah1() {
return this.ahs;
}
set ah1(a) {
if (this.ahs != a) {
let b = this.ahs;
this.ahs = a;
this.raisePropertyChanged("AnnotationBadgeEnabledColumn", b, this.ahs);
}
}
get ah0() {
return this.ahr;
}
set ah0(a) {
if (this.ahr != a) {
let b = this.ahr;
this.ahr = a;
this.raisePropertyChanged("AnnotationBadgeBackgroundColumn", b, this.ahr);
}
}
get ah3() {
return this.ahu;
}
set ah3(a) {
if (this.ahu != a) {
let b = this.ahu;
this.ahu = a;
this.raisePropertyChanged("AnnotationBadgeOutlineColumn", b, this.ahu);
}
}
get ah2() {
return this.aht;
}
set ah2(a) {
if (this.aht != a) {
let b = this.aht;
this.aht = a;
this.raisePropertyChanged("AnnotationBadgeImageColumn", b, this.aht);
}
}
}
DataAnnotationStripLayer.$t = /*@__PURE__*/ markType(DataAnnotationStripLayer, 'DataAnnotationStripLayer', DataAnnotationRangeLayer.$);
DataAnnotationStripLayer.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, DataAnnotationStripLayer, 'raisePropertyChanged', ['AnnotationBadgeBackgroundMemberPath:aia:ai3', [2, null], 'AnnotationBadgeEnabledMemberPath:aid:ai4', [2, null], 'AnnotationBadgeImageMemberPath:aig:ai5', [2, null], 'AnnotationBadgeOutlineMemberPath:aij:ai6', [2, null], 'CenterLabelDisplayMode:aho:ai7', [DataAnnotationDisplayMode_$type, /*@__PURE__*/ enumGetBox(DataAnnotationDisplayMode_$type, 2)], 'CenterLabelMemberPath:ain:ai8', [2, null], 'EndLabelDisplayMode:ahp:ai9', [DataAnnotationDisplayMode_$type, /*@__PURE__*/ enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'EndLabelMemberPath:air:aja', [2, null], 'EndValueMemberPath:aiu:ajb', [2, null], 'StartLabelDisplayMode:ahq:ajc', [DataAnnotationDisplayMode_$type, /*@__PURE__*/ enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'StartLabelMemberPath:aiy:ajd', [2, null], 'StartValueMemberPath:ai1:aje', [2, null]]);
return DataAnnotationStripLayer;
})();