UNPKG

igniteui-angular-charts

Version:

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

236 lines (235 loc) 7.82 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 { StraightNumericAxisBase } from "./StraightNumericAxisBase"; import { IScaler_$type } from "./IScaler"; import { markType } from "igniteui-angular-core"; import { VerticalAxisLabelPanel } from "./VerticalAxisLabelPanel"; import { Rect } from "igniteui-angular-core"; import { ScalerParams } from "./ScalerParams"; import { RangeInfo } from "./RangeInfo"; import { VerticalLogarithmicScaler } from "./VerticalLogarithmicScaler"; import { FastVerticalLinearScaler } from "./FastVerticalLinearScaler"; import { isNaN_ } from "igniteui-angular-core"; import { StraightNumericAxisBaseView } from "./StraightNumericAxisBaseView"; import { AxisDefaults } from "./AxisDefaults"; /** * @hidden */ export let NumericYAxis = /*@__PURE__*/ (() => { class NumericYAxis extends StraightNumericAxisBase { constructor() { super(); this.ab = NumericYAxis.$; this.ps = this.pq(); } bo() { return new NumericYAxisView(this); } a0() { return new VerticalAxisLabelPanel(); } al() { return new NumericYAxis(); } get_dy() { return true; } f4() { return this.ox().height; } f5(a, b) { if (this.s8 != null) { return this.s8.p(a, b); } return this.s7.p(a, b); } ky(a, b, c, d) { if (this.s8 != null) { this.s8.v(a, b, c, d); return; } this.s7.v(a, b, c, d); } kx(a, b, c, d, e) { if (this.s8 != null) { this.s8.u(a, b, c, d, e); return; } this.s7.u(a, b, c, d, e); } f8(a, b) { if (this.s8 != null) { return this.s8.q(a, b); } return this.s7.q(a, b); } kz(a, b, c, d) { if (this.s8 != null) { this.s8.j(a, b, c, d); return; } this.s7.j(a, b, c, d); } tp(a, b) { if (this.b2 == null || isNaN_(a) || isNaN_(b)) { return; } let c = this.td(a, this); let d = this.td(b, this); if (isNaN_(c) || isNaN_(d)) { return; } this.b2.za = new Rect(0, this.b2.za.x, d, this.b2.za.width, c - d); } pq() { let a = super.pq(); a.b.c = (b) => { if (this.a4 == null || this.a4.visibility == 0) { this.a1.bl = b; if (this.a4 != null && (this.a4.location == 7 || this.a4.location == 6)) { this.b2.pr(); } } }; a.k = (b, c, d) => this.k1(c, d, b.aa, b.b, false); a.l = (b, c, d, e) => this.k2(c, d, e, b.aa); a.m = (b, c) => { let d = b.z; let e = new ScalerParams(0, b.ab, b.aa, this.dp, d); return this.f5(c, e); }; a.q = (b, c) => true; a.j = (b) => this.l8(b.u, b.n, b.aa, b.a, true); a.e = (b) => { b.n = this.a4 != null && (this.a4.location == 7 || this.a4.location == 3) ? b.aa.right : b.aa.left; let c = b.z; let d = new ScalerParams(0, b.ab, b.aa, this.dp, c); if (this.an != null && this.an.b2 != null) { let e = b.n; let f = b.r; let g = this.l1(e, f, b.ab, b.aa, b.z, b.aa.left, b.aa.right); e = g.p0; f = g.p1; b.n = e; b.r = f; } }; a.p = (b, c, d) => { let e = Math.round(c); return e >= Math.floor(b.aa.top) && e <= Math.ceil(b.aa.bottom); }; return a; } pt(a, b, c, d) { let e = d; let f = super.pt(a, b, c, d); let g = new ScalerParams(0, b, a, this.dn, c); let h = NaN; let i = NaN; if (!this.dn && b.top == 0) { i = this.qs; } else if (this.dn && b.bottom == 1) { h = this.qs; } if (isNaN_(h)) { h = this.f8(e.bottom, g); } if (isNaN_(i)) { i = this.f8(e.top, g); } let j = Math.min(h, i); let k = Math.max(h, i); this.qw = j; this.qv = k; let l = ((() => { let $ret = new RangeInfo(); $ret.d = j; $ret.c = k; $ret.b = e.height; return $ret; })()); f.k.add(l); return f; } lw(a) { super.lw(a); let b = this.b2 != null ? this.b2.yr : Rect.empty; let c = this.o3; let d = this.oy(); let e = this.ox(); let f = this.ps.c(a, c, b, d, e); if (f != null) { this.qr = f.f.m; this.qu = f.f.l; } } ma(a, b) { super.ma(a, b); if (b.height != a.height) { this.ec(); } } get_bm() { return 1; } get bm() { return this.get_bm(); } pv() { if (this.qd) { return new VerticalLogarithmicScaler(); } switch (this.s6) { case 0: return new FastVerticalLinearScaler(); case 1: return new VerticalLogarithmicScaler(); } return null; } j$d(a, b) { return this.f8.apply(this, arguments); } j$c(a, b) { return this.f5.apply(this, arguments); } j$e(a, b, c, d, e) { this.kx.apply(this, arguments); } j$f(a, b, c, d) { this.ky.apply(this, arguments); } j$g(a, b, c, d) { this.kz.apply(this, arguments); } get j$b() { return this.dn; } j$a() { return this.ag.apply(this, arguments); } } NumericYAxis.$t = markType(NumericYAxis, 'NumericYAxis', StraightNumericAxisBase.$, [IScaler_$type]); return NumericYAxis; })(); /** * @hidden */ export let NumericYAxisView = /*@__PURE__*/ (() => { class NumericYAxisView extends StraightNumericAxisBaseView { constructor(a) { super(a); this.bu = null; this.bu = a; } ar() { super.ar(); this.b.oi = AxisDefaults.axis_MajorBrush; } } NumericYAxisView.$t = markType(NumericYAxisView, 'NumericYAxisView', StraightNumericAxisBaseView.$); return NumericYAxisView; })();