UNPKG

igniteui-react-charts

Version:

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

111 lines (110 loc) 3.72 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 { LinearScaler } from "./LinearScaler"; import { NumericScaler } from "./NumericScaler"; import { markType } from "igniteui-react-core"; import { ArrayAccessHelper } from "igniteui-react-core"; /** * @hidden */ export let VerticalLinearScaler = /*@__PURE__*/ (() => { class VerticalLinearScaler extends LinearScaler { q(a, b) { if (!b.c.isEmpty) { let c = b.e.top + b.e.height * (a - b.d.top) / b.d.height; c = (c * b.d.height) + b.d.top; c = this.ae(c, NumericScaler.ac, b.c, b.a); return c; } return this.ae(a, b.e, b.d, b.a); } p(a, b) { if (!b.c.isEmpty) { let c = this.ad(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.ad(a, b.e, b.d, b.a); } v(a, b, c, d) { let e; let f = d.e; let g = d.d; let h = d.c; let i = d.a; let j = !h.isEmpty; let k = this.m; let l = this.o; let m = h.top; let n = h.height; let o = f.top; let p = f.height; let q = g.top; let r = g.height; let s = 0; let t = 1; let u = ArrayAccessHelper.b(a); let v = false; if (u != null) { v = true; } for (let w = b; w < c; w++) { if (v) { e = u[w]; } else { e = a.item(w); } if (j) { let x = (e - l) / (k); if (!i) { x = 1 - x; } x = m + n * (x - s) / t; let y = (x - q) / r; y = q + r * (y - o) / p; if (v) { u[w] = y; } else { a.item(w, y); } } else { let z = (e - l) / (k); if (!i) { z = 1 - z; } z = q + r * (z - o) / p; if (v) { u[w] = z; } else { a.item(w, z); } } } } ad(a, b, c, d) { let e = (a - this.o) / (this.m); if (!d) { e = 1 - e; } return c.top + c.height * (e - b.top) / b.height; } ae(a, b, c, d) { let e = b.top + b.height * (a - c.top) / c.height; if (!d) { e = 1 - e; } return this.o + e * (this.m); } } VerticalLinearScaler.$t = /*@__PURE__*/ markType(VerticalLinearScaler, 'VerticalLinearScaler', LinearScaler.$); return VerticalLinearScaler; })();