igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
174 lines (173 loc) • 5.68 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 { enumGetBox, typeCast, 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.n2 = null;
this.n6 = false;
this.og();
}
a4() {
return new StraightNumericAxisBaseView(this);
}
hv(a) {
super.hv(a);
this.n5 = a;
}
get n4() {
return this.c(StraightNumericAxisBase.oi);
}
set n4(a) {
this.h(StraightNumericAxisBase.oi, a);
}
static oe(a, b) {
let c = typeCast(StraightNumericAxisBase.$, a);
c.og();
c.h5("Scaler", b.oldValue, b.newValue);
}
n3() {
return null;
}
get_n1() {
if (this.n2 == null) {
this.og();
}
return this.n2;
}
set_n1(a) {
let b = this.n2 != a;
if (b) {
let c = this.n2;
this.n2 = a;
this.h5("ActualScaler", c, a);
}
}
get n1() {
return this.get_n1();
}
set n1(a) {
this.set_n1(a);
}
ng(a, b, c, d, e, f, g) {
let h = this.n1.t(a, b, c, f, g);
f = h.p3;
g = h.p4;
return {
p5: f,
p6: g
};
}
of(a) {
let b = this.n6;
this.n6 = true;
a();
this.n6 = b;
}
og() {
let a = this.n4;
if (a == null) {
a = this.k7();
}
this.n1 = a;
if (this.n1 == null) {
throw new ArgumentNullException(0, "ActualScaler");
}
this.ob();
}
ob() {
this.n5.bn();
}
hz(a, b, c, d) {
if (this.n6) {
return;
}
super.hz(a, b, c, d);
switch (b) {
case NumericAxisBase.$$p[6]:
this.og();
break;
case NumericAxisBase.$$p[5]:
this.og();
break;
case StraightNumericAxisBase.$$p[0]:
this.og();
break;
case "Scaler":
this.og();
break;
case "ActualScaler":
this.lg = typeCast(LogarithmicScaler.$, this.n1) !== null;
this.ob();
this.c1();
this.ib(false);
break;
case "ActualMaximumValue":
this.oc();
break;
case "ActualMinimumValue":
this.od();
this.og();
break;
}
}
od() {
this.n1.y(this.l4);
}
oc() {
this.n1.x(this.l3);
}
n7(a, b) {
if (a < this.l4) {
a = this.l4;
}
else if (a > this.l3) {
a = this.l3;
}
if (!b.cp) {
return (a - this.l4) / (this.l3 - this.l4);
}
else {
return (a - this.l3) / (this.l4 - this.l3);
}
}
}
StraightNumericAxisBase.$t = /*@__PURE__*/ markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$);
StraightNumericAxisBase.oi = /*@__PURE__*/ DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, /*@__PURE__*/ new PropertyMetadata(2, null, StraightNumericAxisBase.oe));
StraightNumericAxisBase.$$p = /*@__PURE__*/ markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'h5', ['ScaleMode:n0:oh', [NumericScaleMode_$type, /*@__PURE__*/ enumGetBox(NumericScaleMode_$type, 0)]]);
return StraightNumericAxisBase;
})();
/**
* @hidden
*/
export let StraightNumericAxisBaseView = /*@__PURE__*/ (() => {
class StraightNumericAxisBaseView extends NumericAxisBaseView {
constructor(a) {
super(a);
this.bm = null;
this.bm = a;
}
bn() {
this.bm.n1.x(this.bm.l3);
this.bm.n1.y(this.bm.l4);
}
}
StraightNumericAxisBaseView.$t = /*@__PURE__*/ markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$);
return StraightNumericAxisBaseView;
})();