UNPKG

igniteui-react-charts

Version:

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

189 lines (188 loc) 6.06 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-react-core"; import { NumericScaler } from "./NumericScaler"; import { typeCast, enumGetBox, markType, markDep } from "igniteui-react-core"; import { ArgumentNullException } from "igniteui-react-core"; import { LogarithmicScaler } from "./LogarithmicScaler"; import { PropertyMetadata } from "igniteui-react-core"; import { NumericAxisBaseView } from "./NumericAxisBaseView"; /** * @hidden */ export let StraightNumericAxisBase = /*@__PURE__*/ (() => { class StraightNumericAxisBase extends NumericAxisBase { constructor() { super(); this.td = null; this.th = false; this.tr(); } bo() { return new StraightNumericAxisBaseView(this); } k8(a) { super.k8(a); this.tg = a; } ko(a) { super.ko(a); this.kr(a, "ScaleMode"); } kr(a, b) { super.kr(a, b); let c = typeCast(StraightNumericAxisBase.$, a); if (c == null) { return; } let d = this; if (b == "ScaleMode") { c.tb = d.tb; } } get tf() { return this.c(StraightNumericAxisBase.tt); } set tf(a) { this.h(StraightNumericAxisBase.tt, a); } static tp(a, b) { let c = typeCast(StraightNumericAxisBase.$, a); c.tr(); c.lu("Scaler", b.oldValue, b.newValue); } te() { return null; } get_tc() { if (this.td == null) { this.tr(); } return this.td; } set_tc(a) { let b = this.td != a; if (b) { let c = this.td; this.td = a; this.lu("ActualScaler", c, a); } } get tc() { return this.get_tc(); } set tc(a) { this.set_tc(a); } sl(a, b, c, d, e, f, g) { let h = this.tc.t(a, b, c, f, g); f = h.p3; g = h.p4; return { p5: f, p6: g }; } tq(a) { let b = this.th; this.th = true; a(); this.th = b; } tr() { let a = this.tf; if (a == null) { a = this.p1(); } this.tc = a; if (this.tc == null) { throw new ArgumentNullException(0, "ActualScaler"); } this.tm(); } tm() { this.tg.bw(); } lc(a, b, c, d) { if (this.th) { return; } super.lc(a, b, c, d); switch (b) { case NumericAxisBase.$$p[12]: this.tr(); break; case NumericAxisBase.$$p[11]: this.tr(); break; case StraightNumericAxisBase.$$p[0]: this.tr(); break; case "Scaler": this.tr(); break; case "ActualScaler": this.qa = typeCast(LogarithmicScaler.$, this.tc) !== null; this.tm(); this.ee(); this.l0(false); break; case "ActualMaximumValue": this.tn(); break; case "ActualMinimumValue": this.to(); this.tr(); break; } } to() { this.tc.y(this.qy); } tn() { this.tc.x(this.qx); } ti(a, b) { if (a < this.qy) { a = this.qy; } else if (a > this.qx) { a = this.qx; } if (!b.dz) { return (a - this.qy) / (this.qx - this.qy); } else { return (a - this.qx) / (this.qy - this.qx); } } } StraightNumericAxisBase.$t = /*@__PURE__*/ markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$); StraightNumericAxisBase.tt = /*@__PURE__*/ DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, /*@__PURE__*/ new PropertyMetadata(2, null, StraightNumericAxisBase.tp)); StraightNumericAxisBase.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'lu', ['ScaleMode:tb:ts', [NumericScaleMode_$type, /*@__PURE__*/ enumGetBox(NumericScaleMode_$type, 0)]]); return StraightNumericAxisBase; })(); /** * @hidden */ export let StraightNumericAxisBaseView = /*@__PURE__*/ (() => { class StraightNumericAxisBaseView extends NumericAxisBaseView { constructor(a) { super(a); this.bv = null; this.bv = a; } bw() { this.bv.tc.x(this.bv.qx); this.bv.tc.y(this.bv.qy); } } StraightNumericAxisBaseView.$t = /*@__PURE__*/ markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$); return StraightNumericAxisBaseView; })();