UNPKG

igniteui-angular-charts

Version:

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

1,444 lines (1,443 loc) 61.1 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, __values } from "tslib"; import { Base, typeCast, markType, Array_$type, Number_$type, Point_$type, enumGetBox, runOn, delegateCombine, fromEnum, markDep } from "igniteui-angular-core"; import { IBucketizer_$type } from "./IBucketizer"; import { ArgumentNullException } from "igniteui-angular-core"; import { Rect } from "igniteui-angular-core"; import { CategoryAxisBase } from "./CategoryAxisBase"; import { ISortingAxis_$type } from "./ISortingAxis"; import { ScalerParams } from "./ScalerParams"; import { Series } from "./Series"; import { truncate, intDivide, isNaN_, isInfinity } from "igniteui-angular-core"; import { FramePreparer } from "./FramePreparer"; import { IIsCategoryBased_$type } from "./IIsCategoryBased"; import { List$1 } from "igniteui-angular-core"; import { ISupportsMarkers_$type } from "./ISupportsMarkers"; import { IProvidesViewport_$type } from "./IProvidesViewport"; import { ISupportsErrorBars_$type } from "./ISupportsErrorBars"; import { CategoryFrame } from "./CategoryFrame"; import { PreparationParams } from "./PreparationParams"; import { IDateTimeAxis_$type } from "./IDateTimeAxis"; import { NumericAxisBase } from "./NumericAxisBase"; import { IHasCategoryTrendline_$type } from "./IHasCategoryTrendline"; import { IHasSingleValueCategory_$type } from "./IHasSingleValueCategory"; import { DefaultCategoryTrendlineHost } from "./DefaultCategoryTrendlineHost"; import { DefaultSingleValueProvider } from "./DefaultSingleValueProvider"; import { SingleValuesHolder } from "./SingleValuesHolder"; import { MarkerSeries } from "./MarkerSeries"; import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference"; import { ICategorySeriesInteractionManager_$type } from "./ICategorySeriesInteractionManager"; import { DVContainer } from "igniteui-angular-core"; import { DependencyProperty } from "igniteui-angular-core"; import { CategoryCollisionMode_$type } from "./CategoryCollisionMode"; import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode"; import { HighlightingInfo } from "igniteui-angular-core"; import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer"; import { SeriesPointOfInterest } from "./SeriesPointOfInterest"; import { Marker } from "./Marker"; import { MarkerSeriesView } from "./MarkerSeriesView"; import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager"; import { Pool$1 } from "igniteui-angular-core"; import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay"; import { DoubleCollection } from "igniteui-angular-core"; import { Clipper } from "igniteui-angular-core"; import { ChartSelection } from "./ChartSelection"; import { PropertyMetadata } from "igniteui-angular-core"; import { round10N } from "igniteui-angular-core"; /** * @hidden */ var CategoryBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(CategoryBucketCalculator, _super); function CategoryBucketCalculator(a) { var _this = _super.call(this) || this; _this.c = null; _this.e = 0; _this.f = 0; _this.d = 0; if (a == null) { throw new ArgumentNullException(0, "view"); } _this.c = a; _this.e = -1; _this.d = 0; return _this; } CategoryBucketCalculator.prototype.getBucket = function (a) { return null; }; CategoryBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) { return this.getBucket(a); }; CategoryBucketCalculator.prototype.getErrorBucket = function (a, b) { return NaN; }; CategoryBucketCalculator.prototype.g = function (a) { var b = this.c.by; var c = this.c.bx; var d = this.c.cy; var e = typeCast(CategoryAxisBase.$, d.fetchXAxis()); var f = d.dn; if (b.isEmpty || c.isEmpty || e == null || f == null || f.count == 0) { this.d = 0; return; } var g = d.getEffectiveViewport1(this.c); var h = d.wi(this.c); var i = typeCast(ISortingAxis_$type, e); if (i == null || i.i$b == null) { var j = new ScalerParams(0, b, c, e.ch, g); var k = Math.floor(e.eo(h.left, j)); var l = Math.ceil(e.eo(h.right, j)); if (e.ch) { l = Math.ceil(e.eo(h.left, j)); k = Math.floor(e.eo(h.right, j)); } l = Math.min(l, e.lk - 1); var m = Math.floor((l - k + 1) * a / h.width); this.d = truncate(Math.max(1, m)); this.e = truncate(Math.max(0, Math.floor(k / this.d) - 1)); this.f = truncate(Math.ceil(l / this.d)); } else { this.e = i.i$e(b, c, g, h); this.f = i.i$g(b, c, g, h); this.d = 1; } }; CategoryBucketCalculator.prototype.getBucketInfo = function (a, b, c, d) { a = this.e; b = this.f; c = this.d; d = this.c.cy.ic; return { p0: a, p1: b, p2: c, p3: d }; }; CategoryBucketCalculator.prototype.cacheValues = function () { }; CategoryBucketCalculator.prototype.unCacheValues = function () { }; CategoryBucketCalculator.$t = markType(CategoryBucketCalculator, 'CategoryBucketCalculator', Base.$, [IBucketizer_$type]); return CategoryBucketCalculator; }(Base)); export { CategoryBucketCalculator }; /** * @hidden */ var CategoryFramePreparerBase = /** @class */ /*@__PURE__*/ (function (_super) { __extends(CategoryFramePreparerBase, _super); function CategoryFramePreparerBase(a) { var _rest = []; for (var _i = 1; _i < arguments.length; _i++) { _rest[_i - 1] = arguments[_i]; } var _this = this; a = (a == void 0) ? 0 : a; switch (a) { case 0: { var c = _rest[0]; var d = [c, typeCast(ISupportsMarkers_$type, c), typeCast(IProvidesViewport_$type, c), typeCast(ISupportsErrorBars_$type, c), typeCast(IBucketizer_$type, c)]; { var f = d[0]; var g = d[1]; var h = d[2]; var i = d[3]; var j = d[4]; _this = _super.call(this, 1, g, h, i) || this; _this.g = null; _this.h = null; _this.m = false; _this.o = new List$1(Array_$type, 0); _this.p = new List$1(Number_$type, 0); _this.n = new List$1(Number_$type, 0); _this.h = f; _this.g = j; } } break; case 1: { var c = _rest[0]; var d = _rest[1]; var e = _rest[2]; var f = _rest[3]; var g = _rest[4]; _this = _super.call(this, 1, d, e, f) || this; _this.g = null; _this.h = null; _this.m = false; _this.o = new List$1(Array_$type, 0); _this.p = new List$1(Number_$type, 0); _this.n = new List$1(Number_$type, 0); _this.h = c; _this.g = g; } break; } return _this; } CategoryFramePreparerBase.prototype.i = function (a) { var b = new PreparationParams(); b.f = this.h.useHighMarkerFidelity; b.b = this.h.scaler; b.c = this.h.yScaler; b.d = typeCast(ISortingAxis_$type, b.b); b.a = typeCast(CategoryFrame.$, a); if (b.a == null || b.b == null || b.c == null) { return null; } var c; var d; var e; var f; var g = this.g.getBucketInfo(c, d, e, f); c = g.p0; d = g.p1; e = g.p2; f = g.p3; b.k = c; b.l = d; b.j = e; b.i = f; if (b.l < b.k) { return null; } var h; var i; var j; var k = this.a.getViewInfo(i, h); i = k.p0; h = k.p1; j = this.a.getEffectiveViewport(); var l = this.a.getMainContentViewport(); b.p = h; b.o = i; b.n = j; b.m = l; if (Rect.l_op_Equality(b.p, Rect.empty) || Rect.l_op_Equality(b.o, Rect.empty)) { return null; } if (this.h != null && (typeCast(Series.$, this.h) !== null && this.h.isFragment) && this.g != null) { b.e = true; } return b; }; CategoryFramePreparerBase.prototype.r = function (a, b, c, d) { return a.getSeriesOffset(b, c, d, this.h.currentMode2Index, this.h.currentCategoryMode); }; CategoryFramePreparerBase.prototype.s = function (a) { return this.r(a.b, a.p, a.o, a.n); }; CategoryFramePreparerBase.prototype.d = function (a, b) { var c = this.i(a); if (c == null || this.g == null) { return; } c.a.f.clear(); c.a.k.clear(); c.a.n.clear(); c.a.q.clear(); c.a.i.clear(); c.a.h.clear(); c.a.g.clear(); if (c.a.m != null) { c.a.m.clear(); } var d = this.c.shouldDisplayMarkers; var e = false; var f = this.s(c); var g = this.j(c); if (c.d != null && c.d.i$b != null && c.d.i$b.count != g.e) { return; } if (c.d != null && c.d.i$a) { c.d.i$h(); } this.g.cacheValues(); if (this.m && c.d != null && c.d.i$b.count > 0) { var h = c.d.i$b._inner[c.k]; this.z(g, h, true, c.e); while ((isNaN_(g.c) || isNaN_(g.d)) && c.k > 0) { c.k = c.k - 1; h = c.d.i$b._inner[c.k]; this.z(g, h, true, c.e); } var i = c.d.i$b._inner[c.l]; this.z(g, i, true, c.e); while ((isNaN_(g.c) || isNaN_(g.d)) && c.l < g.e - 1) { c.l = c.l + 1; i = c.d.i$b._inner[c.l]; this.z(g, i, true, c.e); } } if (this.m && c.d == null) { var j = c.k; var k = this.g.getBucket(j); while ((isNaN_(k[1]) || isNaN_(k[2])) && c.k > 0) { c.k = c.k - 1; j = c.k; k = this.g.getBucket(j); } var l = c.l; k = this.g.getBucket(l); while ((isNaN_(k[1]) || isNaN_(k[2])) && c.l < (intDivide(g.e, c.j))) { c.l = c.l + 1; l = c.l; k = this.g.getBucket(l); } } this.w(c, g, f); var m = this.t(c, g, f, d, e); this.c.updateMarkerCount(m); this.v(typeCast(CategoryFrame.$, a), b); this.g.unCacheValues(); return; }; CategoryFramePreparerBase.prototype.v = function (a, b) { }; Object.defineProperty(CategoryFramePreparerBase.prototype, "q", { get: function () { return this.o; }, enumerable: false, configurable: true }); CategoryFramePreparerBase.prototype.t = function (a, b, c, d, e) { var _this = this; var f = 0; var g = false; var h = null; var i = false; var j = a.d != null; var k = a.p; var l = a.o; var m = typeCast(NumericAxisBase.$, a.c) !== null && a.c.lp; var n = a.f; var o = this.h.mayContainUnknowns; var p = this.o; var q = this.n; var r = this.p; p.clear(); q.clear(); r.clear(); var s = this.g; var t = this.h.provideCollisionDetector(); var u = 0; var v = a.n; var w = new ScalerParams(0, k, l, a.b.j$b, v); var x = ((function () { var $ret = new ScalerParams(0, k, l, a.c.j$b, v); $ret.b = typeCast(Series.$, _this.h) !== null ? _this.h.ix() : NaN; return $ret; })()); if (j) { u = a.b.j$d(2, w) - a.b.j$d(1, w); i = this.k(); } var y = a.k; var z = a.l; var aa = a.a.f; var ab = typeCast(IDateTimeAxis_$type, a.b); if (ab != null) { ab.StartTimeCursor(); } var _loop_1 = function (ac) { var ad = void 0; if (!j) { if (!o) { ad = s.getBucketWithoutUnknowns(ac); } else { ad = s.getBucket(ac); } } else { ad = ((function () { var ae = _this.f(a, ac, b, u, g, h, c); ac = ae.p1; g = ae.p4; h = ae.p5; return ae.ret; })()); } var ae = !m || (m && ad[1] > 0); var af = ad[0]; if (!j || !isNaN_(ad[0])) { aa.add(ad); if (j) { if (a.a.m == null) { a.a.m = new List$1(Number_$type, 0); } a.a.m.add(ac * a.j); } if (g && i) { if (h != null) { aa.add(h); if (j) { if (a.a.m == null) { a.a.m = new List$1(Number_$type, 0); } a.a.m.add(ac * a.j); } } } if (d && ae) { var ag = ac * a.j; var ah = ag; if (j && a.d.i$b != null && ag >= 0 && ag < a.d.i$b.count) { ag = a.d.i$b._inner[ag]; } var ai = new Array(ad.length); ai[0] = ad[0]; ai[1] = ad[1]; ai[2] = ad[2]; if (n && ag < b.e) { ai = new Array(ad.length); ai[0] = af; this_1.z(b, ag, true, a.e); ai[1] = b.c; ai[2] = b.d; } p.add(ai); q.add(a.a.f.count - 1); r.add(ag); } } out_ac_1 = ac; }; var this_1 = this, out_ac_1; for (var ac = y; ac <= z; ++ac) { _loop_1(ac); ac = out_ac_1; } if (ab != null) { ab.ResetTimeCursor(); } this.y(a, c, j, w, x, e, d); if (d) { var aj = p.count; var ak = void 0; for (var al = 0; al < aj; al++) { ak = p._inner[al]; if (this.l(a.a, ak, t, Math.min(r._inner[al], b.e - 1), f, q._inner[al])) { ++f; } } } return f; }; CategoryFramePreparerBase.prototype.k = function () { if (typeCast(Series.$, this.h) !== null) { return this.h.ev; } return false; }; CategoryFramePreparerBase.prototype.f = function (a, b, c, d, e, f, g) { var h; f = null; e = false; var i = typeCast(CategorySeries.$, this.h); var j = a.o; var k = a.p; var l = a.n; var m = new ScalerParams(0, k, j, a.b.j$b, l); var n = new ScalerParams(0, k, j, a.c.j$b, l); var o = a.e; if (a.d == null || a.d.i$b == null || a.d.i$b.count == 0) { return { ret: [NaN, NaN, NaN], p1: b, p4: e, p5: f }; } if (i != null && i.dn != null && i.dn.count < a.d.i$b.count) { return { ret: [NaN, NaN, NaN], p1: b, p4: e, p5: f }; } var p = a.d.i$b._inner[b]; var q = a.d.i$d(p); var r = q; this.z(c, p, false, o); while (b < a.l) { p = a.d.i$b._inner[b + 1]; r = a.d.i$d(p); this.z(c, p, true, o); if (r - q >= d || isNaN_(c.c) || isNaN_(c.d)) { if (e) { var s = a.d.i$b._inner[b]; this.z(c, s, true, o); f = [a.b.j$c(q, m), c.c, c.d]; } break; } if (!e && this.k()) { var t = a.d.i$b._inner[b]; this.z(c, t, true, o); var u = [a.b.j$c(q, m), c.c, c.d]; if (!isNaN_(u[0])) { if (!isNaN_(u[1]) && !isNaN_(u[2])) { if (a.d != null) { u[0] = u[0] + g; } a.a.f.add(u); if (a.d != null) { if (a.a.m == null) { a.a.m = new List$1(Number_$type, 0); } a.a.m.add(b); } e = true; } else { break; } } } b++; this.u(c, p, o); } var v = NaN; if (!isNaN_(q)) { v = a.b.j$c(q, m); } h = this.e(v, c); return { ret: h, p1: b, p4: e, p5: f }; }; CategoryFramePreparerBase.prototype.y = function (a, b, c, d, e, f, g) { var h = a.j; var i = a.a.f.count; var j = a.a.f; var k = this.o; var l = k.count; if (f) { var m = a.c.j$c(a.c.me, e); a.c.j$f(a.a.k, 0, a.a.k.count, e); var n = a.a.k; var o = n.count; for (var p = 0; p < n.count; p++) { n._inner[p] = Math.abs(n._inner[p] - m); } } }; CategoryFramePreparerBase.prototype.w = function (a, b, c) { }; CategoryFramePreparerBase.$t = markType(CategoryFramePreparerBase, 'CategoryFramePreparerBase', FramePreparer.$); return CategoryFramePreparerBase; }(FramePreparer)); export { CategoryFramePreparerBase }; /** * @hidden */ var CategoryFramePreparer = /** @class */ /*@__PURE__*/ (function (_super) { __extends(CategoryFramePreparer, _super); function CategoryFramePreparer(a) { var _rest = []; for (var _i = 1; _i < arguments.length; _i++) { _rest[_i - 1] = arguments[_i]; } var _this = this; a = (a == void 0) ? 0 : a; switch (a) { case 0: { var c = _rest[0]; var d = [c, typeCast(ISupportsMarkers_$type, c), typeCast(IProvidesViewport_$type, c), typeCast(ISupportsErrorBars_$type, c), typeCast(IBucketizer_$type, c)]; { var f = d[0]; var g = d[1]; var h = d[2]; var i = d[3]; var j = d[4]; _this = _super.call(this, 1, f, g, h, i, j) || this; _this.aa = new DefaultCategoryTrendlineHost(); _this.ab = new DefaultSingleValueProvider(); _this.ac = null; _this.ad = null; _this.ac = _this.aa; if (typeCast(IHasCategoryTrendline_$type, f) !== null) { _this.ac = typeCast(IHasCategoryTrendline_$type, f); } _this.ad = _this.ab; if (typeCast(IHasSingleValueCategory_$type, f) !== null) { _this.ad = typeCast(IHasSingleValueCategory_$type, f); } } } break; case 1: { var c = _rest[0]; var d = _rest[1]; var e = _rest[2]; var f = _rest[3]; var g = _rest[4]; _this = _super.call(this, 1, c, d, e, f, g) || this; _this.aa = new DefaultCategoryTrendlineHost(); _this.ab = new DefaultSingleValueProvider(); _this.ac = null; _this.ad = null; _this.ac = _this.aa; if (typeCast(IHasCategoryTrendline_$type, c) !== null) { _this.ac = typeCast(IHasCategoryTrendline_$type, c); } _this.ad = _this.ab; if (typeCast(IHasSingleValueCategory_$type, c) !== null) { _this.ad = typeCast(IHasSingleValueCategory_$type, c); } } break; } return _this; } CategoryFramePreparer.prototype.l = function (a, b, c, d, e, f) { var g = b[0]; var h = b[1]; var i = new Rect(0, g - 5, h - 5, 11, 11); if (!isNaN_(g) && !isNaN_(h) && !isInfinity(g) && !isInfinity(h) && c.tryAdd(i)) { a.n.add({ $type: Point_$type, x: g, y: h }); this.c.updateMarkerTemplate(e, d, f); return true; } return false; }; CategoryFramePreparer.prototype.j = function (a) { var b = new SingleValuesHolder(); var c = this.ad.valueColumn; b.f = c; return b; }; CategoryFramePreparer.prototype.x = function (a, b, c, d, e, f) { if (d) { b[0] = b[0] + c; } else { b[0] = a.b.j$c(b[0], e) + c; } b[1] = a.c.j$c(b[1], f); if (a.j > 1 || d) { b[2] = a.c.j$c(b[2], f); } else { b[2] = b[1]; } }; CategoryFramePreparer.prototype.y = function (a, b, c, d, e, f, g) { _super.prototype.y.call(this, a, b, c, d, e, f, g); var h = a.j; var i = a.a.f.count; var j = a.a.f; var k = this.q; var l = k.count; var m = new List$1(Number_$type, 0); if (!c) { m.add(0); } var n = new List$1(Number_$type, 0); n.add(1); if (c || h > 1) { n.add(2); } a.b.j$e(j, m, 0, i, d); a.c.j$e(j, n, 0, i, e); for (var o = 0; o < i; o++) { j._inner[o][0] = j._inner[o][0] + b; } if (h == 1 && !c) { for (var p = 0; p < i; p++) { j._inner[p][2] = j._inner[p][1]; } } if (g) { a.b.j$e(k, m, 0, l, d); a.c.j$e(k, n, 0, l, e); for (var q = 0; q < l; q++) { k._inner[q][0] = k._inner[q][0] + b; } if (h == 1 && !c) { for (var r = 0; r < l; r++) { k._inner[r][2] = k._inner[r][1]; } } } }; CategoryFramePreparer.prototype.w = function (a, b, c) { if (this.ac.trendLineType == 0 || this.ac.trendlinePreparer == null || this.ac.trendLinePeriod < 1) { return; } this.ac.trendlinePreparer.prepareLine(this.ac, a, b, c); }; CategoryFramePreparer.prototype.z = function (a, b, c, d) { var e = a; var f = e.f; var g = f.item(b); var h = g; if (d) { var i = this.g.getBucket(b); g = i[1]; h = i[1]; } if (c) { e.c = g; e.d = h; } else { e.a = g; e.b = h; } }; CategoryFramePreparer.prototype.u = function (a, b, c) { var d = a; var e = d.f; if (b < e.count) { var f = void 0; if (c) { var g = this.g.getBucket(b); f = g[1]; } else { f = e.item(b); } d.a = Math.min(d.a, f); d.b = Math.max(d.b, f); } }; CategoryFramePreparer.prototype.e = function (a, b) { var c = b; return [a, c.a, c.b]; }; CategoryFramePreparer.$t = markType(CategoryFramePreparer, 'CategoryFramePreparer', CategoryFramePreparerBase.$); return CategoryFramePreparer; }(CategoryFramePreparerBase)); export { CategoryFramePreparer }; /** * @hidden */ var CategorySeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(CategorySeries, _super); function CategorySeries() { var _this = _super.call(this) || this; _this.yy = null; _this.y6 = null; _this.zf = false; _this.ze = false; _this.assigningCategoryStyle = null; _this.assigningCategoryMarkerStyle = null; _this.zc = null; _this.zd = null; _this.yv = new CategoryFrame(3); _this.yx = new CategoryFrame(3); _this.yt = new CategoryFrame(3); _this.yw = new CategoryFrame(3); _this.y1 = null; _this.y5 = null; _this.y1 = new CategorySeriesRenderManager(); _this.y5 = new CategoryTransitionSourceFramePreparer(); _this.zf = false; _this.d2 = false; _this.ze = false; _this.ab = CategorySeries.$; return _this; } CategorySeries.prototype.cs = function () { var a = new CategorySeriesView(this); return a; }; Object.defineProperty(CategorySeries.prototype, "y7", { get: function () { var _this = this; if (this.y6 == null) { this.y6 = DVContainer.instance.createInstance(ICategorySeriesInteractionManager_$type, function () { return _this.dr.n; }); } return this.y6; }, enumerable: false, configurable: true }); CategorySeries.prototype.eb = function (a, b, c, d, e) { var _this = this; if (!this.hasMarkers) { return false; } var f = this.getEffectiveViewport1(this.cv); var g = this.yr(); var h = new ScalerParams(1, this.db.v4, this.wr, g.ch); h.c = f; var i = this.y8(); var j = new ScalerParams(1, this.db.v4, this.wr, i.ch); j.c = f; var k = this.db.v4; var l = this.wr; var m = this.currentMode2Index; var n = 0; if (g.ce && g.cc) { n = g.getSeriesOffset(k, l, f, m, g.categoryMode); } a.clear(); this.w5.cj(function (o) { if (o._visibility == 0) { var p = new SeriesPointOfInterest(); var q = o.n; var r = o.o; if (q < _this.wr.left || q > _this.wr.right || r < _this.wr.top || r > _this.wr.bottom) { return; } if (_this.isVertical) { if (g.cb && !g.ce && g.categoryMode != 0) { p.e = o.ak; } else { p.e = g.eo(r, h); } p.d = i.eo(q, j); } else { if (g.cb && !g.ce && g.categoryMode != 0) { p.d = o.ak; } else { p.d = g.eo(q, h); } p.e = i.eo(r, j); } p.b = o.content; if (b) { if (_this.isVertical) { if (c) { p.f = _this.zy(p.d, d); } else { var s = _this.jc(o); if (!isNaN_(s)) { p.f = _this.zy(s, d); } else { p.f = _this.zy(p.d, d); } } } else { if (c) { p.f = _this.zy(p.e, d); } else { var t = _this.jc(o); if (!isNaN_(t)) { p.f = _this.zy(t, d); } else { p.f = _this.zy(p.e, d); } } } } else { var u = _this.au(true); if (u != null) { var v = _this.kr(o.ak, false); if (v != null) { p.f = u.i(v); } else { p.f = null; } } else { p.f = g.gf(o.ak); } } p.c = o.ak; p.g = _this.vf; if (_this.g8) { p.g = _this.vm(o.ak); } a.add(p); } }); return true; }; CategorySeries.prototype.zy = function (a, b) { var c; if (b >= 0) { c = round10N(a, b); } else { c = a; } var d = this.au(false); if (d != null) { var e = d; return e.i(c); } else { return c.toString(); } }; CategorySeries.prototype.q0 = function (a) { _super.prototype.q0.call(this, a); this.y2 = a; }; CategorySeries.prototype.preferredCategoryMode = function (a) { return 0; }; Object.defineProperty(CategorySeries.prototype, "categoryAxis", { get: function () { return this.yr(); }, enumerable: false, configurable: true }); CategorySeries.prototype.yr = function () { return this.fetchXAxis(); }; CategorySeries.prototype.y8 = function () { return this.fetchYAxis(); }; CategorySeries.prototype.get_ek = function () { return true; }; CategorySeries.prototype.get_f4 = function () { return this.y8() != null && this.y8().ch; }; CategorySeries.prototype.get_ey = function () { return true; }; CategorySeries.prototype.ac = function () { _super.prototype.ac.call(this); this.y2.cw.g(this.ic); }; CategorySeries.prototype.zl = function () { return (this.assigningCategoryStyle != null && this.zf) || (this.bx != 1) || this.d2 || (this.cp != 1) || (this.co != 1); }; CategorySeries.prototype.zm = function () { return (this.assigningCategoryMarkerStyle != null && this.ze) || (this.bx != 1) || this.d2 || (this.cp != 1) || (this.co != 1); }; CategorySeries.prototype.aai = function (a) { if (this.assigningCategoryStyle != null && this.zf) { this.assigningCategoryStyle(this, a); } }; CategorySeries.prototype.aah = function (a) { if (this.assigningCategoryMarkerStyle != null && this.ze) { this.assigningCategoryMarkerStyle(this, a); } }; CategorySeries.prototype.yl = function (a, b) { return null; }; CategorySeries.prototype.o4 = function (a, b) { _super.prototype.o4.call(this, a, b); if (a) { this.z7(b); } }; CategorySeries.prototype.br = function () { var a = _super.prototype.br.call(this); return a; }; CategorySeries.prototype.qa = function () { _super.prototype.qa.call(this); var a = this.fetchXAxis(); if (a != null) { a.ib(false); } var b = this.fetchYAxis(); if (b != null) { b.ib(false); } }; CategorySeries.prototype.sq = function (a, b) { _super.prototype.sq.call(this, a, b); this.y2.cw.g(this.ic); this.rq(false); }; CategorySeries.prototype.sp = function (a, b) { if (this.g0 && this.jp < 0.05 && (this.db == null || !this.db.fn())) { this.g1 = true; this.g4 = false; this.gj = false; } _super.prototype.sp.call(this, a, b); this.y2.cw.g(this.ic); this.rq(false); }; CategorySeries.prototype.q8 = function (a, b, c, d) { _super.prototype.q8.call(this, a, b, c, d); switch (b) { case "SeriesViewer": var e = this.fetchYAxis(); var f = this.fetchXAxis(); if (c != null && d == null) { this.pb(f); this.pb(e); } if (c == null && d != null) { this.rg(f); this.rg(e); } this.y2.cw.g(this.ic); this.rq(false); break; case "SyncLink": if (this.c3 != null && this.db != null) { this.y2.cw.g(this.ic); } this.rq(false); break; case "TransitionProgress": this.yx.c(this.jp, this.yv, this.yt); if (this.d5(this.cv)) { return; } if (this.jp == 1) { this.yt.w(); this.aaj(this.yt, this.y2); if (this.g0) { this.g0 = false; this.o5(); this.dc.r = truncate(this.i8()); this.dc.b = this.dd; } if (this.g3) { this.g3 = false; this.o5(); this.dc.r = truncate(this.i8()); this.dc.b = this.dd; this.qz(); } this.qn(); } else { this.aaj(this.yx, this.y2); } if (this.db != null) { this.db.qo(this); } break; case "ErrorBarSettings": this.qk(); break; case CategorySeries.$$p[5]: this.rq(false); break; case CategorySeries.$$p[2]: this.zf = this.zh(); this.rq(false); break; case CategorySeries.$$p[1]: this.ze = this.zg(); this.rq(false); break; } }; CategorySeries.prototype.zh = function () { return this.zj; }; CategorySeries.prototype.zg = function () { return this.zi; }; CategorySeries.prototype.zs = function (a) { return this.is(a, this.fetchXAxis()); }; CategorySeries.prototype.get_fr = function () { return typeCast(ISortingAxis_$type, this.yr()) !== null; }; CategorySeries.prototype.a0 = function () { return this.yr(); }; CategorySeries.prototype.j4 = function (a) { return this.y7.b$d(this, a); }; CategorySeries.prototype.km = function (a) { return this.y7.b$f(this, a); }; CategorySeries.prototype.j2 = function (a) { var b = truncate(Math.round(this.iq(a))); return b; }; CategorySeries.prototype.iq = function (a) { return this.y7.b$c(this, a); }; CategorySeries.prototype.dh = function (a, b, c) { if (this.fy(this.bx) && !c) { var d = this.zb(a, b, this.zd); this.zd = d; return d; } else { var e = this.y9(a, b, this.zd); e.d = true; this.zd = e; return e; } }; CategorySeries.prototype.get_fd = function () { return true; }; CategorySeries.prototype.o2 = function () { _super.prototype.o2.call(this); this.zc = null; this.zd = null; }; CategorySeries.prototype.dg = function (a, b, c) { if (this.ed && this.fy(this.bx) && !c) { var d = this.za(a, b, this.zc); this.zc = d; return d; } else { var e = this.y9(a, b, this.zc); this.zc = e; return e; } }; CategorySeries.prototype.zr = function () { return this.y2.cz.a; }; CategorySeries.prototype.zb = function (a, b, c) { if (!this.xf()) { return null; } var d = this.yu(); var e = this.zr(); return this.y7.b$b(this, e, this.zv(this.cv), this.zu(this.cv), d.f, a, b, c); }; CategorySeries.prototype.za = function (a, b, c) { var d = this.zv(this.cv); var e = this.zw(this.cv); var f = this.zu(this.cv); var g = this.yu(); return this.y7.b$a(this, g.f, g.m, d, e, f, a, b, c); }; CategorySeries.prototype.y9 = function (a, b, c) { var d = new HighlightingInfo(); d.i = this; d.g = 0; d.f = this.dn != null ? this.dn.count - 1 : 0; d.c = true; if (c != null && c.g == d.g && c.f == d.f) { return c; } return d; }; CategorySeries.prototype.yu = function () { var a = this.yt; if (this.d3()) { if (this.dc.g) { this.dc.t(); } a = this.yx; } return a; }; CategorySeries.prototype.aae = function (a, b, c, d, e, f, g) { var h = this.bx != 1; var i = this.d2; var j = this.cp != 1; var k = this.co != 1; this.y1.a3(this.y1.d, d.cn, a, b, c, d, e, f, true, g); this.y1.aa(this.ia); var l = this.y1.ax; var m = null; var n = this.dn; var o = null; var p = null; var q = null; var r = null; var s = null; if (i && this.db != null && !l.e) { var t = this.vn(l.z); var u = this.vo(l.z); this.y1.ae = t; this.y1.af = u; l.aa = t; l.ab = u; } if (h && this.db != null) { m = this.db.dl.getHighlightingInfo(this, n, l.z, l.y, true); if (this.db.dl.isCrossContextHighlight(this)) { o = this.db.dl.getHighlightingInfo(this, n, l.z, l.y, true); } l.c = m; } if (j && this.db != null) { p = this.db.dm.getHighlightingInfo(this, n, l.z, l.y, true); if (p == null && this.bn != null) { p = this.db.dm.getHighlightingInfo(this.bn, this.bn.dn, l.z, l.y, true); } if (this.db.dm.isCrossContextHighlight(this)) { r = this.db.dm.getHighlightingInfo(this, n, l.z, l.y, true); } l.d = p; } if (k && this.db != null) { q = this.db.dk.getHighlightingInfo(this, n, l.z, l.y, true); if (this.db.dk.isCrossContextHighlight(this)) { s = this.db.dk.getHighlightingInfo(this, n, l.z, l.y, true); } l.b = q; } l.h = f; this.aah(l); this.y1.y(this, m, p, q, f, h, j, k, l.v, this.db.dl.totalHighWaterMark, l.x, this.db.dm.totalHighWaterMark, l.t, this.db.dk.totalHighWaterMark); }; CategorySeries.prototype.aaf = function (a, b, c, d, e, f, g) { var h = this.bx != 1; var i = this.cp != 1; var j = this.co != 1; var k = this.d2; this.y1.a3(this.y1.b, d.cn, a, b, c, d, e, f, false, g); this.y1.ab(this.ia); var l = this.y1.ay; var m = null; var n = null; var o = null; var p = this.dn; if (k && this.db != null && !l.e) { var q = this.vm(l.z); var r = this.vp(l.z); this.y1.ag = q; this.y1.ah = r; l.aa = q; l.ab = r; } if (h && this.db != null) { m = this.db.dl.getHighlightingInfo(this, p, l.z, l.y, false); l.c = m; } if (i && this.db != null) { n = this.db.dm.getHighlightingInfo(this, p, l.z, l.y, false); if (n == null && this.bn != null) { n = this.db.dm.getHighlightingInfo(this.bn, this.bn.dn, l.z, l.y, false); } l.d = n; } if (j && this.db != null) { o = this.db.dk.getHighlightingInfo(this, p, l.z, l.y, false); if (o == null && this.bn != null) { o = this.db.dk.getHighlightingInfo(this.bn, this.bn.dn, l.z, l.y, false); } l.b = o; } l.h = f; this.aai(l); this.y1.z(this, m, n, o, f, h, i, j, b < 0); }; CategorySeries.prototype.hd = function (a, b, c) { var d = _super.prototype.hd.call(this, a, b, c); d = d && this.zq(this.fetchXAxis()); d = d && this.zq(this.fetchYAxis()); var e = c; if (!c.o() || b.isEmpty || a.isEmpty || this.dn == null) { d = false; } if (!d) { e.cw.d = 0; } return d; }; CategorySeries.prototype.zq = function (a) { if (a == null || a.bi == null) { return false; } var b = typeCast(CategoryAxisBase.$, a); if (b != null) { if (b.itemsSource == null) { return false; } if (b.lj < 1) { return false; } } else { var c = typeCast(NumericAxisBase.$, a); if (c != null) { return c.l4 != c.l3; } } return true; }; CategorySeries.prototype.gm = function () { return this.zk; }; CategorySeries.prototype.gn = function () { return true; }; CategorySeries.prototype.y3 = function () { return 12; }; CategorySeries.prototype.o5 = function () { _super.prototype.o5.call(this); this.yv.w(); this.yt.w(); this.yx.w(); }; CategorySeries.prototype.rr = function (a) { _super.prototype.rr.call(this, a); this.y2.cw.g(this.ic); if (this.d5(this.cv)) { this.yt.z(); this.yx.z(); this.yv.z(); return; } if (this.gq) { if (this.d3()) { if (this.dc.g) { this.dc.t(); } this.aaj(this.yx, this.y2); } else { this.aaj(this.yt, this.y2); } return; } if (this.ge(a)) { var b = this.yv; if (this.d3()) { if (this.dc.g) { this.dc.t(); } this.yv = this.yx; this.yx = b; } else { this.yv = this.yt; this.yt = b; } var c = false; this.aag(this.yt, this.y2); if (this.g2) { this.dc.w(); this.dc.r = truncate(this.i9()); this.dc.b = this.de != null ? this.de : this.dd; if (this.g3) { var d = this.yx; this.yx = this.yv; this.yv = d; c = true; } this.y5.s(this, this.yv, this.yt, this.isVertical, this.fetchXAxis(), this.fetchYAxis(), this.y4, this.y3(), this.c5, this.c4(), runOn(this, this.zt), this.y2.bx); if (this.g3) { var e = this.yx; this.yx = this.yv; this.yv = e; } this.g3 = false; } if (this.g5) { this.dc.w(); this.dc.r = truncate(this.ja()); this.dc.b = this.df != null ? this.df : this.dd; if (this.g0) { var f = this.yx; this.yx = this.yv; this.yv = f; c = true; } this.y5.s(this, this.yv, this.yt, this.isVertical, this.fetchXAxis(), this.fetchYAxis(), this.y4, this.y3(), this.c5, this.c4(), runOn(this, this.zt), this.y2.bx); var g = this.yt; this.yt = this.yv; this.yv = g; if (this.g0) { var h = this.yx; this.yx = this.yv; this.yv = h; } this.g0 = false; } this.d9 = false; if (!c) { this.o0(); } this.r6(); if (this.g2) { this.g1 = false; this.g0 = true; } if (this.g5) { this.g4 = false; this.g3 = true; } } else { this.aag(this.yt, this.y2); this.aaj(this.yt, this.y2); } }; CategorySeries.prototype.c4 = function () { return 3; }; CategorySeries.prototype.c7 = function () { var a = this.c4(); switch (a) { case 0: return 0; case 1: return 1; case 4: return 4; case 2: return 2; case 3: return 3; } return 3; }; CategorySeries.prototype.zt = function () { if (this.isVertical) { return this.wr.left; } return this.wr.bottom; }; CategorySeries.prototype.zn = function () { return false; }; CategorySeries.prototype.hs = function () { var a = _super.prototype.hs.call(this); if (this.zn()) { var b = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "DashArray"; $ret.p = true; $ret.x = ((function () { var $ret = new DoubleCollection(); $ret.add(5); $ret.add(5); return $ret; })()); $ret.q = true; return $ret; })()); a.add(b); } if (!this.zn()) { var c = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "Brush"; $ret.p = true; $ret.y = "ActualBrush"; $ret.q = true; return $ret; })()); c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.rz)); a.add(c); } if (!this.zn()) { var d = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.r = true; $ret.ad = "Outline"; $ret.p = true; $ret.y = "ActualOutline";