igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
285 lines (284 loc) • 10.9 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 { __extends } from "tslib";
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
*/
var DataAnnotationStripLayer = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DataAnnotationStripLayer, _super);
function DataAnnotationStripLayer() {
var _this = _super.call(this) || this;
_this.agh = null;
_this.agg = null;
_this.agf = null;
_this.age = null;
_this.agd = null;
_this.ab = DataAnnotationStripLayer.$;
return _this;
}
DataAnnotationStripLayer.prototype.bk = function () {
return new DataAnnotationStripLayer();
};
DataAnnotationStripLayer.prototype.aef = function (a) {
var _this = this;
if (!this.acn(a)) {
return;
}
var 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);
var c = NaN;
var d = this.ac2(a, this.agm);
var 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(((function () {
var $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(((function () {
var $ret = new DataAnnotationInfo();
$ret.j = b.ab.x;
$ret.k = b.aa.y;
return $ret;
})()));
b.c.add(((function () {
var $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(((function () {
var $ret = new DataAnnotationInfo();
$ret.j = b.aa.x;
$ret.k = b.ab.y;
return $ret;
})()));
b.b.add(((function () {
var $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;
})()));
};
DataAnnotationStripLayer.prototype.rc = function (a, b, c, d) {
_super.prototype.rc.call(this, 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;
}
};
DataAnnotationStripLayer.prototype.aeh = function (a, b) {
_super.prototype.aeh.call(this, 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);
}
};
Object.defineProperty(DataAnnotationStripLayer.prototype, "agm", {
get: function () {
return this.agh;
},
set: function (a) {
if (this.agh != a) {
var b = this.agh;
this.agh = a;
this.raisePropertyChanged("StartValueColumn", b, this.agh);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "agl", {
get: function () {
return this.agg;
},
set: function (a) {
if (this.agg != a) {
var b = this.agg;
this.agg = a;
this.raisePropertyChanged("StartLabelColumn", b, this.agg);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "agk", {
get: function () {
return this.agf;
},
set: function (a) {
if (this.agf != a) {
var b = this.agf;
this.agf = a;
this.raisePropertyChanged("EndValueColumn", b, this.agf);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "agj", {
get: function () {
return this.age;
},
set: function (a) {
if (this.age != a) {
var b = this.age;
this.age = a;
this.raisePropertyChanged("EndLabelColumn", b, this.age);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "agi", {
get: function () {
return this.agd;
},
set: function (a) {
if (this.agd != a) {
var b = this.agd;
this.agd = a;
this.raisePropertyChanged("CenterLabelColumn", b, this.agd);
}
},
enumerable: false,
configurable: true
});
DataAnnotationStripLayer.$t = markType(DataAnnotationStripLayer, 'DataAnnotationStripLayer', DataAnnotationRangeLayer.$);
DataAnnotationStripLayer.$$p = markDep(DependencyProperty, PropertyMetadata, DataAnnotationStripLayer, 'raisePropertyChanged', ['CenterLabelDisplayMode:aga:ag5', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 2)], 'CenterLabelMemberPath:agp:ag6', [2, null], 'EndLabelDisplayMode:agb:ag7', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'EndLabelMemberPath:agt:ag8', [2, null], 'EndValueMemberPath:agw:ag9', [2, null], 'StartLabelDisplayMode:agc:aha', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'StartLabelMemberPath:ag0:ahb', [2, null], 'StartValueMemberPath:ag3:ahc', [2, null]]);
return DataAnnotationStripLayer;
}(DataAnnotationRangeLayer));
export { DataAnnotationStripLayer };