UNPKG

igniteui-angular-charts

Version:

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

161 lines (160 loc) 5.79 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 { 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.y1 = new ScatterFrame(); this.y3 = new ScatterFrame(); this.yz = new ScatterFrame(); } bj() { return new ScatterSplineSeries(); } get_fz() { return true; } cs() { return new ScatterSplineSeriesView(this); } zv() { return true; } jj() { if (!isNaN_(this.ji)) { return super.jj(); } return Defaults.x; } q8(a, b, c, d) { super.q8(a, b, c, d); switch (b) { case ScatterSplineSeries.$$p[0]: this.rq(false); this.qk(); break; } } b2() { if (this.b3 == 0) { return 2; } else { return super.b2(); } } abe(a, b) { super.abe(a, b); a.m.clear(); a.u.clear(); let c = b.by; let d = b.bx; let e = this.getEffectiveViewport1(b); let f = this.ic * this.ic; let g = Math.min(this.zg != null ? this.zg.count : 0, this.zh != null ? this.zh.count : 0); let h = new ScalerParams(0, c, d, this.yv.d, e); let i = ((() => { let $ret = new ScalerParams(0, c, d, this.yv.e, e); $ret.b = this.ix(); return $ret; })()); let j = (k) => this.yv.a.el(this.zg.item(k), h); let k = (l) => this.yv.b.el(this.zh.item(l), i); let l = ((() => { let $ret = new Clipper(0, d, false); $ret.i = a.m; return $ret; })()); for (let m = 0; m < g;) { let n = m; ++m; while (m < g && this.acm(j, k, n, m) < f) { ++m; } if (g > this.z8) { l.j(this.acq(j, k, n, m - 1)); } else { let o = new OwnedPoint(); o.c = { $type: Point_$type, x: j(n), y: k(n) }; o.a = this.dn.item(n); if (!a.u.containsKey(o.a)) { a.u.addItem(o.a, o); } } } if (g > this.z8) { l.i = null; } } acq(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 }; } acm(a, b, c, d) { let e = a(d) - a(c); let f = b(d) - b(c); return e * e + f * f; } get_zp() { return true; } o4(a, b) { super.o4(a, b); let c = typeCast(ScatterSplineSeriesView.$, b); c.c9(false); } abp(a, b) { this.o4(false, b); super.abp(a, b); this.abh(a); let c = typeCast(ScatterSplineSeriesView.$, b); let d = c.dl; this.y8.az(this, this.zu(), runOn(this, this.yo)); let e = false; let f = this.y8.b; if (f != null) { e = true; } if (e) { this.aba(-1, this.zg.count, b.q); } this.y8.ad(d, true, false, true, false); c.dl.an = new PathGeometry(); c.dl.an.c = Numeric.h(a.m.count, (g) => a.m._inner[g].x, (g) => a.m._inner[g].y, this.acn); } } ScatterSplineSeries.$t = markType(ScatterSplineSeries, 'ScatterSplineSeries', ScatterBase.$); ScatterSplineSeries.$$p = markDep(DependencyProperty, PropertyMetadata, ScatterSplineSeries, 'raisePropertyChanged', ['Stiffness:acn:acp', [1, 0.5]]); return ScatterSplineSeries; })();