igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
164 lines (163 loc) • 6.05 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 { ScatterBase } from "./ScatterBase";
import { DependencyProperty } from "igniteui-react-core";
import { Point_$type, typeCast, runOn, markType, markDep } from "igniteui-react-core";
import { ScatterFrame } from "./ScatterFrame";
import { ScatterSplineSeriesView } from "./ScatterSplineSeriesView";
import { Defaults } from "./Defaults";
import { Clipper } from "igniteui-react-core";
import { OwnedPoint } from "./OwnedPoint";
import { ScalerParams } from "./ScalerParams";
import { PathGeometry } from "igniteui-react-core";
import { Numeric } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
/**
* @hidden
*/
var ScatterSplineSeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ScatterSplineSeries, _super);
function ScatterSplineSeries() {
var _this = _super.call(this) || this;
_this.ab = ScatterSplineSeries.$;
_this.y7 = new ScatterFrame();
_this.y9 = new ScatterFrame();
_this.y5 = new ScatterFrame();
return _this;
}
ScatterSplineSeries.prototype.bk = function () {
return new ScatterSplineSeries();
};
ScatterSplineSeries.prototype.get_f1 = function () {
return true;
};
ScatterSplineSeries.prototype.ct = function () {
return new ScatterSplineSeriesView(this);
};
ScatterSplineSeries.prototype.z1 = function () {
return true;
};
ScatterSplineSeries.prototype.jl = function () {
if (!isNaN_(this.jk)) {
return _super.prototype.jl.call(this);
}
return Defaults.ak;
};
ScatterSplineSeries.prototype.rc = function (a, b, c, d) {
_super.prototype.rc.call(this, a, b, c, d);
switch (b) {
case ScatterSplineSeries.$$p[0]:
this.ru(false);
this.qn();
break;
}
};
ScatterSplineSeries.prototype.b3 = function () {
if (this.b4 == 0) {
return 2;
}
else {
return _super.prototype.b3.call(this);
}
};
ScatterSplineSeries.prototype.abk = function (a, b) {
var _this = this;
_super.prototype.abk.call(this, a, b);
a.n.clear();
a.v.clear();
var c = b.ca;
var d = b.b9;
var e = this.getEffectiveViewport1(b);
var f = this.ie * this.ie;
var g = Math.min(this.zm != null ? this.zm.count : 0, this.zn != null ? this.zn.count : 0);
var h = new ScalerParams(0, c, d, this.y1.d, e);
var i = ((function () {
var $ret = new ScalerParams(0, c, d, _this.y1.e, e);
$ret.b = _this.iz();
return $ret;
})());
var j = function (k) { return _this.y1.a.el(_this.zm.item(k), h); };
var k = function (l) { return _this.y1.b.el(_this.zn.item(l), i); };
var l = ((function () {
var $ret = new Clipper(0, d, false);
$ret.i = a.n;
return $ret;
})());
for (var m = 0; m < g;) {
var n = m;
++m;
while (m < g && this.acs(j, k, n, m) < f) {
++m;
}
if (g > this.aae) {
l.j(this.acw(j, k, n, m - 1));
}
else {
var o = new OwnedPoint();
o.c = { $type: Point_$type, x: j(n), y: k(n) };
o.a = this.dp.item(n);
if (!a.v.containsKey(o.a)) {
a.v.addItem(o.a, o);
}
}
}
if (g > this.aae) {
l.i = null;
}
};
ScatterSplineSeries.prototype.acw = function (a, b, c, d) {
if (c == d) {
return { $type: Point_$type, x: a(c), y: b(c) };
}
var e = 0;
var f = 0;
var g = (d - c + 1);
for (var h = c; h <= d; ++h) {
e += a(h);
f += b(h);
}
return { $type: Point_$type, x: e / g, y: f / g };
};
ScatterSplineSeries.prototype.acs = function (a, b, c, d) {
var e = a(d) - a(c);
var f = b(d) - b(c);
return e * e + f * f;
};
ScatterSplineSeries.prototype.get_zv = function () {
return true;
};
ScatterSplineSeries.prototype.o7 = function (a, b) {
_super.prototype.o7.call(this, a, b);
var c = typeCast(ScatterSplineSeriesView.$, b);
c.dm(false);
};
ScatterSplineSeries.prototype.abv = function (a, b) {
this.o7(false, b);
_super.prototype.abv.call(this, a, b);
this.abn(a);
var c = typeCast(ScatterSplineSeriesView.$, b);
var d = c.dz;
this.ze.az(this, this.z0(), runOn(this, this.yu));
var e = false;
var f = this.ze.b;
if (f != null) {
e = true;
}
if (e) {
this.abg(-1, this.zm.count, b.t);
}
this.ze.ad(d, true, false, true, false);
c.dz.an = new PathGeometry();
c.dz.an.c = Numeric.h(a.n.count, function (g) { return a.n._inner[g].x; }, function (g) { return a.n._inner[g].y; }, this.act);
};
ScatterSplineSeries.$t = markType(ScatterSplineSeries, 'ScatterSplineSeries', ScatterBase.$);
ScatterSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterSplineSeries, 'raisePropertyChanged', ['Stiffness:act:acv', [1, 0.5]]);
return ScatterSplineSeries;
}(ScatterBase));
export { ScatterSplineSeries };