igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
302 lines (301 loc) • 12.3 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, __read, __spreadArray } from "tslib";
import { AnchoredCategorySeries } from "./AnchoredCategorySeries";
import { IHorizontalAnchoredCategorySeriesInteractionManager_$type } from "./IHorizontalAnchoredCategorySeriesInteractionManager";
import { DVContainer } from "igniteui-react-core";
import { runOn, Point_$type, typeCast, EnumUtil, enumGetBox, markType, markDep } from "igniteui-react-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { DependencyProperty } from "igniteui-react-core";
import { NumericYAxis } from "./NumericYAxis";
import { CategoryMode_$type } from "./CategoryMode";
import { Axis } from "./Axis";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { TrendLineType_$type } from "igniteui-react-core";
import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory";
import { ISortingAxis_$type } from "./ISortingAxis";
import { CategoryXAxis } from "./CategoryXAxis";
import { PropertyMetadata } from "igniteui-react-core";
/**
* @hidden
*/
var HorizontalAnchoredCategorySeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(HorizontalAnchoredCategorySeries, _super);
function HorizontalAnchoredCategorySeries() {
var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this;
_this.ac4 = null;
_this.ac0 = null;
_this.ac6 = null;
_this.ac2 = 0;
return _this;
}
Object.defineProperty(HorizontalAnchoredCategorySeries.prototype, "ac5", {
get: function () {
var _this = this;
if (this.ac4 == null) {
this.ac4 = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, function () { return _this.ds.n; });
}
return this.ac4;
},
enumerable: false,
configurable: true
});
HorizontalAnchoredCategorySeries.prototype.pf = function () {
_super.prototype.pf.call(this);
this.xAxis = null;
this.yAxis = null;
};
HorizontalAnchoredCategorySeries.prototype.cl = function () {
return 1;
};
HorizontalAnchoredCategorySeries.prototype.cm = function () {
if (this.yAxis != null && this.yAxis.dn) {
return 4;
}
return 3;
};
HorizontalAnchoredCategorySeries.prototype.b3 = function () {
if (this.b4 == 0) {
return 1;
}
else {
return _super.prototype.b3.call(this);
}
};
HorizontalAnchoredCategorySeries.prototype.zd = function () {
return this.ac0;
};
HorizontalAnchoredCategorySeries.prototype.zu = function () {
return this.ac6;
};
HorizontalAnchoredCategorySeries.prototype.xa = function (a) {
if (this.zf == null || this.zf.s.count == 0 || !this.hasMarkers || !this.x1()) {
return Rect.empty;
}
return this.ac5.d$d(this, this.zf.s, a, runOn(this, this.adi));
};
HorizontalAnchoredCategorySeries.prototype.adi = function (a) {
return this.abi.ds(a);
};
HorizontalAnchoredCategorySeries.prototype.ada = function (a, b, c) {
return this.ac5.d$c(this, this.zu(), a, b, c);
};
HorizontalAnchoredCategorySeries.prototype.aj = function (a) {
return this.ac5.d$a(this, this.zf.k, this.aag(this.cw), this.aah(this.cw), a);
};
HorizontalAnchoredCategorySeries.prototype.al = function (a) {
return this.ac5.d$b(this, this.zf.k, this.aag(this.cw), this.aah(this.cw), a);
};
HorizontalAnchoredCategorySeries.prototype.g2 = function (a, b) {
if (this.g1(a, b)) {
return true;
}
if (this.x2(a, b)) {
return true;
}
return false;
};
HorizontalAnchoredCategorySeries.prototype.getOffsetValue = function () {
return this.zk.r(this.zd(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
};
HorizontalAnchoredCategorySeries.prototype.getCategoryWidth = function () {
var a = this.getEffectiveViewport1(this.cw);
return this.zd().getCategorySize(this.cw.ca, this.cw.b9, a);
};
HorizontalAnchoredCategorySeries.prototype.jd = function (a, b, c) {
if (this.dc == null) {
return NaN;
}
var d = this.getEffectiveViewport1(this.cw);
var e = this.zd();
if (e == null) {
return NaN;
}
var f = new ScalerParams(0, this.dc.yr, this.cw.b9, e.dn, d);
var g = this.zk.r(e, this.dc.yr, this.cw.b9, d);
return this.jf(this.valueColumn, a, e, f, g, runOn(this, this.aae), b, c);
};
HorizontalAnchoredCategorySeries.prototype.kj = function (a, b) {
return this.kk(a, b, this.zd(), runOn(this, this.aae), this.valueColumn);
};
HorizontalAnchoredCategorySeries.prototype.kh = function (a, b) {
return this.ki(a, b, this.zd(), runOn(this, this.aae), this.valueColumn);
};
HorizontalAnchoredCategorySeries.prototype.iw = function (a, b, c, d, e) {
if (this.valueColumn == null) {
return Number.POSITIVE_INFINITY;
}
return this.ix(a, b, this.zd(), d, e, this.valueColumn.count, runOn(this, this.aae));
};
HorizontalAnchoredCategorySeries.prototype.ww = function (a, b, c) {
if (this.zd() == null || this.zu() == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
return this.wy(a, b, c, this.zk.r(this.zd(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.zu(), this.zd(), null, null, null);
};
HorizontalAnchoredCategorySeries.prototype.fetchXAxis = function () {
return this.ac0;
};
HorizontalAnchoredCategorySeries.prototype.fetchYAxis = function () {
return this.ac6;
};
HorizontalAnchoredCategorySeries.prototype.ace = function (a) {
this.xAxis = typeCast(CategoryAxisBase.$, a);
};
HorizontalAnchoredCategorySeries.prototype.acf = function (a) {
this.yAxis = typeCast(NumericYAxis.$, a);
};
HorizontalAnchoredCategorySeries.prototype.aaa = function () {
return this.ac6 != null && this.ac6.ed();
};
HorizontalAnchoredCategorySeries.prototype.ade = function (a) {
this.ac0 = a;
};
HorizontalAnchoredCategorySeries.prototype.adf = function (a) {
this.ac6 = a;
};
HorizontalAnchoredCategorySeries.prototype.y7 = function (a, b) {
return this.abf(a, b, this.ac0);
};
HorizontalAnchoredCategorySeries.prototype.rq = function (a, b, c, d) {
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
this.ade(this.xAxis);
if (this.abi.dl) {
this.abi.dk = CategoryTrendLineManagerFactory.a(this.abi.dk, this.ac0, this.td, this, this.ds);
this.abi.dk.g$b = this.trendLineType;
this.abi.dk.g$f = this.trendLinePeriod;
}
break;
case "TrendLineType":
var e = EnumUtil.getEnumValue(TrendLineType_$type, d);
if (e != 0) {
this.abi.dk = CategoryTrendLineManagerFactory.a(this.abi.dk, this.ac0, this.td, this, this.ds);
this.abi.dk.g$b = this.trendLineType;
this.abi.dk.g$f = this.trendLinePeriod;
}
break;
}
_super.prototype.rq.call(this, a, b, c, d);
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
if (c != d) {
this.pp(typeCast(Axis.$, c));
this.ry(typeCast(Axis.$, d));
this.ade(this.xAxis);
this.zo.c9.g(this.ik);
this.r8(false);
this.q0();
}
break;
case HorizontalAnchoredCategorySeries.$$p[1]:
if (c != d) {
this.pp(typeCast(Axis.$, c));
this.ry(typeCast(Axis.$, d));
this.adf(this.yAxis);
if (this.dc != null) {
this.dc.pq();
}
this.zo.c9.g(this.ik);
this.aaa();
this.r8(false);
this.q0();
}
break;
case "CategoryMode":
if (this.xAxis != null) {
this.xAxis.q1(true);
}
break;
}
};
HorizontalAnchoredCategorySeries.prototype.po = function (a, b, c, d) {
_super.prototype.po.call(this, a, b, c, d);
if (this.ac0 != null && typeCast(ISortingAxis_$type, this.ac0) !== null) {
this.ac0.i$i();
}
switch (a) {
case 4:
if (this.ac0 != null) {
this.ac0.ed();
}
if (this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
break;
case 1:
if (this.ac0 != null) {
this.ac0.ed();
}
if (this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
break;
case 0:
if (this.ac0 != null) {
this.ac0.ed();
}
if (this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
break;
case 2:
if (this.ab0 != null && this.abi.c9.d > 0 && this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
break;
case 3:
if (d == this.ab0) {
if (this.ac0 != null) {
this.ac0.ed();
}
if (this.ac6 != null && !this.ac6.ed()) {
this.r8(true);
}
}
break;
}
};
HorizontalAnchoredCategorySeries.prototype.ac8 = function (a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.dj) {
return true;
}
return false;
};
HorizontalAnchoredCategorySeries.prototype.ac9 = function (a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
};
Object.defineProperty(HorizontalAnchoredCategorySeries.prototype, "ac3", {
get: function () {
return this.ac2;
},
set: function (a) {
var b = this.ac3;
if (a != b) {
this.ac2 = a;
this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.ac3));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(HorizontalAnchoredCategorySeries.prototype, "useHighMarkerFidelity", {
get: function () {
return this.aab;
},
enumerable: false,
configurable: true
});
HorizontalAnchoredCategorySeries.$t = markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$);
HorizontalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::adg', [CategoryAxisBase.$, null], 'YAxis::adh', [NumericYAxis.$, null]]);
return HorizontalAnchoredCategorySeries;
}(AnchoredCategorySeries));
export { HorizontalAnchoredCategorySeries };