UNPKG

igniteui-angular-charts

Version:

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

65 lines (64 loc) 2.66 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 { LogarithmicScaler } from "./LogarithmicScaler"; import { NumericScaler } from "./NumericScaler"; import { markType } from "igniteui-angular-core"; import { isNaN_ } from "igniteui-angular-core"; /** * @hidden */ var VerticalLogarithmicScaler = /** @class */ /*@__PURE__*/ (function (_super) { __extends(VerticalLogarithmicScaler, _super); function VerticalLogarithmicScaler() { return _super !== null && _super.apply(this, arguments) || this; } VerticalLogarithmicScaler.prototype.q = function (a, b) { if (!b.c.isEmpty) { var c = b.e.top + b.e.height * (a - b.d.top) / b.d.height; c = (c * b.d.height) + b.d.top; c = this.ag(c, NumericScaler.ac, b.c, b.a); return c; } return this.ag(a, b.e, b.d, b.a); }; VerticalLogarithmicScaler.prototype.p = function (a, b) { if (!b.c.isEmpty) { var c = this.af(a, NumericScaler.ac, b.c, b.a); c = (c - b.d.top) / b.d.height; c = b.d.top + b.d.height * (c - b.e.top) / b.e.height; return c; } return this.af(a, b.e, b.d, b.a); }; VerticalLogarithmicScaler.prototype.af = function (a, b, c, d) { if (isNaN_(a)) { return NaN; } var e; if (a <= 0) { e = (Math.log(this.o) - this.ae) / (this.ad - this.ae); } else { e = (Math.log(a) - this.ae) / (this.ad - this.ae); } if (!d) { e = 1 - e; } return c.top + c.height * (e - b.top) / b.height; }; VerticalLogarithmicScaler.prototype.ag = function (a, b, c, d) { var e = b.top + b.height * (a - c.top) / c.height; if (!d) { e = 1 - e; } return Math.exp(e * (this.ad - this.ae) + this.ae); }; VerticalLogarithmicScaler.$t = markType(VerticalLogarithmicScaler, 'VerticalLogarithmicScaler', LogarithmicScaler.$); return VerticalLogarithmicScaler; }(LogarithmicScaler)); export { VerticalLogarithmicScaler };