UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

167 lines (166 loc) 6.05 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-angular-core"; import { Point_$type, typeCast, runOn, markType, markDep } from "igniteui-angular-core"; import { ScatterFrame } from "./ScatterFrame"; import { ScatterSplineSeriesView } from "./ScatterSplineSeriesView"; import { Defaults } from "./Defaults"; import { CoreGeometryUtil } from "igniteui-angular-core"; import { Clipper } from "igniteui-angular-core"; import { OwnedPoint } from "./OwnedPoint"; import { ScalerParams } from "./ScalerParams"; import { PathGeometry } from "igniteui-angular-core"; import { Numeric } from "igniteui-angular-core"; import { PropertyMetadata } from "igniteui-angular-core"; import { isNaN_ } from "igniteui-angular-core"; /** * @hidden */ export let ScatterSplineSeries = /*@__PURE__*/ (() => { class ScatterSplineSeries extends ScatterBase { constructor() { super(); this.ab = ScatterSplineSeries.$; this.zm = new ScatterFrame(); this.zo = new ScatterFrame(); this.zk = new ScatterFrame(); } bk() { return new ScatterSplineSeries(); } get_f3() { return true; } ct() { return new ScatterSplineSeriesView(this); } aag() { return true; } js() { if (!isNaN_(this.jr)) { return super.js(); } return Defaults.ak; } rp(a, b, c, d) { super.rp(a, b, c, d); switch (b) { case ScatterSplineSeries.$$p[0]: this.r7(false); this.qz(); break; } } g2(a, b) { if (this.x1(a, b)) { return true; } if (this.dp.count <= this.aas) { let c = this.cw; let d = c.dz; if (CoreGeometryUtil.j(a, d, this.i1(b))) { return true; } } return false; } abz(a, b) { super.abz(a, b); a.q.clear(); a.y.clear(); let c = b.ca; let d = b.b9; let e = this.getEffectiveViewport1(b); let f = this.ik * this.ik; let g = Math.min(this.z1 != null ? this.z1.count : 0, this.z2 != null ? this.z2.count : 0); let h = new ScalerParams(0, c, d, this.zg.d, e); let i = ((() => { let $ret = new ScalerParams(0, c, d, this.zg.e, e); $ret.b = this.i5(); return $ret; })()); let j = (k) => this.zg.a.f5(this.z1.item(k), h); let k = (l) => this.zg.b.f5(this.z2.item(l), i); let l = ((() => { let $ret = new Clipper(0, d, false); $ret.i = a.q; return $ret; })()); for (let m = 0; m < g;) { let n = m; ++m; while (m < g && this.ac7(j, k, n, m) < f) { ++m; } if (g > this.aat) { l.j(this.adb(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.y.containsKey(o.a)) { a.y.addItem(o.a, o); } } } if (g > this.aat) { l.i = null; } } adb(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 }; } ac7(a, b, c, d) { let e = a(d) - a(c); let f = b(d) - b(c); return e * e + f * f; } get_aaa() { return true; } ph(a, b) { super.ph(a, b); let c = typeCast(ScatterSplineSeriesView.$, b); c.dm(false); } aca(a, b) { this.ph(false, b); super.aca(a, b); this.ab2(a); let c = typeCast(ScatterSplineSeriesView.$, b); let d = c.dz; this.zt.az(this, this.aaf(), runOn(this, this.y9)); let e = false; let f = this.zt.b; if (f != null) { e = true; } if (e) { this.abv(-1, this.z1.count, b.t); } this.zt.ad(d, true, false, true, false); c.dz.an = new PathGeometry(); c.dz.an.c = Numeric.h(a.q.count, (g) => a.q._inner[g].x, (g) => a.q._inner[g].y, this.ac8); } } ScatterSplineSeries.$t = markType(ScatterSplineSeries, 'ScatterSplineSeries', ScatterBase.$); ScatterSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterSplineSeries, 'raisePropertyChanged', ['Stiffness:ac8:ada', [1, 0.5]]); return ScatterSplineSeries; })();