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.r6 = null;
_this.sa = false;
_this.sk();
return _this;
}
StraightNumericAxisBase.prototype.bm = function () {
return new StraightNumericAxisBaseView(this);
};
StraightNumericAxisBase.prototype.kb = function (a) {
_super.prototype.kb.call(this, a);
this.r9 = a;
};
StraightNumericAxisBase.prototype.jr = function (a) {
_super.prototype.jr.call(this, a);
this.ju(a, "ScaleMode");
};
StraightNumericAxisBase.prototype.ju = function (a, b) {
_super.prototype.ju.call(this, a, b);
var c = typeCast(StraightNumericAxisBase.$, a);
if (c == null) {
return;
}
var d = this;
if (b == "ScaleMode") {
c.r4 = d.r4;
}
};
Object.defineProperty(StraightNumericAxisBase.prototype, "r8", {
get: function () {
return this.c(StraightNumericAxisBase.sm);
},
set: function (a) {
this.h(StraightNumericAxisBase.sm, a);
},
enumerable: false,
configurable: true
});
StraightNumericAxisBase.si = function (a, b) {
var c = typeCast(StraightNumericAxisBase.$, a);
c.sk();
c.kx("Scaler", b.oldValue, b.newValue);
};
StraightNumericAxisBase.prototype.r7 = function () {
return null;
};
StraightNumericAxisBase.prototype.get_r5 = function () {
if (this.r6 == null) {
this.sk();
}
return this.r6;
};
StraightNumericAxisBase.prototype.set_r5 = function (a) {
var b = this.r6 != a;
if (b) {
var c = this.r6;
this.r6 = a;
this.kx("ActualScaler", c, a);
}
};
Object.defineProperty(StraightNumericAxisBase.prototype, "r5", {
get: function () {
return this.get_r5();
},
set: function (a) {
this.set_r5(a);
},
enumerable: false,
configurable: true
});
StraightNumericAxisBase.prototype.re = function (a, b, c, d, e, f, g) {
var h = this.r5.t(a, b, c, f, g);
f = h.p3;
g = h.p4;
return {
p5: f,
p6: g
};
};
StraightNumericAxisBase.prototype.sj = function (a) {
var b = this.sa;
this.sa = true;
a();
this.sa = b;
};
StraightNumericAxisBase.prototype.sk = function () {
var a = this.r8;
if (a == null) {
a = this.ot();
}
this.r5 = a;
if (this.r5 == null) {
throw new ArgumentNullException(0, "ActualScaler");
}
this.sf();
};
StraightNumericAxisBase.prototype.sf = function () {
this.r9.bn();
};
StraightNumericAxisBase.prototype.kf = function (a, b, c, d) {
if (this.sa) {
return;
}
_super.prototype.kf.call(this, a, b, c, d);
switch (b) {
case NumericAxisBase.$$p[12]:
this.sk();
break;
case NumericAxisBase.$$p[11]:
this.sk();
break;
case StraightNumericAxisBase.$$p[0]:
this.sk();
break;
case "Scaler":
this.sk();
break;
case "ActualScaler":
this.o2 = typeCast(LogarithmicScaler.$, this.r5) !== null;
this.sf();
this.d2();
this.k3(false);
break;
case "ActualMaximumValue":
this.sg();
break;
case "ActualMinimumValue":
this.sh();
this.sk();
break;
}
};
StraightNumericAxisBase.prototype.sh = function () {
this.r5.y(this.pr);
};
StraightNumericAxisBase.prototype.sg = function () {
this.r5.x(this.pq);
};
StraightNumericAxisBase.prototype.sb = function (a, b) {
if (a < this.pr) {
a = this.pr;
}
else if (a > this.pq) {
a = this.pq;
}
if (!b.dq) {
return (a - this.pr) / (this.pq - this.pr);
}
else {
return (a - this.pq) / (this.pr - this.pq);
}
};
StraightNumericAxisBase.$t = markType(StraightNumericAxisBase, 'StraightNumericAxisBase', NumericAxisBase.$);
StraightNumericAxisBase.sm = DependencyProperty.i("Scaler", NumericScaler.$, StraightNumericAxisBase.$, new PropertyMetadata(2, null, StraightNumericAxisBase.si));
StraightNumericAxisBase.$$p = markDep(DependencyProperty, PropertyMetadata, StraightNumericAxisBase, 'kx', ['ScaleMode:r4:sl', [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.bm = null;
_this.bm = a;
return _this;
}
StraightNumericAxisBaseView.prototype.bn = function () {
this.bm.r5.x(this.bm.pq);
this.bm.r5.y(this.bm.pr);
};
StraightNumericAxisBaseView.$t = markType(StraightNumericAxisBaseView, 'StraightNumericAxisBaseView', NumericAxisBaseView.$);
return StraightNumericAxisBaseView;
}(NumericAxisBaseView));
export { StraightNumericAxisBaseView };