igniteui-react-core
Version:
Ignite UI React Core.
205 lines (204 loc) • 6.57 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 { Base, String_$type, markType } from "./type";
import { DataSeriesMemberPathHint } from "./DataSeriesMemberPathHint";
import { List$1 } from "./List$1";
import { ShapeChartUtils } from "./ShapeChartUtils";
import { stringIsNullOrEmpty } from "./string";
/**
* @hidden
*/
var ScatterDataInfo = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ScatterDataInfo, _super);
function ScatterDataInfo(a) {
var _this = _super.call(this) || this;
_this.p = 0;
_this.a = null;
_this.l = null;
_this.k = 0;
_this.i = null;
_this.j = null;
_this.f = null;
_this.c = null;
_this.e = null;
_this.h = null;
_this.d = null;
_this.g = null;
_this.q = 0;
_this.o = 0;
_this.n = null;
_this.a = a;
_this.l = a.getCurrentDataSource();
if (_this.l != null) {
_this.p = _this.l.actualCount;
}
_this.k = 0;
_this.i = ((function () {
var $ret = new DataSeriesMemberPathHint();
$ret.intent = 1;
return $ret;
})());
_this.j = ((function () {
var $ret = new DataSeriesMemberPathHint();
$ret.intent = 2;
return $ret;
})());
_this.f = ((function () {
var $ret = new DataSeriesMemberPathHint();
$ret.intent = 5;
return $ret;
})());
_this.c = ((function () {
var $ret = new DataSeriesMemberPathHint();
$ret.intent = 3;
return $ret;
})());
_this.e = ((function () {
var $ret = new DataSeriesMemberPathHint();
$ret.intent = 4;
return $ret;
})());
_this.h = ((function () {
var $ret = new DataSeriesMemberPathHint();
$ret.intent = 8;
return $ret;
})());
_this.d = ((function () {
var $ret = new DataSeriesMemberPathHint();
$ret.intent = 9;
return $ret;
})());
_this.g = ((function () {
var $ret = new DataSeriesMemberPathHint();
$ret.intent = 7;
return $ret;
})());
_this.n = new List$1(String_$type, 0);
return _this;
}
Object.defineProperty(ScatterDataInfo.prototype, "b", {
get: function () {
return this.a.analyzer;
},
enumerable: false,
configurable: true
});
ScatterDataInfo.prototype.t = function (a, b) {
if (b === void 0) {
b = null;
}
if (a == null || a.count == 0) {
return;
}
if (stringIsNullOrEmpty(this.d.path)) {
var c = ShapeChartUtils.r(a);
if (c.count > 0) {
this.d.update1(c._inner[0], b);
}
}
if (stringIsNullOrEmpty(this.e.path)) {
var d = ShapeChartUtils.s(a);
if (d.count > 0) {
this.e.update1(d._inner[0], b);
}
}
};
ScatterDataInfo.prototype.r = function (a, b) {
if (b === void 0) {
b = null;
}
if (a == null || a.count == 0) {
return;
}
if (stringIsNullOrEmpty(this.g.path)) {
var c = ShapeChartUtils.y(a);
if (c.count > 0) {
this.g.update1(c._inner[0], b);
}
}
};
ScatterDataInfo.prototype.s = function (a, b) {
if (b === void 0) {
b = null;
}
if (a == null || a.count == 0) {
return;
}
this.i.update(ShapeChartUtils.ac(a).toArray(), b);
this.j.update(ShapeChartUtils.ad(a).toArray(), b);
this.c.update(ShapeChartUtils.p(a).toArray(), b);
this.f.update(ShapeChartUtils.u(a).toArray(), b);
this.h.update(ShapeChartUtils.aa(a).toArray(), b);
if (this.i.hasPath() && this.j.hasPath()) {
this.o *= 1.2;
}
if (!this.i.hasPath() && a.count > 0) {
this.o *= 0.8;
var c = a.count - 1;
this.i.update1(a._inner[c], b);
a.removeAt(c);
}
if (!this.j.hasPath() && a.count > 0) {
this.o *= 0.8;
var d = a.count - 1;
this.j.update1(a._inner[d], b);
a.removeAt(d);
}
if (!this.f.hasPath() && a.count > 0) {
var e = a.count - 1;
this.f.update1(a._inner[e], b);
a.removeAt(e);
}
if (!this.h.hasPath() && a.count > 0) {
var f = a.count - 1;
this.h.update1(a._inner[f], b);
a.removeAt(f);
}
if (!this.c.hasPath() && a.count > 0) {
var g = a.count - 1;
this.c.update1(a._inner[g], b);
a.removeAt(g);
}
if (!this.i.hasPath()) {
this.o *= 0.5;
if (this.f.hasPath()) {
this.i.path = this.f.path;
}
else if (this.c.hasPath()) {
this.i.path = this.c.path;
}
else if (this.h.hasPath()) {
this.i.path = this.h.path;
}
}
if (!this.j.hasPath()) {
this.o *= 0.5;
if (this.h.hasPath()) {
this.j.path = this.h.path;
}
else if (this.c.hasPath()) {
this.j.path = this.c.path;
}
else if (this.f.hasPath()) {
this.j.path = this.f.path;
}
}
};
ScatterDataInfo.prototype.m = function () {
var a = new List$1(String_$type, 0);
var b = this.b.getAllStringProperties();
for (var d = 0; d < b.length; d++) {
var c = b[d];
a.add(c);
}
return a;
};
ScatterDataInfo.$t = markType(ScatterDataInfo, 'ScatterDataInfo');
return ScatterDataInfo;
}(Base));
export { ScatterDataInfo };