UNPKG

igniteui-angular-charts

Version:

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

183 lines (182 loc) 5.13 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 { NumericAxisBase } from "./NumericAxisBase"; import { NumericScaleMode_$type } from "./NumericScaleMode"; import { DependencyProperty } from "igniteui-angular-core"; import { NumericScaler } from "./NumericScaler"; import { typeCast, enumGetBox, markType, markDep } from "igniteui-angular-core"; import { ArgumentNullException } from "igniteui-angular-core"; import { LogarithmicScaler } from "./LogarithmicScaler"; import { PropertyMetadata } from "igniteui-angular-core"; import { NumericAxisBaseView } from "./NumericAxisBaseView"; /** * @hidden */ export class StraightNumericAxisBase extends NumericAxisBase { static { this.$t = markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$); } constructor() { super(); this.tp = null; this.tt = false; this.t3(); } bo() { return new StraightNumericAxisBaseView(this); } lg(a) { super.lg(a); this.ts = a; } kw(a) { super.kw(a); this.kz(a, "ScaleMode"); } kz(a, b) { super.kz(a, b); let c = typeCast(StraightNumericAxisBase.$, a); if (c == null) { return; } let d = this; if (b == "ScaleMode") { c.tn = d.tn; } } static { this.t5 = DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, new PropertyMetadata(2, null, StraightNumericAxisBase.t1)); } get tr() { return this.c(StraightNumericAxisBase.t5); } set tr(a) { this.h(StraightNumericAxisBase.t5, a); } static t1(a, b) { let c = typeCast(StraightNumericAxisBase.$, a); c.t3(); c.l2("Scaler", b.oldValue, b.newValue); } tq() { return null; } get_to() { if (this.tp == null) { this.t3(); } return this.tp; } set_to(a) { let b = this.tp != a; if (b) { let c = this.tp; this.tp = a; this.l2("ActualScaler", c, a); } } get to() { return this.get_to(); } set to(a) { this.set_to(a); } sx(a, b, c, d, e, f, g) { let h = this.to.t(a, b, c, f, g); f = h.p3; g = h.p4; return { p5: f, p6: g }; } t2(a) { let b = this.tt; this.tt = true; a(); this.tt = b; } t3() { let a = this.tr; if (a == null) { a = this.qd(); } this.to = a; if (this.to == null) { throw new ArgumentNullException(0, "ActualScaler"); } this.ty(); } ty() { this.ts.bw(); } lk(a, b, c, d) { if (this.tt) { return; } super.lk(a, b, c, d); switch (b) { case NumericAxisBase.$$p[12]: this.t3(); break; case NumericAxisBase.$$p[11]: this.t3(); break; case StraightNumericAxisBase.$$p[0]: this.t3(); break; case "Scaler": this.t3(); break; case "ActualScaler": this.qm = typeCast(LogarithmicScaler.$, this.to) !== null; this.ty(); this.ei(); this.l8(false); break; case "ActualMaximumValue": this.tz(); break; case "ActualMinimumValue": this.t0(); this.t3(); break; } } t0() { this.to.y(this.ra); } tz() { this.to.x(this.q9); } tu(a, b) { if (a < this.ra) { a = this.ra; } else if (a > this.q9) { a = this.q9; } if (!b.d3) { return (a - this.ra) / (this.q9 - this.ra); } else { return (a - this.q9) / (this.ra - this.q9); } } static { this.$$p = markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'l2', ['ScaleMode:tn:t4', [NumericScaleMode_$type, enumGetBox(NumericScaleMode_$type, 0)]]); } } /** * @hidden */ export class StraightNumericAxisBaseView extends NumericAxisBaseView { static { this.$t = markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$); } constructor(a) { super(a); this.bv = null; this.bv = a; } bw() { this.bv.to.x(this.bv.q9); this.bv.to.y(this.bv.ra); } }