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.agn = null;
_this.agm = null;
_this.agl = null;
_this.agk = null;
_this.agj = null;
_this.ab = DataAnnotationStripLayer.$;
return _this;
}
DataAnnotationStripLayer.prototype.bk = function () {
return new DataAnnotationStripLayer();
};
DataAnnotationStripLayer.prototype.ael = function (a) {
var _this = this;
if (!this.act(a)) {
return;
}
var 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);
var c = NaN;
var d = this.ac8(a, this.ags);
var 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(((function () {
var $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(((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.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(((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.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;
})()));
};
DataAnnotationStripLayer.prototype.rh = function (a, b, c, d) {
_super.prototype.rh.call(this, 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;
}
};
DataAnnotationStripLayer.prototype.aen = function (a, b) {
_super.prototype.aen.call(this, 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);
}
};
Object.defineProperty(DataAnnotationStripLayer.prototype, "ags", {
get: function () {
return this.agn;
},
set: function (a) {
if (this.agn != a) {
var b = this.agn;
this.agn = a;
this.raisePropertyChanged("StartValueColumn", b, this.agn);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "agr", {
get: function () {
return this.agm;
},
set: function (a) {
if (this.agm != a) {
var b = this.agm;
this.agm = a;
this.raisePropertyChanged("StartLabelColumn", b, this.agm);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "agq", {
get: function () {
return this.agl;
},
set: function (a) {
if (this.agl != a) {
var b = this.agl;
this.agl = a;
this.raisePropertyChanged("EndValueColumn", b, this.agl);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "agp", {
get: function () {
return this.agk;
},
set: function (a) {
if (this.agk != a) {
var b = this.agk;
this.agk = a;
this.raisePropertyChanged("EndLabelColumn", b, this.agk);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(DataAnnotationStripLayer.prototype, "ago", {
get: function () {
return this.agj;
},
set: function (a) {
if (this.agj != a) {
var b = this.agj;
this.agj = a;
this.raisePropertyChanged("CenterLabelColumn", b, this.agj);
}
},
enumerable: false,
configurable: true
});
DataAnnotationStripLayer.$t = markType(DataAnnotationStripLayer, 'DataAnnotationStripLayer', DataAnnotationRangeLayer.$);
DataAnnotationStripLayer.$$p = markDep(DependencyProperty, PropertyMetadata, DataAnnotationStripLayer, 'raisePropertyChanged', ['CenterLabelDisplayMode:agg:ahb', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 2)], 'CenterLabelMemberPath:agv:ahc', [2, null], 'EndLabelDisplayMode:agh:ahd', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'EndLabelMemberPath:agz:ahe', [2, null], 'EndValueMemberPath:ag2:ahf', [2, null], 'StartLabelDisplayMode:agi:ahg', [DataAnnotationDisplayMode_$type, enumGetBox(DataAnnotationDisplayMode_$type, 0)], 'StartLabelMemberPath:ag6:ahh', [2, null], 'StartValueMemberPath:ag9:ahi', [2, null]]);
return DataAnnotationStripLayer;
}(DataAnnotationRangeLayer));
export { DataAnnotationStripLayer };