UNPKG

igniteui-react-charts

Version:

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

269 lines (268 loc) 10.6 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 } 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 !== null && _super.apply(this, arguments) || this; _this.acf = null; return _this; } VerticalAnchoredCategorySeries.prototype.cl = function () { if (this.xAxis != null && this.xAxis.ch) { return 4; } return 3; }; VerticalAnchoredCategorySeries.prototype.cm = function () { return 1; }; VerticalAnchoredCategorySeries.prototype.o2 = function () { _super.prototype.o2.call(this); this.xAxis = null; this.yAxis = null; }; Object.defineProperty(VerticalAnchoredCategorySeries.prototype, "acg", { get: function () { var _this = this; if (this.acf == null) { this.acf = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, function () { return _this.ds.n; }); } return this.acf; }, enumerable: false, configurable: true }); VerticalAnchoredCategorySeries.prototype.get_isVertical = function () { return true; }; VerticalAnchoredCategorySeries.prototype.yu = function () { return this.yAxis; }; VerticalAnchoredCategorySeries.prototype.zb = function () { return this.xAxis; }; VerticalAnchoredCategorySeries.prototype.getOffsetValue = function () { return this.y1.r(this.yu(), this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)); }; VerticalAnchoredCategorySeries.prototype.getCategoryWidth = function () { return this.yAxis.getCategorySize(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)); }; VerticalAnchoredCategorySeries.prototype.j8 = function (a, b) { return this.j9(a, b, this.yu(), runOn(this, this.zv), this.valueColumn); }; VerticalAnchoredCategorySeries.prototype.ka = function (a, b) { return this.kb(a, b, this.yu(), runOn(this, this.zv), this.valueColumn); }; VerticalAnchoredCategorySeries.prototype.ip = function (a, b, c, d, e) { if (this.valueColumn == null) { return Number.POSITIVE_INFINITY; } return this.iq(a, b, this.yAxis, d, e, this.valueColumn.count, runOn(this, this.zv)); }; VerticalAnchoredCategorySeries.prototype.az = function (a) { if (a.isEmpty && this.dc != null) { a = this.dc.v5; } if (this.valueColumn == null) { return null; } var b = this.wl(this.cw); var c = this.yu(); var d = new ScalerParams(0, a, this.dc.wn, c.ch, this.getEffectiveViewport()); var e = (c.eo(b.top, d)); var f = (c.eo(b.bottom, d)); if (!c.ch) { var g = e; e = f; f = g; } e -= this.abc; f += this.abc; var h = null; if (c.cn) { 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.zb(), a); return n; }; VerticalAnchoredCategorySeries.prototype.b3 = function () { if (this.b4 == 0) { return 1; } else { return _super.prototype.b3.call(this); } }; VerticalAnchoredCategorySeries.prototype.wr = function (a) { if (!this.hasMarkers || !this.xi()) { return Rect.empty; } return this.acg.e$b(this, this.yw.p, a, runOn(this, this.aco)); }; VerticalAnchoredCategorySeries.prototype.aco = function (a) { return this.aaw.di(a); }; VerticalAnchoredCategorySeries.prototype.gw = function (a, b) { if (this.gv(a, b)) { return true; } if (this.xj(a, b)) { return true; } return false; }; VerticalAnchoredCategorySeries.prototype.i5 = function (a, b, c) { if (this.dc == null) { return NaN; } var d = this.getEffectiveViewport1(this.cw); var e = this.yu(); var f = new ScalerParams(0, this.dc.v5, this.cw.b1, e.ch, d); var g = this.y1.r(e, this.dc.v5, this.cw.b1, d); return this.i7(this.valueColumn, a, e, f, g, runOn(this, this.zv), b, c); }; VerticalAnchoredCategorySeries.prototype.we = function (a, b, c) { var d = this.yu(); return this.wg(a, b, c, this.y1.r(d, this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)), this.zb(), d, null, null, null); }; VerticalAnchoredCategorySeries.prototype.fetchXAxis = function () { return this.xAxis; }; VerticalAnchoredCategorySeries.prototype.fetchYAxis = function () { return this.yAxis; }; VerticalAnchoredCategorySeries.prototype.abs = function (a) { this.xAxis = typeCast(NumericXAxis.$, a); }; VerticalAnchoredCategorySeries.prototype.abt = function (a) { this.yAxis = typeCast(CategoryYAxis.$, a); }; VerticalAnchoredCategorySeries.prototype.zr = function () { return this.xAxis != null && this.xAxis.c1(); }; VerticalAnchoredCategorySeries.prototype.yo = function (a, b) { return this.aat(a, b, this.yAxis); }; VerticalAnchoredCategorySeries.prototype.ir = function (a) { return this.acg.e$a(this, a); }; VerticalAnchoredCategorySeries.prototype.zv = function (a) { return this.it(a, this.yu()); }; VerticalAnchoredCategorySeries.prototype.j3 = function (a) { return truncate(Math.round(this.ir(a))); }; VerticalAnchoredCategorySeries.prototype.kn = function (a) { var b = this.j3(a); return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; }; VerticalAnchoredCategorySeries.prototype.ra = function (a, b, c, d) { _super.prototype.ra.call(this, a, b, c, d); switch (b) { case VerticalAnchoredCategorySeries.$$p[0]: if (c != d) { this.pc(typeCast(Axis.$, c)); this.ri(typeCast(Axis.$, d)); this.y5.c0.g(this.id); if (this.dc != null) { this.dc.n3(); } this.rs(false); this.ql(); } break; case VerticalAnchoredCategorySeries.$$p[1]: if (c != d) { this.pc(typeCast(Axis.$, c)); this.ri(typeCast(Axis.$, d)); this.y5.c0.g(this.id); this.zr(); this.rs(false); this.ql(); } break; case "TrendLineType": var e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.aaw.db = CategoryTrendLineManagerFactory.a(this.aaw.db, this.yAxis, this.sx, this, this.ds); } break; } }; VerticalAnchoredCategorySeries.prototype.acj = function (a) { if (typeCast(CategoryYAxis.$, a) !== null) { return true; } return false; }; VerticalAnchoredCategorySeries.prototype.aci = function (a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; }; Object.defineProperty(VerticalAnchoredCategorySeries.prototype, "useHighMarkerFidelity", { get: function () { return this.zs; }, enumerable: false, configurable: true }); VerticalAnchoredCategorySeries.$t = markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$); VerticalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::acm', [NumericXAxis.$, null], 'YAxis::acn', [CategoryYAxis.$, null]]); return VerticalAnchoredCategorySeries; }(AnchoredCategorySeries)); export { VerticalAnchoredCategorySeries };