igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
168 lines (167 loc) • 5.42 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 { Base, markType, PointUtil } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
/**
* @hidden
*/
export let ErrorBarsHelper = /*@__PURE__*/ (() => {
class ErrorBarsHelper extends Base {
constructor(a, b) {
super();
this.b = null;
this.a = null;
this.b = a;
this.a = b;
}
c(a) {
let b = a.getCalculatorType();
if (b == 1 || b == 2) {
return false;
}
else {
return true;
}
}
i(a, b) {
if (a.hasConstantPosition()) {
b = a.getPosition();
}
return {
p1: b
};
}
k(a, b, c, d, e) {
let f;
let g;
let h;
let i = this.a.getViewInfo(g, f);
g = i.p0;
f = i.p1;
h = this.a.getEffectiveViewport();
let j = new ScalerParams(0, f, g, c.dn, h);
let k = c.f5(a, j);
let l = b.getIndependentValue();
d = Math.abs(Math.round(c.f5(a + l, j) - k));
e = Math.abs(Math.round(c.f5(a - l, j) - k));
return {
p3: d,
p4: e
};
}
j(a, b, c, d, e) {
let f;
let g;
let h = this.a.getViewInfo(g, f);
g = h.p0;
f = h.p1;
let i = new ScalerParams(1, f, g, c.dn);
let j = c.f8(a, i);
let k = b.getIndependentValue();
d = Math.abs(Math.round(c.f5(j + k, i) - a));
e = Math.abs(Math.round(c.f5(j - k, i) - a));
return {
p3: d,
p4: e
};
}
g(a, b, c, d, e) {
let f;
let g;
let h = this.a.getViewInfo(g, f);
g = h.p0;
f = h.p1;
let i = new ScalerParams(1, f, g, c.dn);
let j = c.f8(a, i);
let k = b.getDependentValue(j);
d = Math.abs(Math.round(c.f5(j + k, i) - a));
e = Math.abs(Math.round(c.f5(j - k, i) - a));
return {
p3: d,
p4: e
};
}
f(a, b, c, d, e, f) {
let g;
let h;
let i = this.a.getViewInfo(h, g);
h = i.p0;
g = i.p1;
let j = new ScalerParams(1, g, h, c.dn);
let k = new ScalerParams(1, g, h, d.dn);
let l = c.f8(a, j);
let m = b.getDependentValue(l);
e = Math.abs(Math.round(c.f5(l + m, k) - a));
f = Math.abs(Math.round(c.f5(l - m, k) - a));
return {
p4: e,
p5: f
};
}
h(a, b, c, d, e) {
let f;
let g;
let h = this.a.getViewInfo(g, f);
g = h.p0;
f = h.p1;
let i = new ScalerParams(1, f, g, c.dn);
let j = c.f8(a, i);
d = Math.abs(Math.round(c.f5(j + b, i) - a));
e = Math.abs(Math.round(c.f5(j - b, i) - a));
return {
p3: d,
p4: e
};
}
e(a, b, c, d) {
}
d(a, b, c, d) {
}
l(a, b, c, d) {
let e = PointUtil.create();
if (a.getCalculatorType() == 3) {
let f;
let g;
let h;
let i = this.a.getViewInfo(g, f);
g = i.p0;
f = i.p1;
h = this.a.getEffectiveViewport();
let j = new ScalerParams(0, f, g, b.dn, h);
e.x = Math.round(b.f5(d, j));
e.y = Math.round(c.y);
}
else {
e.x = Math.round(c.x);
e.y = Math.round(c.y);
}
return e;
}
m(a, b, c, d) {
let e = PointUtil.create();
if (a.getCalculatorType() == 3) {
let f;
let g;
let h;
let i = this.a.getViewInfo(g, f);
g = i.p0;
f = i.p1;
h = this.a.getEffectiveViewport();
let j = new ScalerParams(0, f, g, b.dn, h);
e.x = Math.round(c.x);
e.y = Math.round(b.f5(d, j));
}
else {
e.x = Math.round(c.x);
e.y = Math.round(c.y);
}
return e;
}
}
ErrorBarsHelper.$t = markType(ErrorBarsHelper, 'ErrorBarsHelper');
return ErrorBarsHelper;
})();