UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

269 lines (268 loc) 10.9 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-angular-core"; import { CategoryYAxis } from "./CategoryYAxis"; import { IVerticalAnchoredCategorySeriesInteractionManager_$type } from "./IVerticalAnchoredCategorySeriesInteractionManager"; import { DVContainer } from "igniteui-angular-core"; import { runOn, typeCast, EnumUtil, markType, markDep } from "igniteui-angular-core"; import { Axis } from "./Axis"; import { ScalerParams } from "./ScalerParams"; import { AxisRange } from "./AxisRange"; import { Rect } from "igniteui-angular-core"; import { TrendLineType_$type } from "igniteui-angular-core"; import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory"; import { PropertyMetadata } from "igniteui-angular-core"; import { truncate, isNaN_, isInfinity } from "igniteui-angular-core"; /** * @hidden */ var VerticalAnchoredCategorySeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(VerticalAnchoredCategorySeries, _super); function VerticalAnchoredCategorySeries() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.acd = null; return _this; } VerticalAnchoredCategorySeries.prototype.ck = function () { if (this.xAxis != null && this.xAxis.ch) { return 4; } return 3; }; VerticalAnchoredCategorySeries.prototype.cl = function () { return 1; }; VerticalAnchoredCategorySeries.prototype.o1 = function () { _super.prototype.o1.call(this); this.xAxis = null; this.yAxis = null; }; Object.defineProperty(VerticalAnchoredCategorySeries.prototype, "ace", { get: function () { var _this = this; if (this.acd == null) { this.acd = DVContainer.instance.createInstance(IVerticalAnchoredCategorySeriesInteractionManager_$type, function () { return _this.dr.n; }); } return this.acd; }, enumerable: false, configurable: true }); VerticalAnchoredCategorySeries.prototype.get_isVertical = function () { return true; }; VerticalAnchoredCategorySeries.prototype.yr = function () { return this.yAxis; }; VerticalAnchoredCategorySeries.prototype.y8 = function () { return this.xAxis; }; VerticalAnchoredCategorySeries.prototype.getOffsetValue = function () { return this.yy.r(this.yr(), this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)); }; VerticalAnchoredCategorySeries.prototype.getCategoryWidth = function () { return this.yAxis.getCategorySize(this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)); }; VerticalAnchoredCategorySeries.prototype.j7 = function (a, b) { return this.j8(a, b, this.yr(), runOn(this, this.zs), this.valueColumn); }; VerticalAnchoredCategorySeries.prototype.j9 = function (a, b) { return this.ka(a, b, this.yr(), runOn(this, this.zs), this.valueColumn); }; VerticalAnchoredCategorySeries.prototype.io = function (a, b, c, d, e) { if (this.valueColumn == null) { return Number.POSITIVE_INFINITY; } return this.ip(a, b, this.yAxis, d, e, this.valueColumn.count, runOn(this, this.zs)); }; VerticalAnchoredCategorySeries.prototype.az = function (a) { if (a.isEmpty && this.db != null) { a = this.db.v4; } if (this.valueColumn == null) { return null; } var b = this.wi(this.cv); var c = this.yr(); var d = new ScalerParams(0, a, this.db.wk, 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.aba; f += this.aba; 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.y8(), a); return n; }; VerticalAnchoredCategorySeries.prototype.b2 = function () { if (this.b3 == 0) { return 1; } else { return _super.prototype.b2.call(this); } }; VerticalAnchoredCategorySeries.prototype.wo = function (a) { if (!this.hasMarkers || !this.xf()) { return Rect.empty; } return this.ace.e$b(this, this.yt.n, a, runOn(this, this.acm)); }; VerticalAnchoredCategorySeries.prototype.acm = function (a) { return this.aau.de(a); }; VerticalAnchoredCategorySeries.prototype.gv = function (a, b) { if (this.gu(a, b)) { return true; } if (this.xg(a, b)) { return true; } return false; }; VerticalAnchoredCategorySeries.prototype.i4 = function (a, b, c) { if (this.db == null) { return NaN; } var d = this.getEffectiveViewport1(this.cv); var e = this.yr(); var f = new ScalerParams(0, this.db.v4, this.cv.bx, e.ch, d); var g = this.yy.r(e, this.db.v4, this.cv.bx, d); return this.i6(this.valueColumn, a, e, f, g, runOn(this, this.zs), b, c); }; VerticalAnchoredCategorySeries.prototype.wb = function (a, b, c) { var d = this.yr(); return this.wd(a, b, c, this.yy.r(d, this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.y8(), d, null, null, null); }; VerticalAnchoredCategorySeries.prototype.fetchXAxis = function () { return this.xAxis; }; VerticalAnchoredCategorySeries.prototype.fetchYAxis = function () { return this.yAxis; }; VerticalAnchoredCategorySeries.prototype.abq = function (a) { this.xAxis = typeCast(NumericXAxis.$, a); }; VerticalAnchoredCategorySeries.prototype.abr = function (a) { this.yAxis = typeCast(CategoryYAxis.$, a); }; VerticalAnchoredCategorySeries.prototype.zo = function () { return this.xAxis != null && this.xAxis.c1(); }; VerticalAnchoredCategorySeries.prototype.yl = function (a, b) { return this.aar(a, b, this.yAxis); }; VerticalAnchoredCategorySeries.prototype.iq = function (a) { return this.ace.e$a(this, a); }; VerticalAnchoredCategorySeries.prototype.zs = function (a) { return this.is(a, this.yr()); }; VerticalAnchoredCategorySeries.prototype.j2 = function (a) { return truncate(Math.round(this.iq(a))); }; VerticalAnchoredCategorySeries.prototype.km = function (a) { var b = this.j2(a); return b >= 0 && this.dn != null && b < this.dn.count ? this.dn.item(b) : null; }; VerticalAnchoredCategorySeries.prototype.q8 = function (a, b, c, d) { _super.prototype.q8.call(this, a, b, c, d); switch (b) { case VerticalAnchoredCategorySeries.$$p[0]: if (c != d) { this.pb(typeCast(Axis.$, c)); this.rg(typeCast(Axis.$, d)); this.y2.cw.g(this.ic); if (this.db != null) { this.db.n2(); } this.rq(false); this.qk(); } break; case VerticalAnchoredCategorySeries.$$p[1]: if (c != d) { this.pb(typeCast(Axis.$, c)); this.rg(typeCast(Axis.$, d)); this.y2.cw.g(this.ic); this.zo(); this.rq(false); this.qk(); } break; case "TrendLineType": var e = EnumUtil.getEnumValue(TrendLineType_$type, d); if (e != 0) { this.aau.c7 = CategoryTrendLineManagerFactory.a(this.aau.c7, this.yAxis, this.su, this, this.dr); } break; } }; VerticalAnchoredCategorySeries.prototype.ach = function (a) { if (typeCast(CategoryYAxis.$, a) !== null) { return true; } return false; }; VerticalAnchoredCategorySeries.prototype.acg = function (a) { if (typeCast(NumericXAxis.$, a) !== null) { return true; } return false; }; Object.defineProperty(VerticalAnchoredCategorySeries.prototype, "useHighMarkerFidelity", { get: function () { return this.zp; }, enumerable: false, configurable: true }); VerticalAnchoredCategorySeries.$t = markType(VerticalAnchoredCategorySeries, 'VerticalAnchoredCategorySeries', AnchoredCategorySeries.$); VerticalAnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, VerticalAnchoredCategorySeries, 'raisePropertyChanged', ['XAxis::ack', [NumericXAxis.$, null], 'YAxis::acl', [CategoryYAxis.$, null]]); return VerticalAnchoredCategorySeries; }(AnchoredCategorySeries)); export { VerticalAnchoredCategorySeries };