UNPKG

igniteui-angular-charts

Version:

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

189 lines (188 loc) 6.18 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 let StraightNumericAxisBase = /*@__PURE__*/ (() => { class StraightNumericAxisBase extends NumericAxisBase { constructor() { super(); this.s8 = null; this.tc = false; this.tm(); } bo() { return new StraightNumericAxisBaseView(this); } k3(a) { super.k3(a); this.tb = a; } kj(a) { super.kj(a); this.km(a, "ScaleMode"); } km(a, b) { super.km(a, b); let c = typeCast(StraightNumericAxisBase.$, a); if (c == null) { return; } let d = this; if (b == "ScaleMode") { c.s6 = d.s6; } } get ta() { return this.c(StraightNumericAxisBase.to); } set ta(a) { this.h(StraightNumericAxisBase.to, a); } static tk(a, b) { let c = typeCast(StraightNumericAxisBase.$, a); c.tm(); c.lp("Scaler", b.oldValue, b.newValue); } s9() { return null; } get_s7() { if (this.s8 == null) { this.tm(); } return this.s8; } set_s7(a) { let b = this.s8 != a; if (b) { let c = this.s8; this.s8 = a; this.lp("ActualScaler", c, a); } } get s7() { return this.get_s7(); } set s7(a) { this.set_s7(a); } sg(a, b, c, d, e, f, g) { let h = this.s7.t(a, b, c, f, g); f = h.p3; g = h.p4; return { p5: f, p6: g }; } tl(a) { let b = this.tc; this.tc = true; a(); this.tc = b; } tm() { let a = this.ta; if (a == null) { a = this.pv(); } this.s7 = a; if (this.s7 == null) { throw new ArgumentNullException(0, "ActualScaler"); } this.th(); } th() { this.tb.bt(); } k7(a, b, c, d) { if (this.tc) { return; } super.k7(a, b, c, d); switch (b) { case NumericAxisBase.$$p[12]: this.tm(); break; case NumericAxisBase.$$p[11]: this.tm(); break; case StraightNumericAxisBase.$$p[0]: this.tm(); break; case "Scaler": this.tm(); break; case "ActualScaler": this.p4 = typeCast(LogarithmicScaler.$, this.s7) !== null; this.th(); this.ec(); this.lv(false); break; case "ActualMaximumValue": this.ti(); break; case "ActualMinimumValue": this.tj(); this.tm(); break; } } tj() { this.s7.y(this.qt); } ti() { this.s7.x(this.qs); } td(a, b) { if (a < this.qt) { a = this.qt; } else if (a > this.qs) { a = this.qs; } if (!b.dy) { return (a - this.qt) / (this.qs - this.qt); } else { return (a - this.qs) / (this.qt - this.qs); } } } StraightNumericAxisBase.$t = markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$); StraightNumericAxisBase.to = DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, new PropertyMetadata(2, null, StraightNumericAxisBase.tk)); StraightNumericAxisBase.$$p = markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'lp', ['ScaleMode:s6:tn', [NumericScaleMode_$type, enumGetBox(NumericScaleMode_$type, 0)]]); return StraightNumericAxisBase; })(); /** * @hidden */ export let StraightNumericAxisBaseView = /*@__PURE__*/ (() => { class StraightNumericAxisBaseView extends NumericAxisBaseView { constructor(a) { super(a); this.bs = null; this.bs = a; } bt() { this.bs.s7.x(this.bs.qs); this.bs.s7.y(this.bs.qt); } } StraightNumericAxisBaseView.$t = markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$); return StraightNumericAxisBaseView; })();