UNPKG

igniteui-react-charts

Version:

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

170 lines (169 loc) 5.28 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 { __extends } from "tslib"; import { Base, markType, PointUtil } from "igniteui-react-core"; import { ScalerParams } from "./ScalerParams"; /** * @hidden */ var ErrorBarsHelper = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ErrorBarsHelper, _super); function ErrorBarsHelper(a, b) { var _this = _super.call(this) || this; _this.b = null; _this.a = null; _this.b = a; _this.a = b; return _this; } ErrorBarsHelper.prototype.c = function (a) { var b = a.getCalculatorType(); if (b == 1 || b == 2) { return false; } else { return true; } }; ErrorBarsHelper.prototype.i = function (a, b) { if (a.hasConstantPosition()) { b = a.getPosition(); } return { p1: b }; }; ErrorBarsHelper.prototype.k = function (a, b, c, d, e) { var f; var g; var h; var i = this.a.getViewInfo(g, f); g = i.p0; f = i.p1; h = this.a.getEffectiveViewport(); var j = new ScalerParams(0, f, g, c.df, h); var k = c.ft(a, j); var l = b.getIndependentValue(); d = Math.abs(Math.round(c.ft(a + l, j) - k)); e = Math.abs(Math.round(c.ft(a - l, j) - k)); return { p3: d, p4: e }; }; ErrorBarsHelper.prototype.j = function (a, b, c, d, e) { var f; var g; var h = this.a.getViewInfo(g, f); g = h.p0; f = h.p1; var i = new ScalerParams(1, f, g, c.df); var j = c.fw(a, i); var k = b.getIndependentValue(); d = Math.abs(Math.round(c.ft(j + k, i) - a)); e = Math.abs(Math.round(c.ft(j - k, i) - a)); return { p3: d, p4: e }; }; ErrorBarsHelper.prototype.g = function (a, b, c, d, e) { var f; var g; var h = this.a.getViewInfo(g, f); g = h.p0; f = h.p1; var i = new ScalerParams(1, f, g, c.df); var j = c.fw(a, i); var k = b.getDependentValue(j); d = Math.abs(Math.round(c.ft(j + k, i) - a)); e = Math.abs(Math.round(c.ft(j - k, i) - a)); return { p3: d, p4: e }; }; ErrorBarsHelper.prototype.f = function (a, b, c, d, e, f) { var g; var h; var i = this.a.getViewInfo(h, g); h = i.p0; g = i.p1; var j = new ScalerParams(1, g, h, c.df); var k = new ScalerParams(1, g, h, d.df); var l = c.fw(a, j); var m = b.getDependentValue(l); e = Math.abs(Math.round(c.ft(l + m, k) - a)); f = Math.abs(Math.round(c.ft(l - m, k) - a)); return { p4: e, p5: f }; }; ErrorBarsHelper.prototype.h = function (a, b, c, d, e) { var f; var g; var h = this.a.getViewInfo(g, f); g = h.p0; f = h.p1; var i = new ScalerParams(1, f, g, c.df); var j = c.fw(a, i); d = Math.abs(Math.round(c.ft(j + b, i) - a)); e = Math.abs(Math.round(c.ft(j - b, i) - a)); return { p3: d, p4: e }; }; ErrorBarsHelper.prototype.e = function (a, b, c, d) { }; ErrorBarsHelper.prototype.d = function (a, b, c, d) { }; ErrorBarsHelper.prototype.l = function (a, b, c, d) { var e = PointUtil.create(); if (a.getCalculatorType() == 3) { var f = void 0; var g = void 0; var h = void 0; var i = this.a.getViewInfo(g, f); g = i.p0; f = i.p1; h = this.a.getEffectiveViewport(); var j = new ScalerParams(0, f, g, b.df, h); e.x = Math.round(b.ft(d, j)); e.y = Math.round(c.y); } else { e.x = Math.round(c.x); e.y = Math.round(c.y); } return e; }; ErrorBarsHelper.prototype.m = function (a, b, c, d) { var e = PointUtil.create(); if (a.getCalculatorType() == 3) { var f = void 0; var g = void 0; var h = void 0; var i = this.a.getViewInfo(g, f); g = i.p0; f = i.p1; h = this.a.getEffectiveViewport(); var j = new ScalerParams(0, f, g, b.df, h); e.x = Math.round(c.x); e.y = Math.round(b.ft(d, j)); } else { e.x = Math.round(c.x); e.y = Math.round(c.y); } return e; }; ErrorBarsHelper.$t = markType(ErrorBarsHelper, 'ErrorBarsHelper'); return ErrorBarsHelper; }(Base)); export { ErrorBarsHelper };