UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

170 lines (169 loc) 6.27 kB
/* 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 { CoreGeometryUtil } from "igniteui-react-core"; 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.zn = new ScatterFrame(); _this.zp = new ScatterFrame(); _this.zl = new ScatterFrame(); return _this; } ScatterSplineSeries.prototype.bk = function () { return new ScatterSplineSeries(); }; ScatterSplineSeries.prototype.get_f3 = function () { return true; }; ScatterSplineSeries.prototype.ct = function () { return new ScatterSplineSeriesView(this); }; ScatterSplineSeries.prototype.aah = function () { return true; }; ScatterSplineSeries.prototype.js = function () { if (!isNaN_(this.jr)) { return _super.prototype.js.call(this); } return Defaults.ak; }; ScatterSplineSeries.prototype.rq = function (a, b, c, d) { _super.prototype.rq.call(this, a, b, c, d); switch (b) { case ScatterSplineSeries.$$p[0]: this.r8(false); this.q0(); break; } }; ScatterSplineSeries.prototype.g2 = function (a, b) { if (this.x2(a, b)) { return true; } if (this.dp.count <= this.aat) { var c = this.cw; var d = c.dz; if (CoreGeometryUtil.j(a, d, this.i1(b))) { return true; } } return false; }; ScatterSplineSeries.prototype.ab0 = function (a, b) { var _this = this; _super.prototype.ab0.call(this, a, b); a.q.clear(); a.y.clear(); var c = b.ca; var d = b.b9; var e = this.getEffectiveViewport1(b); var f = this.ik * this.ik; var g = Math.min(this.z2 != null ? this.z2.count : 0, this.z3 != null ? this.z3.count : 0); var h = new ScalerParams(0, c, d, this.zh.d, e); var i = ((function () { var $ret = new ScalerParams(0, c, d, _this.zh.e, e); $ret.b = _this.i5(); return $ret; })()); var j = function (k) { return _this.zh.a.f6(_this.z2.item(k), h); }; var k = function (l) { return _this.zh.b.f6(_this.z3.item(l), i); }; var l = ((function () { var $ret = new Clipper(0, d, false); $ret.i = a.q; return $ret; })()); for (var m = 0; m < g;) { var n = m; ++m; while (m < g && this.ac8(j, k, n, m) < f) { ++m; } if (g > this.aau) { l.j(this.adc(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.y.containsKey(o.a)) { a.y.addItem(o.a, o); } } } if (g > this.aau) { l.i = null; } }; ScatterSplineSeries.prototype.adc = 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.ac8 = 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_aab = function () { return true; }; ScatterSplineSeries.prototype.pi = function (a, b) { _super.prototype.pi.call(this, a, b); var c = typeCast(ScatterSplineSeriesView.$, b); c.dm(false); }; ScatterSplineSeries.prototype.acb = function (a, b) { this.pi(false, b); _super.prototype.acb.call(this, a, b); this.ab3(a); var c = typeCast(ScatterSplineSeriesView.$, b); var d = c.dz; this.zu.az(this, this.aag(), runOn(this, this.za)); var e = false; var f = this.zu.b; if (f != null) { e = true; } if (e) { this.abw(-1, this.z2.count, b.t); } this.zu.ad(d, true, false, true, false); c.dz.an = new PathGeometry(); c.dz.an.c = Numeric.h(a.q.count, function (g) { return a.q._inner[g].x; }, function (g) { return a.q._inner[g].y; }, this.ac9); }; ScatterSplineSeries.$t = markType(ScatterSplineSeries, 'ScatterSplineSeries', ScatterBase.$); ScatterSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterSplineSeries, 'raisePropertyChanged', ['Stiffness:ac9:adb', [1, 0.5]]); return ScatterSplineSeries; }(ScatterBase)); export { ScatterSplineSeries };