igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
189 lines (188 loc) • 6.06 kB
JavaScript
/*
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.tb = null;
this.tf = false;
this.tp();
}
bo() {
return new StraightNumericAxisBaseView(this);
}
k6(a) {
super.k6(a);
this.te = a;
}
km(a) {
super.km(a);
this.kp(a, "ScaleMode");
}
kp(a, b) {
super.kp(a, b);
let c = typeCast(StraightNumericAxisBase.$, a);
if (c == null) {
return;
}
let d = this;
if (b == "ScaleMode") {
c.s9 = d.s9;
}
}
get td() {
return this.c(StraightNumericAxisBase.tr);
}
set td(a) {
this.h(StraightNumericAxisBase.tr, a);
}
static tn(a, b) {
let c = typeCast(StraightNumericAxisBase.$, a);
c.tp();
c.ls("Scaler", b.oldValue, b.newValue);
}
tc() {
return null;
}
get_ta() {
if (this.tb == null) {
this.tp();
}
return this.tb;
}
set_ta(a) {
let b = this.tb != a;
if (b) {
let c = this.tb;
this.tb = a;
this.ls("ActualScaler", c, a);
}
}
get ta() {
return this.get_ta();
}
set ta(a) {
this.set_ta(a);
}
sj(a, b, c, d, e, f, g) {
let h = this.ta.t(a, b, c, f, g);
f = h.p3;
g = h.p4;
return {
p5: f,
p6: g
};
}
to(a) {
let b = this.tf;
this.tf = true;
a();
this.tf = b;
}
tp() {
let a = this.td;
if (a == null) {
a = this.pz();
}
this.ta = a;
if (this.ta == null) {
throw new ArgumentNullException(0, "ActualScaler");
}
this.tk();
}
tk() {
this.te.bt();
}
la(a, b, c, d) {
if (this.tf) {
return;
}
super.la(a, b, c, d);
switch (b) {
case NumericAxisBase.$$p[12]:
this.tp();
break;
case NumericAxisBase.$$p[11]:
this.tp();
break;
case StraightNumericAxisBase.$$p[0]:
this.tp();
break;
case "Scaler":
this.tp();
break;
case "ActualScaler":
this.p8 = typeCast(LogarithmicScaler.$, this.ta) !== null;
this.tk();
this.ed();
this.ly(false);
break;
case "ActualMaximumValue":
this.tl();
break;
case "ActualMinimumValue":
this.tm();
this.tp();
break;
}
}
tm() {
this.ta.y(this.qw);
}
tl() {
this.ta.x(this.qv);
}
tg(a, b) {
if (a < this.qw) {
a = this.qw;
}
else if (a > this.qv) {
a = this.qv;
}
if (!b.dy) {
return (a - this.qw) / (this.qv - this.qw);
}
else {
return (a - this.qv) / (this.qw - this.qv);
}
}
}
StraightNumericAxisBase.$t = /*@__PURE__*/ markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$);
StraightNumericAxisBase.tr = /*@__PURE__*/ DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, /*@__PURE__*/ new PropertyMetadata(2, null, StraightNumericAxisBase.tn));
StraightNumericAxisBase.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'ls', ['ScaleMode:s9:tq', [NumericScaleMode_$type, /*@__PURE__*/ 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.ta.x(this.bs.qv);
this.bs.ta.y(this.bs.qw);
}
}
StraightNumericAxisBaseView.$t = /*@__PURE__*/ markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$);
return StraightNumericAxisBaseView;
})();