UNPKG

igniteui-react-charts

Version:

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

161 lines (160 loc) 5.64 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 { 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 */ export let ScatterSplineSeries = /*@__PURE__*/ (() => { class ScatterSplineSeries extends ScatterBase { bk() { return new ScatterSplineSeries(); } get_f0() { return true; } constructor() { super(); this.ab = ScatterSplineSeries.$; this.y4 = new ScatterFrame(); this.y6 = new ScatterFrame(); this.y2 = new ScatterFrame(); } ct() { return new ScatterSplineSeriesView(this); } zy() { return true; } jk() { if (!isNaN_(this.jj)) { return super.jk(); } return Defaults.x; } ra(a, b, c, d) { super.ra(a, b, c, d); switch (b) { case ScatterSplineSeries.$$p[0]: this.rs(false); this.ql(); break; } } b3() { if (this.b4 == 0) { return 2; } else { return super.b3(); } } abh(a, b) { super.abh(a, b); a.n.clear(); a.v.clear(); let c = b.b2; let d = b.b1; let e = this.getEffectiveViewport1(b); let f = this.id * this.id; let g = Math.min(this.zj != null ? this.zj.count : 0, this.zk != null ? this.zk.count : 0); let h = new ScalerParams(0, c, d, this.yy.d, e); let i = ((() => { let $ret = new ScalerParams(0, c, d, this.yy.e, e); $ret.b = this.iy(); return $ret; })()); let j = (k) => this.yy.a.el(this.zj.item(k), h); let k = (l) => this.yy.b.el(this.zk.item(l), i); let l = ((() => { let $ret = new Clipper(0, d, false); $ret.i = a.n; return $ret; })()); for (let m = 0; m < g;) { let n = m; ++m; while (m < g && this.acp(j, k, n, m) < f) { ++m; } if (g > this.aab) { l.j(this.act(j, k, n, m - 1)); } else { let 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.aab) { l.i = null; } } act(a, b, c, d) { if (c == d) { return { $type: Point_$type, x: a(c), y: b(c) }; } let e = 0; let f = 0; let g = (d - c + 1); for (let h = c; h <= d; ++h) { e += a(h); f += b(h); } return { $type: Point_$type, x: e / g, y: f / g }; } acp(a, b, c, d) { let e = a(d) - a(c); let f = b(d) - b(c); return e * e + f * f; } get_zs() { return true; } o5(a, b) { super.o5(a, b); let c = typeCast(ScatterSplineSeriesView.$, b); c.dd(false); } abs(a, b) { this.o5(false, b); super.abs(a, b); this.abk(a); let c = typeCast(ScatterSplineSeriesView.$, b); let d = c.dq; this.zb.az(this, this.zx(), runOn(this, this.yr)); let e = false; let f = this.zb.b; if (f != null) { e = true; } if (e) { this.abd(-1, this.zj.count, b.r); } this.zb.ad(d, true, false, true, false); c.dq.an = new PathGeometry(); c.dq.an.c = Numeric.h(a.n.count, (g) => a.n._inner[g].x, (g) => a.n._inner[g].y, this.acq); } } ScatterSplineSeries.$t = /*@__PURE__*/ markType(ScatterSplineSeries, 'ScatterSplineSeries', ScatterBase.$); ScatterSplineSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, ScatterSplineSeries, 'raisePropertyChanged', ['Stiffness:acq:acs', [1, 0.5]]); return ScatterSplineSeries; })();