igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
167 lines (166 loc) • 5.9 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 { 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
*/
export let ScatterSplineSeries = /*@__PURE__*/ (() => {
class ScatterSplineSeries extends ScatterBase {
bk() {
return new ScatterSplineSeries();
}
get_f4() {
return true;
}
constructor() {
super();
this.ab = ScatterSplineSeries.$;
this.zo = new ScatterFrame();
this.zq = new ScatterFrame();
this.zm = new ScatterFrame();
}
ct() {
return new ScatterSplineSeriesView(this);
}
aai() {
return true;
}
jt() {
if (!isNaN_(this.js)) {
return super.jt();
}
return Defaults.ak;
}
rr(a, b, c, d) {
super.rr(a, b, c, d);
switch (b) {
case ScatterSplineSeries.$$p[0]:
this.r9(false);
this.q1();
break;
}
}
g3(a, b) {
if (this.x3(a, b)) {
return true;
}
if (this.dp.count <= this.aau) {
let c = this.cw;
let d = c.dz;
if (CoreGeometryUtil.j(a, d, this.i2(b))) {
return true;
}
}
return false;
}
ab1(a, b) {
super.ab1(a, b);
a.q.clear();
a.y.clear();
let c = b.ca;
let d = b.b9;
let e = this.getEffectiveViewport1(b);
let f = this.il * this.il;
let g = Math.min(this.z3 != null ? this.z3.count : 0, this.z4 != null ? this.z4.count : 0);
let h = new ScalerParams(0, c, d, this.zi.d, e);
let i = ((() => {
let $ret = new ScalerParams(0, c, d, this.zi.e, e);
$ret.b = this.i6();
return $ret;
})());
let j = (k) => this.zi.a.f7(this.z3.item(k), h);
let k = (l) => this.zi.b.f7(this.z4.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.ac9(j, k, n, m) < f) {
++m;
}
if (g > this.aav) {
l.j(this.add(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.aav) {
l.i = null;
}
}
add(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 };
}
ac9(a, b, c, d) {
let e = a(d) - a(c);
let f = b(d) - b(c);
return e * e + f * f;
}
get_aac() {
return true;
}
pj(a, b) {
super.pj(a, b);
let c = typeCast(ScatterSplineSeriesView.$, b);
c.dm(false);
}
acc(a, b) {
this.pj(false, b);
super.acc(a, b);
this.ab4(a);
let c = typeCast(ScatterSplineSeriesView.$, b);
let d = c.dz;
this.zv.az(this, this.aah(), runOn(this, this.zb));
let e = false;
let f = this.zv.b;
if (f != null) {
e = true;
}
if (e) {
this.abx(-1, this.z3.count, b.t);
}
this.zv.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.ada);
}
}
ScatterSplineSeries.$t = /*@__PURE__*/ markType(ScatterSplineSeries, 'ScatterSplineSeries', ScatterBase.$);
ScatterSplineSeries.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, ScatterSplineSeries, 'raisePropertyChanged', ['Stiffness:ada:adc', [1, 0.5]]);
return ScatterSplineSeries;
})();