UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

269 lines (268 loc) 10.7 kB
/* 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 { NumericXAxis } from "./NumericXAxis"; import { DependencyProperty } from "igniteui-react-core"; import { CategoryYAxis } from "./CategoryYAxis"; import { IVerticalAnchoredCategorySeriesInteractionManager_$type } from "./IVerticalAnchoredCategorySeriesInteractionManager"; import { DVContainer } from "igniteui-react-core"; import { runOn, typeCast, EnumUtil, markType, markDep } from "igniteui-react-core"; import { Axis } from "./Axis"; import { ScalerParams } from "./ScalerParams"; import { AxisRange } from "./AxisRange"; import { Rect } from "igniteui-react-core"; import { TrendLineType_$type } from "igniteui-react-core"; import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory"; import { PropertyMetadata } from "igniteui-react-core"; import { truncate, isNaN_, isInfinity } from "igniteui-react-core"; /** * @hidden */ var VerticalAnchoredCategorySeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(VerticalAnchoredCategorySeries, _super); function VerticalAnchoredCategorySeries() { var _this = _super.apply(this, __spreadArray([], __read(arguments), false)) || this; _this.ac6 = null; return _this; } VerticalAnchoredCategorySeries.prototype.cl = function () { if (this.xAxis != null && this.xAxis.dn) { return 4; } return 3; }; VerticalAnchoredCategorySeries.prototype.cm = function () { return 1; }; VerticalAnchoredCategorySeries.prototype.ph = function () { _super.prototype.ph.call(this); this.xAxis = null; this.yAxis = null; }; Object.defineProperty(VerticalAnchoredCategorySeries.prototype, "ac7", { get: function () { var _this = this; if (this.ac6 == null) { this.ac6 = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, function () { return _this.ds.n; }); } return this.ac6; }, enumerable: false, configurable: true }); VerticalAnchoredCategorySeries.prototype.get_isVertical = function () { return true; }; VerticalAnchoredCategorySeries.prototype.zi = function () { return this.yAxis; }; VerticalAnchoredCategorySeries.prototype.zz = function () { return this.xAxis; }; VerticalAnchoredCategorySeries.prototype.getOffsetValue = function () { return this.zp.r(this.zi(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); }; VerticalAnchoredCategorySeries.prototype.getCategoryWidth = function () { return this.yAxis.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); }; VerticalAnchoredCategorySeries.prototype.kj = function (a, b) { return this.kk(a, b, this.zi(), runOn(this, this.aaj), this.valueColumn); }; VerticalAnchoredCategorySeries.prototype.kl = function (a, b) { return this.km(a, b, this.zi(), runOn(this, this.aaj), this.valueColumn); }; VerticalAnchoredCategorySeries.prototype.iy = function (a, b, c, d, e) { if (this.valueColumn == null) { return Number.POSITIVE_INFINITY; } return this.iz(a, b, this.yAxis, d, e, this.valueColumn.count, runOn(this, this.aaj)); }; VerticalAnchoredCategorySeries.prototype.az = function (a) { if (a.isEmpty && this.dc != null) { a = this.dc.yv; } if (this.valueColumn == null) { return null; } var b = this.w6(this.cw); var c = this.zi(); var d = new ScalerParams(0, a, this.dc.zd, c.dn, this.getEffectiveViewport()); var e = (c.ga(b.top, d)); var f = (c.ga(b.bottom, d)); if (!c.dn) { var g = e; e = f; f = g; } e -= this.ab3; f += this.ab3; var h = null; if (c.dw) { h = c; e = h.i$f(e); f = h.i$f(f); } else { e = Math.floor(e); f = Math.ceil(f); } if (isNaN_(e) || isNaN_(f)) { return null; } e = Math.max(0, Math.min(this.valueColumn.count - 1, e)); f = Math.max(0, Math.min(this.valueColumn.count - 1, f)); var i = 1.7976931348623157E+308; var j = -1.7976931348623157E+308; if (truncate(e) <= truncate(f)) { for (var k = truncate(e); k <= truncate(f); k++) { var l = k; if (h != null) { l = h.i$b._inner[k]; } var m = this.valueColumn.item(l); if (this.valueColumn.mayContainUnknowns) { if (isInfinity(m) || isNaN_(m)) { continue; } } i = Math.min(i, m); j = Math.max(j, m); } } var n = new AxisRange(i, j); n = this.ax(n, this.zz(), a); return n; }; VerticalAnchoredCategorySeries.prototype.b3 = function () { if (this.b4 == 0) { return 1; } else { return _super.prototype.b3.call(this); } }; VerticalAnchoredCategorySeries.prototype.xc = function (a) { if (!this.hasMarkers || !this.x3()) { return Rect.empty; } return this.ac7.e$b(this, this.zk.s, a, runOn(this, this.adf)); }; VerticalAnchoredCategorySeries.prototype.adf = function (a) { return this.abn.ds(a); }; VerticalAnchoredCategorySeries.prototype.g4 = function (a, b) { if (this.g3(a, b)) { return true; } if (this.x4(a, b)) { return true; } return false; }; VerticalAnchoredCategorySeries.prototype.jf = function (a, b, c) { if (this.dc == null) { return NaN; } var d = this.getEffectiveViewport1(this.cw); var e = this.zi(); 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); }; VerticalAnchoredCategorySeries.prototype.wy = function (a, b, c) { var d = this.zi(); return this.w0(a, b, c, this.zp.r(d, this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.zz(), d, null, null, null); }; VerticalAnchoredCategorySeries.prototype.fetchXAxis = function () { return this.xAxis; }; VerticalAnchoredCategorySeries.prototype.fetchYAxis = function () { return this.yAxis; }; VerticalAnchoredCategorySeries.prototype.acj = function (a) { this.xAxis = typeCast(NumericXAxis.$, a); }; VerticalAnchoredCategorySeries.prototype.ack = function (a) { this.yAxis = typeCast(CategoryYAxis.$, a); }; VerticalAnchoredCategorySeries.prototype.aaf = function () { return this.xAxis != null && this.xAxis.ee(); }; VerticalAnchoredCategorySeries.prototype.zc = function (a, b) { return this.abk(a, b, this.yAxis); }; VerticalAnchoredCategorySeries.prototype.i0 = function (a) { return this.ac7.e$a(this, a); }; VerticalAnchoredCategorySeries.prototype.aaj = function (a) { return this.i2(a, this.zi()); }; VerticalAnchoredCategorySeries.prototype.ke = function (a) { return truncate(Math.round(this.i0(a))); }; VerticalAnchoredCategorySeries.prototype.ky = function (a) { var b = this.ke(a); return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; }; VerticalAnchoredCategorySeries.prototype.rs = function (a, b, c, d) { _super.prototype.rs.call(this, a, b, c, d); switch (b) { case VerticalAnchoredCategorySeries.$$p[0]: if (c != d) { this.pr(typeCast(Axis.$, c)); this.r0(typeCast(Axis.$, d)); this.zt.c9.g(this.im); if (this.dc != null) { this.dc.ps(); } this.sa(false); this.q2(); } break; case VerticalAnchoredCategorySeries.$$p[1]: if (c != d) { this.pr(typeCast(Axis.$, c)); this.r0(typeCast(Axis.$, d)); this.zt.c9.g(this.im); this.aaf(); this.sa(false); this.q2(); } break; case "TrendLineType": var e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.abn.dk = CategoryTrendLineManagerFactory.a(this.abn.dk, this.yAxis, this.tf, this, this.ds); } break; } }; VerticalAnchoredCategorySeries.prototype.ada = function (a) { if (typeCast(CategoryYAxis.$, a) !== null) { return true; } return false; }; VerticalAnchoredCategorySeries.prototype.ac9 = function (a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; }; Object.defineProperty(VerticalAnchoredCategorySeries.prototype, "useHighMarkerFidelity", { get: function () { return this.aag; }, enumerable: false, configurable: true }); VerticalAnchoredCategorySeries.$t = markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$); VerticalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::add', [NumericXAxis.$, null], 'YAxis::ade', [CategoryYAxis.$, null]]); return VerticalAnchoredCategorySeries; }(AnchoredCategorySeries)); export { VerticalAnchoredCategorySeries };