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.ac9 = null;
_this.ac5 = null;
_this.adb = null;
_this.ac7 = 0;
return _this;
}
Object.defineProperty(HorizontalAnchoredCategorySeries.prototype, "ada", {
get: function () {
var _this = this;
if (this.ac9 == null) {
this.ac9 = DVContainer.instance.createInstance(IHorizontalAnchoredCategorySeriesInteractionManager_$type, function () { return _this.ds.n; });
}
return this.ac9;
},
enumerable: false,
configurable: true
});
HorizontalAnchoredCategorySeries.prototype.ph = function () {
_super.prototype.ph.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.zi = function () {
return this.ac5;
};
HorizontalAnchoredCategorySeries.prototype.zz = function () {
return this.adb;
};
HorizontalAnchoredCategorySeries.prototype.xc = function (a) {
if (this.zk == null || this.zk.s.count == 0 || !this.hasMarkers || !this.x3()) {
return Rect.empty;
}
return this.ada.d$d(this, this.zk.s, a, runOn(this, this.adn));
};
HorizontalAnchoredCategorySeries.prototype.adn = function (a) {
return this.abn.ds(a);
};
HorizontalAnchoredCategorySeries.prototype.adf = function (a, b, c) {
return this.ada.d$c(this, this.zz(), a, b, c);
};
HorizontalAnchoredCategorySeries.prototype.aj = function (a) {
return this.ada.d$a(this, this.zk.k, this.aal(this.cw), this.aam(this.cw), a);
};
HorizontalAnchoredCategorySeries.prototype.al = function (a) {
return this.ada.d$b(this, this.zk.k, this.aal(this.cw), this.aam(this.cw), a);
};
HorizontalAnchoredCategorySeries.prototype.g4 = function (a, b) {
if (this.g3(a, b)) {
return true;
}
if (this.x4(a, b)) {
return true;
}
return false;
};
HorizontalAnchoredCategorySeries.prototype.getOffsetValue = function () {
return this.zp.r(this.zi(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
};
HorizontalAnchoredCategorySeries.prototype.getCategoryWidth = function () {
var a = this.getEffectiveViewport1(this.cw);
return this.zi().getCategorySize(this.cw.ca, this.cw.b9, a);
};
HorizontalAnchoredCategorySeries.prototype.jf = function (a, b, c) {
if (this.dc == null) {
return NaN;
}
var d = this.getEffectiveViewport1(this.cw);
var e = this.zi();
if (e == null) {
return NaN;
}
var f = new ScalerParams(0, this.dc.yv, this.cw.b9, e.dn, d);
var g = this.zp.r(e, this.dc.yv, this.cw.b9, d);
return this.jh(this.valueColumn, a, e, f, g, runOn(this, this.aaj), b, c);
};
HorizontalAnchoredCategorySeries.prototype.kl = function (a, b) {
return this.km(a, b, this.zi(), runOn(this, this.aaj), this.valueColumn);
};
HorizontalAnchoredCategorySeries.prototype.kj = function (a, b) {
return this.kk(a, b, this.zi(), runOn(this, this.aaj), this.valueColumn);
};
HorizontalAnchoredCategorySeries.prototype.iy = function (a, b, c, d, e) {
if (this.valueColumn == null) {
return Number.POSITIVE_INFINITY;
}
return this.iz(a, b, this.zi(), d, e, this.valueColumn.count, runOn(this, this.aaj));
};
HorizontalAnchoredCategorySeries.prototype.wy = function (a, b, c) {
if (this.zi() == null || this.zz() == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
return this.w0(a, b, c, this.zp.r(this.zi(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.zz(), this.zi(), null, null, null);
};
HorizontalAnchoredCategorySeries.prototype.fetchXAxis = function () {
return this.ac5;
};
HorizontalAnchoredCategorySeries.prototype.fetchYAxis = function () {
return this.adb;
};
HorizontalAnchoredCategorySeries.prototype.acj = function (a) {
this.xAxis = typeCast(CategoryAxisBase.$, a);
};
HorizontalAnchoredCategorySeries.prototype.ack = function (a) {
this.yAxis = typeCast(NumericYAxis.$, a);
};
HorizontalAnchoredCategorySeries.prototype.aaf = function () {
return this.adb != null && this.adb.ee();
};
HorizontalAnchoredCategorySeries.prototype.adj = function (a) {
this.ac5 = a;
};
HorizontalAnchoredCategorySeries.prototype.adk = function (a) {
this.adb = a;
};
HorizontalAnchoredCategorySeries.prototype.zc = function (a, b) {
return this.abk(a, b, this.ac5);
};
HorizontalAnchoredCategorySeries.prototype.rs = function (a, b, c, d) {
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
this.adj(this.xAxis);
if (this.abn.dl) {
this.abn.dk = CategoryTrendLineManagerFactory.a(this.abn.dk, this.ac5, this.tf, this, this.ds);
this.abn.dk.g$b = this.trendLineType;
this.abn.dk.g$f = this.trendLinePeriod;
}
break;
case "TrendLineType":
var e = EnumUtil.getEnumValue(TrendLineType_$type, d);
if (e != 0) {
this.abn.dk = CategoryTrendLineManagerFactory.a(this.abn.dk, this.ac5, this.tf, this, this.ds);
this.abn.dk.g$b = this.trendLineType;
this.abn.dk.g$f = this.trendLinePeriod;
}
break;
}
_super.prototype.rs.call(this, a, b, c, d);
switch (b) {
case HorizontalAnchoredCategorySeries.$$p[0]:
if (c != d) {
this.pr(typeCast(Axis.$, c));
this.r0(typeCast(Axis.$, d));
this.adj(this.xAxis);
this.zt.c9.g(this.im);
this.sa(false);
this.q2();
}
break;
case HorizontalAnchoredCategorySeries.$$p[1]:
if (c != d) {
this.pr(typeCast(Axis.$, c));
this.r0(typeCast(Axis.$, d));
this.adk(this.yAxis);
if (this.dc != null) {
this.dc.ps();
}
this.zt.c9.g(this.im);
this.aaf();
this.sa(false);
this.q2();
}
break;
case "CategoryMode":
if (this.xAxis != null) {
this.xAxis.q5(true);
}
break;
}
};
HorizontalAnchoredCategorySeries.prototype.pq = function (a, b, c, d) {
_super.prototype.pq.call(this, a, b, c, d);
if (this.ac5 != null && typeCast(ISortingAxis_$type, this.ac5) !== null) {
this.ac5.i$i();
}
switch (a) {
case 4:
if (this.ac5 != null) {
this.ac5.ee();
}
if (this.adb != null && !this.adb.ee()) {
this.sa(true);
}
break;
case 1:
if (this.ac5 != null) {
this.ac5.ee();
}
if (this.adb != null && !this.adb.ee()) {
this.sa(true);
}
break;
case 0:
if (this.ac5 != null) {
this.ac5.ee();
}
if (this.adb != null && !this.adb.ee()) {
this.sa(true);
}
break;
case 2:
if (this.ab5 != null && this.abn.c9.d > 0 && this.adb != null && !this.adb.ee()) {
this.sa(true);
}
break;
case 3:
if (d == this.ab5) {
if (this.ac5 != null) {
this.ac5.ee();
}
if (this.adb != null && !this.adb.ee()) {
this.sa(true);
}
}
break;
}
};
HorizontalAnchoredCategorySeries.prototype.add = function (a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.dj) {
return true;
}
return false;
};
HorizontalAnchoredCategorySeries.prototype.ade = function (a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
};
Object.defineProperty(HorizontalAnchoredCategorySeries.prototype, "ac8", {
get: function () {
return this.ac7;
},
set: function (a) {
var b = this.ac8;
if (a != b) {
this.ac7 = a;
this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.ac8));
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(HorizontalAnchoredCategorySeries.prototype, "useHighMarkerFidelity", {
get: function () {
return this.aag;
},
enumerable: false,
configurable: true
});
HorizontalAnchoredCategorySeries.$t = markType(HorizontalAnchoredCategorySeries, 'HorizontalAnchoredCategorySeries', AnchoredCategorySeries.$);
HorizontalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, HorizontalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::adl', [CategoryAxisBase.$, null], 'YAxis::adm', [NumericYAxis.$, null]]);
return HorizontalAnchoredCategorySeries;
}(AnchoredCategorySeries));
export { HorizontalAnchoredCategorySeries };