igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
200 lines (199 loc) • 6.89 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 { __extends } from "tslib";
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
*/
var StraightNumericAxisBase = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(StraightNumericAxisBase, _super);
function StraightNumericAxisBase() {
var _this = _super.call(this) || this;
_this.tb = null;
_this.tf = false;
_this.tp();
return _this;
}
StraightNumericAxisBase.prototype.bo = function () {
return new StraightNumericAxisBaseView(this);
};
StraightNumericAxisBase.prototype.k6 = function (a) {
_super.prototype.k6.call(this, a);
this.te = a;
};
StraightNumericAxisBase.prototype.km = function (a) {
_super.prototype.km.call(this, a);
this.kp(a, "ScaleMode");
};
StraightNumericAxisBase.prototype.kp = function (a, b) {
_super.prototype.kp.call(this, a, b);
var c = typeCast(StraightNumericAxisBase.$, a);
if (c == null) {
return;
}
var d = this;
if (b == "ScaleMode") {
c.s9 = d.s9;
}
};
Object.defineProperty(StraightNumericAxisBase.prototype, "td", {
get: function () {
return this.c(StraightNumericAxisBase.tr);
},
set: function (a) {
this.h(StraightNumericAxisBase.tr, a);
},
enumerable: false,
configurable: true
});
StraightNumericAxisBase.tn = function (a, b) {
var c = typeCast(StraightNumericAxisBase.$, a);
c.tp();
c.ls("Scaler", b.oldValue, b.newValue);
};
StraightNumericAxisBase.prototype.tc = function () {
return null;
};
StraightNumericAxisBase.prototype.get_ta = function () {
if (this.tb == null) {
this.tp();
}
return this.tb;
};
StraightNumericAxisBase.prototype.set_ta = function (a) {
var b = this.tb != a;
if (b) {
var c = this.tb;
this.tb = a;
this.ls("ActualScaler", c, a);
}
};
Object.defineProperty(StraightNumericAxisBase.prototype, "ta", {
get: function () {
return this.get_ta();
},
set: function (a) {
this.set_ta(a);
},
enumerable: false,
configurable: true
});
StraightNumericAxisBase.prototype.sj = function (a, b, c, d, e, f, g) {
var h = this.ta.t(a, b, c, f, g);
f = h.p3;
g = h.p4;
return {
p5: f,
p6: g
};
};
StraightNumericAxisBase.prototype.to = function (a) {
var b = this.tf;
this.tf = true;
a();
this.tf = b;
};
StraightNumericAxisBase.prototype.tp = function () {
var a = this.td;
if (a == null) {
a = this.pz();
}
this.ta = a;
if (this.ta == null) {
throw new ArgumentNullException(0, "ActualScaler");
}
this.tk();
};
StraightNumericAxisBase.prototype.tk = function () {
this.te.bt();
};
StraightNumericAxisBase.prototype.la = function (a, b, c, d) {
if (this.tf) {
return;
}
_super.prototype.la.call(this, 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;
}
};
StraightNumericAxisBase.prototype.tm = function () {
this.ta.y(this.qw);
};
StraightNumericAxisBase.prototype.tl = function () {
this.ta.x(this.qv);
};
StraightNumericAxisBase.prototype.tg = function (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 = markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$);
StraightNumericAxisBase.tr = DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, new PropertyMetadata(2, null, StraightNumericAxisBase.tn));
StraightNumericAxisBase.$$p = markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'ls', ['ScaleMode:s9:tq', [NumericScaleMode_$type, enumGetBox(NumericScaleMode_$type, 0)]]);
return StraightNumericAxisBase;
}(NumericAxisBase));
export { StraightNumericAxisBase };
/**
* @hidden
*/
var StraightNumericAxisBaseView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(StraightNumericAxisBaseView, _super);
function StraightNumericAxisBaseView(a) {
var _this = _super.call(this, a) || this;
_this.bs = null;
_this.bs = a;
return _this;
}
StraightNumericAxisBaseView.prototype.bt = function () {
this.bs.ta.x(this.bs.qv);
this.bs.ta.y(this.bs.qw);
};
StraightNumericAxisBaseView.$t = markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$);
return StraightNumericAxisBaseView;
}(NumericAxisBaseView));
export { StraightNumericAxisBaseView };