UNPKG

igniteui-react-charts

Version:

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

933 lines (932 loc) 33.3 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 { CategorySeries } from "./CategorySeries"; import { IIsCategoryBased_$type } from "./IIsCategoryBased"; import { IHasSingleValueCategory_$type } from "./IHasSingleValueCategory"; import { IHasCategoryTrendline_$type } from "./IHasCategoryTrendline"; import { ITrendLineSeries_$type } from "./ITrendLineSeries"; import { IAnchoredCategorySeriesInteractionManager_$type } from "./IAnchoredCategorySeriesInteractionManager"; import { DVContainer } from "igniteui-react-core"; import { Point_$type, enumGetBox, typeCast, runOn, delegateCombine, markType, markDep } from "igniteui-react-core"; import { DependencyProperty } from "igniteui-react-core"; import { Series } from "./Series"; import { TrendLineType_$type } from "igniteui-react-core"; import { Brush } from "igniteui-react-core"; import { PenLineCap_$type } from "igniteui-react-core"; import { DoubleCollection } from "igniteui-react-core"; import { CategoryFrame } from "./CategoryFrame"; import { ICategoryScaler_$type } from "./ICategoryScaler"; import { IScaler_$type } from "./IScaler"; import { CategorySeriesView } from "./CategorySeriesView"; import { CategorySeriesMarkerCollisionAvoidance_$type } from "./CategorySeriesMarkerCollisionAvoidance"; import { ConsolidatedItemHitTestBehavior_$type } from "./ConsolidatedItemHitTestBehavior"; import { CategoryFramePreparer } from "./CategoryFramePreparer"; import { DataLegendSeriesValueInfo } from "igniteui-react-core"; import { DataLegendSeriesContext } from "igniteui-react-core"; import { List$1 } from "igniteui-react-core"; import { Rect } from "igniteui-react-core"; import { ISortingAxis_$type } from "./ISortingAxis"; import { IFastItemsSource_$type } from "igniteui-react-core"; import { NumericAxisBase } from "./NumericAxisBase"; import { CategoryBucketCalculator } from "./CategoryBucketCalculator"; import { AxisRange } from "./AxisRange"; import { NumericYAxis } from "./NumericYAxis"; import { ScalerParams } from "./ScalerParams"; import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay"; import { CategoryMarkerManager } from "./CategoryMarkerManager"; import { CollisionAvoider } from "./CollisionAvoider"; import { NonCollisionAvoider } from "./NonCollisionAvoider"; import { CategoryAxisBase } from "./CategoryAxisBase"; import { ChartSelection } from "./ChartSelection"; import { CategoryTrendLineManagerFactory } from "./CategoryTrendLineManagerFactory"; import { PropertyMetadata } from "igniteui-react-core"; import { truncate, isNaN_, isInfinity } from "igniteui-react-core"; /** * @hidden */ var AnchoredCategorySeries = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AnchoredCategorySeries, _super); function AnchoredCategorySeries() { var _this = _super.call(this) || this; _this.abr = null; _this.aby = false; _this.abt = null; _this.abo = null; _this.ab5 = null; _this.ab4 = null; _this.abv = true; _this.abz = 0; _this.ab0 = 0; _this.zp = new CategoryFramePreparer(1, _this, _this.zt, _this, _this, _this.zt.c9); return _this; } Object.defineProperty(AnchoredCategorySeries.prototype, "abs", { get: function () { var _this = this; if (this.abr == null) { this.abr = DVContainer.instance.createInstance(IAnchoredCategorySeriesInteractionManager_$type, function () { return _this.ds.n; }); } return this.abr; }, enumerable: false, configurable: true }); AnchoredCategorySeries.prototype.getHostReferenceValue = function () { return this.i7(); }; AnchoredCategorySeries.prototype.mr = function () { return AnchoredCategorySeries.$$p[5]; }; AnchoredCategorySeries.prototype.ct = function () { var a = new AnchoredCategorySeriesView(this); return a; }; AnchoredCategorySeries.prototype.rj = function (a) { _super.prototype.rj.call(this, a); this.abn = a; }; AnchoredCategorySeries.prototype.k1 = function (a, b) { var c = this.nq(b); if (c == AnchoredCategorySeries.$$p[5]) { return this.k2(a, b, this.acf); } if (c == AnchoredCategorySeries.$$p[1]) { return this.k2(a, b, this.ab7); } return _super.prototype.k1.call(this, a, b); }; AnchoredCategorySeries.prototype.mq = function (a) { var b = this.nq(a); if (b == AnchoredCategorySeries.$$p[5]) { return this.acf; } if (b == AnchoredCategorySeries.$$p[1]) { return this.ab7; } return _super.prototype.mq.call(this, a); }; Object.defineProperty(AnchoredCategorySeries.prototype, "valueColumn", { get: function () { return this.abt; }, set: function (a) { if (this.abt != a) { var b = this.abt; this.abt = a; if (!this.aby) { this.raisePropertyChanged("ValueColumn", b, this.abt); } } }, enumerable: false, configurable: true }); AnchoredCategorySeries.prototype.getDataLegendSeriesContextAt = function (a, b) { var c = new DataLegendSeriesValueInfo(); c.a = 0; c.l = this.jf({ $type: Point_$type, x: a, y: b }, false, false); c.r = this.acf != null ? this.acf : "Value"; c.q = "Value"; c.s = this.acb != null ? this.acb : "V:"; c.t = this.acd != null ? this.acd : ""; var d = new DataLegendSeriesContext(); d.e = ((function () { var $ret = new List$1(DataLegendSeriesValueInfo.$, 0); $ret.add(c); return $ret; })()); d.h = this.mp(); return d; }; Object.defineProperty(AnchoredCategorySeries.prototype, "ac2", { get: function () { return this.c(AnchoredCategorySeries.aco); }, set: function (a) { this.h(AnchoredCategorySeries.aco, a); }, enumerable: false, configurable: true }); AnchoredCategorySeries.prototype.gl = function (a) { var b = new Rect(0, 0, 0, 1, 1); var c = this.fetchXAxis(); var d = this.fetchYAxis(); var e = this.w8(this.cw); var f = c != null ? this.zp.r(typeCast(ICategoryScaler_$type, c), b, b, e) : 0; return this.abs.c$a(this, this.valueColumn, c, d, f, a); }; AnchoredCategorySeries.prototype.abk = function (a, b, c) { if (b < a || a < 0 || a > this.valueColumn.count || b < 0 || b > this.valueColumn.count || c == null) { return null; } var d = new Array((b - a) + 1); var e = c.dw; var f = null; if (e) { f = c.i$b; } for (var g = a; g <= b; g++) { var h = g; if (e) { h = f._inner[h]; } d[g - a] = this.dp.item(g); } return d; }; AnchoredCategorySeries.prototype.rs = function (a, b, c, d) { _super.prototype.rs.call(this, a, b, c, d); if (this.abn.dl && this.abn.dk.g$e(a, b, c, d)) { var e = false; if (b == "FastItemsSource") { e = this.go && c != null; } this.sa(e); this.q2(); } switch (b) { case AnchoredCategorySeries.$$p[3]: case AnchoredCategorySeries.$$p[4]: this.qw(); break; case "FastItemsSource": if (typeCast(IFastItemsSource_$type, c) != null) { c.deregisterColumn(this.valueColumn); this.valueColumn = null; } if (typeCast(IFastItemsSource_$type, d) != null) { this.valueColumn = this.dl(this.acf); } var f = typeCast(NumericAxisBase.$, this.fetchYAxis()); if (f != null && !f.ee()) { this.abn.c9.g(this.im); this.sa(this.go && c != null); } break; case AnchoredCategorySeries.$$p[5]: if (this.dp != null) { this.dp.deregisterColumn(this.valueColumn); this.valueColumn = this.dl(this.acf); } this.ab5 = this.acf; break; case AnchoredCategorySeries.$$p[1]: this.ab4 = this.ab7; this.sa(true); break; case "ValueColumn": if (this.abn.dl) { this.abn.dk.g$m(); } for (var g = 0; g < this.abn.aa.count; g++) { var h = this.abn.aa._inner[g]; h.g$m(); } var i = typeCast(NumericAxisBase.$, this.fetchYAxis()); if (i != null && !i.ee()) { this.abn.c9.g(this.im); this.sa(this.go && this.d9); } this.acn(); this.s7(); break; case "TrendLineBrush": this.ry(b); break; case "ErrorBarSettings": this.sa(false); break; case "TrendLineType": this.q2(); if (this.abn.dl) { this.abn.dk.g$b = this.trendLineType; } break; case "TrendLinePeriod": if (this.abn.dl) { this.abn.dk.g$f = this.trendLinePeriod; } break; case AnchoredCategorySeries.$$p[2]: this.sa(false); break; } }; AnchoredCategorySeries.prototype.ay = function (a) { if (this.valueColumn == null || this.valueColumn.count == 0) { return null; } if (a == this.fetchXAxis()) { return new AxisRange(0, this.valueColumn.count - 1); } if (a == this.fetchYAxis()) { return new AxisRange(this.valueColumn.minimum, this.valueColumn.maximum); } return null; }; AnchoredCategorySeries.prototype.pq = function (a, b, c, d) { switch (a) { case 4: case 1: case 0: this.abn.c9.g(this.im); break; } if (this.abn.dl) { this.abn.dk.g$i(a, b, c, d); } for (var e = 0; e < this.abn.aa.count; e++) { var f = this.abn.aa._inner[e]; f.g$i(a, b, c, d); } this.acn(); this.s7(); if (a == 0 || a == 2 || a == 3 || a == 4) { this.abv = true; } else if (a == 1) { for (var g = b; g < b + c; g++) { this.abz += this.valueColumn.item(g); } this.ab0 = this.abz / this.valueColumn.count; } }; AnchoredCategorySeries.prototype.aak = function () { return this.ab1(this.zt); }; AnchoredCategorySeries.prototype.ab1 = function (a) { var b = 0; var c = a.ca; var d = a.b9; var e = this.getEffectiveViewport1(a); var f = typeCast(NumericYAxis.$, this.fetchYAxis()); if (!c.isEmpty && !d.isEmpty && f != null) { var g = new ScalerParams(0, c, d, f.dn, e); if (f.dz) { g.b = this.i7(); } b = f.f7(f.rd, g); } return b; }; AnchoredCategorySeries.prototype.acl = function (a, b, c) { var d = this.ab1(c); if (a.count > 0) { var e = d; a.add({ $type: Point_$type, x: a._inner[a.count - 1].x, y: e }); a.add({ $type: Point_$type, x: a._inner[0].x, y: e }); } }; AnchoredCategorySeries.prototype.abl = function (a, b, c, d) { return this.abm(a, b, c, d, false); }; AnchoredCategorySeries.prototype.abm = function (a, b, c, d, e) { return CategorySeries.zd(a, b, c, d, e); }; AnchoredCategorySeries.prototype.gj = function () { return this.highlightedItemsSource != null || this.ab7 != null; }; AnchoredCategorySeries.prototype.h1 = function () { var a = _super.prototype.h1.call(this); { var b = ((function () { var $ret = new SeriesLayerPropertyOverlay(); $ret.ad = "ValueMemberPath"; $ret.p = true; $ret.y = "HighlightedValueMemberPath"; $ret.q = true; return $ret; })()); b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.ach)); a.add(b); } return a; }; AnchoredCategorySeries.prototype.ach = function (a, b) { if (this.ab7 != null) { b.value = this.ab7; return; } b.value = this.acf; }; AnchoredCategorySeries.prototype.hm = function (a, b, c) { var d = _super.prototype.hm.call(this, a, b, c); var e = c; if (this.valueColumn == null || this.valueColumn.count == 0 || e.c9.d < 1) { d = false; } return d; }; AnchoredCategorySeries.prototype.pk = function (a, b) { _super.prototype.pk.call(this, a, b); var c = b; c.df(); if (c.dl) { c.dk.g$h(); } for (var d = 0; d < b.aa.count; d++) { var e = c.aa._inner[d]; e.g$h(); } }; AnchoredCategorySeries.prototype.aba = function (a, b) { _super.prototype.aba.call(this, a, b); var c = this.zq(b); c.d(a, b); a.i.clear(); if (b.aa.count > 0) { var d = c.i(a); if (d == null || c.g == null) { return; } var e = c.j(d); var f = c.s(d); for (var g = 0; g < b.aa.count; g++) { a.i.add(new List$1(Point_$type, 0)); var h = b.aa._inner[g]; h.prepareLine1(this, a.i._inner[g], d, e, f); } } }; AnchoredCategorySeries.prototype.abd = function (a, b) { _super.prototype.abd.call(this, a, b); var c = typeCast(AnchoredCategorySeriesView.$, b); c.ck = true; if (c.dl) { c.dk.g$k(a.v); } for (var d = 0; d < b.aa.count; d++) { var e = b.aa._inner[d]; e.g$k(a.i._inner[d]); } if (this.x3()) { CategoryMarkerManager.e(this, a.s, b.dc, this.x5); this.aaz(b, a); b.c4(); } this.aci(a, b); }; AnchoredCategorySeries.prototype.r9 = function (a, b, c, d, e) { _super.prototype.r9.call(this, a, b, c, d, e); var f = this.ba.a$k.item(d); var g = f; g.c9.g(this.im); f.bd(c); if (this.d7(g)) { return; } if (this.abo == null) { this.abo = new CategoryFrame(3); } this.abo.aa(); this.aba(this.abo, g); this.abd(this.abo, g); }; AnchoredCategorySeries.prototype.aci = function (a, b) { }; AnchoredCategorySeries.prototype.s1 = function () { _super.prototype.s1.call(this); if (this.index < 0) { return; } this.abn.dq(); if (this.trendLineBrush != null) { this.abn.dn(); } else { this.abn.dm(); } }; AnchoredCategorySeries.prototype.k8 = function (a, b) { if (this.abn.dl && a == this.abn.dk.g$n) { return null; } return _super.prototype.k8.call(this, a, b); }; Object.defineProperty(AnchoredCategorySeries.prototype, "currentCategoryMode", { get: function () { return this.preferredCategoryMode(typeCast(CategoryAxisBase.$, this.zi())); }, enumerable: false, configurable: true }); Object.defineProperty(AnchoredCategorySeries.prototype, "scaler", { get: function () { return typeCast(ICategoryScaler_$type, this.zi()); }, enumerable: false, configurable: true }); Object.defineProperty(AnchoredCategorySeries.prototype, "yScaler", { get: function () { return typeCast(IScaler_$type, this.zz()); }, enumerable: false, configurable: true }); Object.defineProperty(AnchoredCategorySeries.prototype, "bucketizer", { get: function () { return this.abn.c9; }, enumerable: false, configurable: true }); Object.defineProperty(AnchoredCategorySeries.prototype, "currentMode2Index", { get: function () { return this.aao(); }, enumerable: false, configurable: true }); AnchoredCategorySeries.prototype.provideCollisionDetector = function () { if (this.abp == 1) { return new CollisionAvoider(); } return NonCollisionAvoider.b; }; Object.defineProperty(AnchoredCategorySeries.prototype, "trendlinePreparer", { get: function () { return this.abn.dl ? this.abn.dk : null; }, enumerable: false, configurable: true }); AnchoredCategorySeries.prototype.qf = function (a) { _super.prototype.qf.call(this, a); if (this.abn.dl) { this.bc.exportTrendlineData(this, a, this.abn.dk.g$n); } }; AnchoredCategorySeries.prototype.ky = function (a) { var _this = this; var b = this.fetchXAxis(); var c = this.fetchYAxis(); return this.abs.c$b(this, a, this.aal(this.cw), this.valueColumn, b, c, this.abq == 1, function (d) { return _super.prototype.ky.call(_this, d); }); }; Object.defineProperty(AnchoredCategorySeries.prototype, "mayContainUnknowns", { get: function () { return this.valueColumn == null || this.valueColumn.mayContainUnknowns; }, enumerable: false, configurable: true }); AnchoredCategorySeries.prototype.i7 = function () { return Series.i8(this.valueColumn, typeCast(ISortingAxis_$type, this.fetchXAxis())); }; AnchoredCategorySeries.prototype.get_ab3 = function () { return 0; }; Object.defineProperty(AnchoredCategorySeries.prototype, "ab3", { get: function () { return this.get_ab3(); }, enumerable: false, configurable: true }); AnchoredCategorySeries.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.left, d)); var f = (c.ga(b.right, 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; }; AnchoredCategorySeries.prototype.acn = function () { this.iv = this.valueColumn == null || this.valueColumn.count == 0 ? NaN : this.valueColumn.item(this.valueColumn.count - 1); }; AnchoredCategorySeries.prototype.acm = function () { if (this.abv) { this.abz = 0; for (var a = 0; a < this.valueColumn.count; a++) { this.abz += this.valueColumn.item(a); } this.ab0 = this.abz / this.valueColumn.count; this.abv = false; } }; AnchoredCategorySeries.prototype.ji = function (a, b) { if (b == null || !b.dq) { return NaN; } var c = this.zz(); if (b != c) { return NaN; } var d = this.aq(a); if (c.dz) { return d[1]; } else { return d[0]; } }; AnchoredCategorySeries.prototype.aq = function (a) { var b = NaN; switch (a) { case 5: case 2: b = this.valueColumn.maximum; break; case 4: case 1: b = this.valueColumn.minimum; break; case 6: case 3: if (this.abv) { this.acm(); } b = this.ab0; break; } var c = this.zz(); if (c.dz) { return [NaN, b]; } else { return [b, NaN]; } }; AnchoredCategorySeries.prototype.w1 = function (a) { var b = NaN; switch (a) { case 5: case 2: b = this.valueColumn.maximum; break; case 4: case 1: b = this.valueColumn.minimum; break; case 6: case 3: if (this.abv) { this.acm(); } b = this.ab0; break; } if (isNaN_(b)) { return { $type: Point_$type, x: NaN, y: NaN }; } var c = this.zz(); var d = this.getEffectiveViewport1(this.cw); var e = new ScalerParams(0, this.cw.ca, this.cw.b9, c.dn, d); if (c.dz) { e.b = this.i7(); } e.c = d; if (c.dz) { return { $type: Point_$type, x: NaN, y: c.f7(b, e) }; } else { return { $type: Point_$type, x: c.f7(b, e), y: NaN }; } }; AnchoredCategorySeries.prototype.w2 = function (a) { var b = this.zz(); var c = this.getEffectiveViewport1(this.cw); var d = new ScalerParams(0, this.cw.ca, this.cw.b9, b.dn, c); if (b.dz) { d.b = this.i7(); } d.c = c; if (b.dz) { return { $type: Point_$type, x: NaN, y: b.f7(a[1], d) }; } else { return { $type: Point_$type, x: b.f7(a[0], d), y: NaN }; } }; AnchoredCategorySeries.prototype.aa6 = function (a, b, c, d, e, f, g) { var _this = this; if (c < 0 || d < 0) { return; } for (var h = c; h <= d; h++) { if (a == 1) { if (this.abw(e, f, h)) { if (g == 7 || g == 6) { b.add(((function () { var $ret = new ChartSelection(); $ret.series = _this; return $ret; })())); return; } this.aax(b, h, g); } } else { if (this.abx(e, f, h)) { if (g == 7 || g == 6) { b.add(((function () { var $ret = new ChartSelection(); $ret.series = _this; return $ret; })())); return; } this.aax(b, h, g); } } } }; AnchoredCategorySeries.prototype.abx = function (a, b, c) { return this.valueColumn.item(c) < b && a < this.valueColumn.item(c); }; AnchoredCategorySeries.prototype.abw = function (a, b, c) { return 0 < b && a < this.valueColumn.item(c); }; AnchoredCategorySeries.prototype.aax = function (a, b, c) { var _this = this; if (c == 2 || c == 1) { a.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dp.item(b); return $ret; })())); } else { a.add(((function () { var $ret = new ChartSelection(); $ret.item = _this.dp.item(b); $ret.series = _this; return $ret; })())); } }; AnchoredCategorySeries.prototype.bd = function () { return CategoryTrendLineManagerFactory.a(null, this.a0(), null, this, this.ds); }; AnchoredCategorySeries.prototype.qt = function () { _super.prototype.qt.call(this); if (this.abn.dl) { this.abn.dk.g$m(); } for (var a = 0; a < this.abn.aa.count; a++) { var b = this.abn.aa._inner[a]; b.g$m(); } }; Object.defineProperty(AnchoredCategorySeries.prototype, "useHighMarkerFidelity", { get: function () { return this.aag; }, enumerable: false, configurable: true }); AnchoredCategorySeries.$t = markType(AnchoredCategorySeries, 'AnchoredCategorySeries', CategorySeries.$, [IIsCategoryBased_$type, IHasSingleValueCategory_$type, IHasCategoryTrendline_$type, ITrendLineSeries_$type]); AnchoredCategorySeries.aco = DependencyProperty.i("ActualTrendLineBrush", Brush.$, AnchoredCategorySeries.$, new PropertyMetadata(2, null, function (a, b) { return a.raisePropertyChanged("ActualTrendLineBrush", b.oldValue, b.newValue); })); AnchoredCategorySeries.$$p = markDep(DependencyProperty, PropertyMetadata, AnchoredCategorySeries, 'raisePropertyChanged', ['ConsolidatedItemHitTestBehavior:abq:acp', [ConsolidatedItemHitTestBehavior_$type, enumGetBox(ConsolidatedItemHitTestBehavior_$type, 0)], 'HighlightedValueMemberPath:ab7:acq', [2, null], 'MarkerCollisionAvoidance:abp:acr', [CategorySeriesMarkerCollisionAvoidance_$type, enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, 1)], 'ValueMemberAsLegendLabel:acb:acz', [2, null], 'ValueMemberAsLegendUnit:acd:ac0', [2, null], 'ValueMemberPath:acf:ac1', [2, null], 'TrendLineType::acx', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness::acw', [1, 1.5], 'TrendLinePeriod::acv', [1, 7], 'TrendLineBrush::acs', [Brush.$, null], 'TrendLineZIndex:ab2:acy', [1, 1001], 'TrendLineDashArray:ac3:act', [DoubleCollection.$], 'TrendLineDashCap:ac4:acu', [PenLineCap_$type, enumGetBox(PenLineCap_$type, 0)]]); return AnchoredCategorySeries; }(CategorySeries)); export { AnchoredCategorySeries }; /** * @hidden */ var AnchoredCategoryBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AnchoredCategoryBucketCalculator, _super); function AnchoredCategoryBucketCalculator(a) { var _this = _super.call(this, a) || this; _this.i = null; _this.h = null; _this.j = 0; _this.i = a; return _this; } AnchoredCategoryBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) { var b = this.h; var c = this.j; var d = a * this.d; var e = d + this.d - 1; var f = c - 1; d = d < f ? d : f; e = e < f ? e : f; var g = 1.7976931348623157E+308; var h = -1.7976931348623157E+308; var i = true; for (var j = d; j <= e; ++j) { var k = b[j]; g = g < k ? g : k; h = h > k ? h : k; i = false; } if (!i) { return [0.5 * (d + e), g, h]; } return [0.5 * (d + e), NaN, NaN]; }; AnchoredCategoryBucketCalculator.prototype.getBucket = function (a) { var b = this.h; var c = this.j; var d = a * this.d; var e = d + this.d - 1; var f = c - 1; d = d < f ? d : f; e = e < f ? e : f; var g = 0; var h = 0; var i = true; for (var j = d; j <= e; ++j) { var k = b[j]; if (!i) { if (!isNaN_(k)) { g = g < k ? g : k; h = h > k ? h : k; } } else { if (!isNaN_(k)) { g = k; h = k; i = false; } } } if (!i) { return [0.5 * (d + e), g, h]; } return [0.5 * (d + e), NaN, NaN]; }; AnchoredCategoryBucketCalculator.prototype.cacheValues = function () { this.j = this.i.di.valueColumn.count; this.h = this.i.di.valueColumn.asArray(); }; AnchoredCategoryBucketCalculator.prototype.unCacheValues = function () { this.h = null; }; AnchoredCategoryBucketCalculator.$t = markType(AnchoredCategoryBucketCalculator, 'AnchoredCategoryBucketCalculator', CategoryBucketCalculator.$); return AnchoredCategoryBucketCalculator; }(CategoryBucketCalculator)); export { AnchoredCategoryBucketCalculator }; /** * @hidden */ var AnchoredCategorySeriesView = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AnchoredCategorySeriesView, _super); function AnchoredCategorySeriesView(a) { var _this = _super.call(this, a) || this; _this.di = null; _this.dj = null; _this.di = a; return _this; } Object.defineProperty(AnchoredCategorySeriesView.prototype, "dk", { get: function () { if (this.dj == null) { this.dj = CategoryTrendLineManagerFactory.a(this.dj, this.f.a0(), this.f.tf, this.f, this.f.ds); this.dj.g$b = this.di.trendLineType; this.dj.g$f = this.di.trendLinePeriod; } return this.dj; }, set: function (a) { this.dj = a; }, enumerable: false, configurable: true }); Object.defineProperty(AnchoredCategorySeriesView.prototype, "dl", { get: function () { return this.dj != null; }, enumerable: false, configurable: true }); AnchoredCategorySeriesView.prototype.dq = function () { this.di.ac2 = null; }; AnchoredCategorySeriesView.prototype.dn = function () { this.di.ac2 = this.di.trendLineBrush; }; AnchoredCategorySeriesView.prototype.dm = function () { this.di.ac2 = this.di.vv; }; AnchoredCategorySeriesView.prototype.da = function () { return new AnchoredCategoryBucketCalculator(this); }; AnchoredCategorySeriesView.prototype.dp = function () { this.c9.cacheValues(); }; AnchoredCategorySeriesView.prototype.dr = function () { this.c9.unCacheValues(); }; AnchoredCategorySeriesView.prototype.ds = function (a) { var b = this.dc.item(a); return this.c7(b); }; AnchoredCategorySeriesView.prototype.bi = function (a, b) { if (a.d) { if (this.di.trendLineType != 0 && !b) { var c = this.dk.g$n; c.ad = this.di.trendLineThickness; c._stroke = this.di.ac2; c.ai = this.di.ac3; c.aj = this.di.ac4; a.v(c); } } _super.prototype.bi.call(this, a, b); }; AnchoredCategorySeriesView.prototype.getDefaultTooltipTemplate = function () { return this.di.abs.c$c(this.f, this.di.acf); }; AnchoredCategorySeriesView.$t = markType(AnchoredCategorySeriesView, 'AnchoredCategorySeriesView', CategorySeriesView.$); return AnchoredCategorySeriesView; }(CategorySeriesView)); export { AnchoredCategorySeriesView };