igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
923 lines (922 loc) • 33.1 kB
JavaScript
/*
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-webcomponents-core";
import { Point_$type, enumGetBox, typeCast, runOn, delegateCombine, markType, markDep } from "igniteui-webcomponents-core";
import { DependencyProperty } from "igniteui-webcomponents-core";
import { Series } from "./Series";
import { TrendLineType_$type } from "igniteui-webcomponents-core";
import { Brush } from "igniteui-webcomponents-core";
import { PenLineCap_$type } from "igniteui-webcomponents-core";
import { DoubleCollection } from "igniteui-webcomponents-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-webcomponents-core";
import { DataLegendSeriesContext } from "igniteui-webcomponents-core";
import { List$1 } from "igniteui-webcomponents-core";
import { Rect } from "igniteui-webcomponents-core";
import { ISortingAxis_$type } from "./ISortingAxis";
import { IFastItemsSource_$type } from "igniteui-webcomponents-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-webcomponents-core";
import { truncate, isNaN_, isInfinity } from "igniteui-webcomponents-core";
/**
* @hidden
*/
var AnchoredCategorySeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(AnchoredCategorySeries, _super);
function AnchoredCategorySeries() {
var _this = _super.call(this) || this;
_this.aa6 = null;
_this.abd = false;
_this.aa8 = null;
_this.aa3 = null;
_this.abk = null;
_this.abj = null;
_this.aba = true;
_this.abe = 0;
_this.abf = 0;
_this.y4 = new CategoryFramePreparer(1, _this, _this.y8, _this, _this, _this.y8.c9);
return _this;
}
Object.defineProperty(AnchoredCategorySeries.prototype, "aa7", {
get: function () {
var _this = this;
if (this.aa6 == null) {
this.aa6 = DVContainer.instance.createInstance(IAnchoredCategorySeriesInteractionManager_$type, function () { return _this.ds.n; });
}
return this.aa6;
},
enumerable: false,
configurable: true
});
AnchoredCategorySeries.prototype.getHostReferenceValue = function () {
return this.iz();
};
AnchoredCategorySeries.prototype.mg = function () {
return AnchoredCategorySeries.$$p[5];
};
AnchoredCategorySeries.prototype.ct = function () {
var a = new AnchoredCategorySeriesView(this);
return a;
};
AnchoredCategorySeries.prototype.q3 = function (a) {
_super.prototype.q3.call(this, a);
this.aa2 = a;
};
AnchoredCategorySeries.prototype.kr = function (a, b) {
var c = this.nf(b);
if (c == AnchoredCategorySeries.$$p[5]) {
return this.ks(a, b, this.abu);
}
if (c == AnchoredCategorySeries.$$p[1]) {
return this.ks(a, b, this.abm);
}
return _super.prototype.kr.call(this, a, b);
};
AnchoredCategorySeries.prototype.mf = function (a) {
var b = this.nf(a);
if (b == AnchoredCategorySeries.$$p[5]) {
return this.abu;
}
if (b == AnchoredCategorySeries.$$p[1]) {
return this.abm;
}
return _super.prototype.mf.call(this, a);
};
Object.defineProperty(AnchoredCategorySeries.prototype, "valueColumn", {
get: function () {
return this.aa8;
},
set: function (a) {
if (this.aa8 != a) {
var b = this.aa8;
this.aa8 = a;
if (!this.abd) {
this.raisePropertyChanged("ValueColumn", b, this.aa8);
}
}
},
enumerable: false,
configurable: true
});
AnchoredCategorySeries.prototype.getDataLegendSeriesContextAt = function (a, b) {
var c = new DataLegendSeriesValueInfo();
c.a = 0;
c.l = this.i6({ $type: Point_$type, x: a, y: b }, false, false);
c.r = this.abu != null ? this.abu : "Value";
c.q = "Value";
c.s = this.abq != null ? this.abq : "V:";
c.t = this.abs != null ? this.abs : "";
var d = new DataLegendSeriesContext();
d.e = ((function () {
var $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
$ret.add(c);
return $ret;
})());
d.h = this.me();
return d;
};
Object.defineProperty(AnchoredCategorySeries.prototype, "ach", {
get: function () {
return this.c(AnchoredCategorySeries.ab3);
},
set: function (a) {
this.h(AnchoredCategorySeries.ab3, a);
},
enumerable: false,
configurable: true
});
AnchoredCategorySeries.prototype.ge = function (a) {
var b = new Rect(0, 0, 0, 1, 1);
var c = this.fetchXAxis();
var d = this.fetchYAxis();
var e = this.wq(this.cw);
var f = c != null ? this.y4.r(typeCast(ICategoryScaler_$type, c), b, b, e) : 0;
return this.aa7.c$a(this, this.valueColumn, c, d, f, a);
};
AnchoredCategorySeries.prototype.aaz = 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.cn;
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.rc = function (a, b, c, d) {
_super.prototype.rc.call(this, a, b, c, d);
if (this.aa2.dl && this.aa2.dk.g$e(a, b, c, d)) {
var e = false;
if (b == "FastItemsSource") {
e = this.gh && c != null;
}
this.ru(e);
this.qn();
}
switch (b) {
case AnchoredCategorySeries.$$p[3]:
case AnchoredCategorySeries.$$p[4]:
this.qh();
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.abu);
}
var f = typeCast(NumericAxisBase.$, this.fetchYAxis());
if (f != null && !f.c1()) {
this.aa2.c9.g(this.ie);
this.ru(this.gh && c != null);
}
break;
case AnchoredCategorySeries.$$p[5]:
if (this.dp != null) {
this.dp.deregisterColumn(this.valueColumn);
this.valueColumn = this.dl(this.abu);
}
this.abk = this.abu;
break;
case AnchoredCategorySeries.$$p[1]:
this.abj = this.abm;
this.ru(true);
break;
case "ValueColumn":
if (this.aa2.dl) {
this.aa2.dk.g$m();
}
for (var g = 0; g < this.aa2.aa.count; g++) {
var h = this.aa2.aa._inner[g];
h.g$m();
}
var i = typeCast(NumericAxisBase.$, this.fetchYAxis());
if (i != null && !i.c1()) {
this.aa2.c9.g(this.ie);
this.ru(this.gh && this.d9);
}
this.ab2();
this.sr();
break;
case "TrendLineBrush":
this.ri(b);
break;
case "ErrorBarSettings":
this.ru(false);
break;
case "TrendLineType":
this.qn();
if (this.aa2.dl) {
this.aa2.dk.g$b = this.trendLineType;
}
break;
case "TrendLinePeriod":
if (this.aa2.dl) {
this.aa2.dk.g$f = this.trendLinePeriod;
}
break;
case AnchoredCategorySeries.$$p[2]:
this.ru(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.pd = function (a, b, c, d) {
switch (a) {
case 4:
case 1:
case 0:
this.aa2.c9.g(this.ie);
break;
}
if (this.aa2.dl) {
this.aa2.dk.g$i(a, b, c, d);
}
for (var e = 0; e < this.aa2.aa.count; e++) {
var f = this.aa2.aa._inner[e];
f.g$i(a, b, c, d);
}
this.ab2();
this.sr();
if (a == 0 || a == 2 || a == 3 || a == 4) {
this.aba = true;
}
else if (a == 1) {
for (var g = b; g < b + c; g++) {
this.abe += this.valueColumn.item(g);
}
this.abf = this.abe / this.valueColumn.count;
}
};
AnchoredCategorySeries.prototype.zz = function () {
return this.abg(this.y8);
};
AnchoredCategorySeries.prototype.abg = 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.ch, e);
if (f.cp) {
g.b = this.iz();
}
b = f.el(f.me, g);
}
return b;
};
AnchoredCategorySeries.prototype.ab0 = function (a, b, c) {
var d = this.abg(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.aa0 = function (a, b, c, d) {
return this.aa1(a, b, c, d, false);
};
AnchoredCategorySeries.prototype.aa1 = function (a, b, c, d, e) {
return CategorySeries.ys(a, b, c, d, e);
};
AnchoredCategorySeries.prototype.gc = function () {
return this.highlightedItemsSource != null || this.abm != null;
};
AnchoredCategorySeries.prototype.hu = function () {
var a = _super.prototype.hu.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.abw));
a.add(b);
}
return a;
};
AnchoredCategorySeries.prototype.abw = function (a, b) {
if (this.abm != null) {
b.value = this.abm;
return;
}
b.value = this.abu;
};
AnchoredCategorySeries.prototype.hf = function (a, b, c) {
var d = _super.prototype.hf.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.o7 = function (a, b) {
_super.prototype.o7.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.aap = function (a, b) {
_super.prototype.aap.call(this, a, b);
var c = this.y5(b);
c.d(a, b);
a.f.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.f.add(new List$1(Point_$type, 0));
var h = b.aa._inner[g];
h.prepareLine1(this, a.f._inner[g], d, e, f);
}
}
};
AnchoredCategorySeries.prototype.aas = function (a, b) {
_super.prototype.aas.call(this, a, b);
var c = typeCast(AnchoredCategorySeriesView.$, b);
c.ck = true;
if (c.dl) {
c.dk.g$k(a.s);
}
for (var d = 0; d < b.aa.count; d++) {
var e = b.aa._inner[d];
e.g$k(a.f._inner[d]);
}
if (this.xl()) {
CategoryMarkerManager.e(this, a.p, b.dc, this.xn);
this.aae(b, a);
b.c4();
}
this.abx(a, b);
};
AnchoredCategorySeries.prototype.rt = function (a, b, c, d, e) {
_super.prototype.rt.call(this, a, b, c, d, e);
var f = this.ba.a$j.item(d);
var g = f;
g.c9.g(this.ie);
f.bd(c);
if (this.d7(g)) {
return;
}
if (this.aa3 == null) {
this.aa3 = new CategoryFrame(3);
}
this.aa3.x();
this.aap(this.aa3, g);
this.aas(this.aa3, g);
};
AnchoredCategorySeries.prototype.abx = function (a, b) {
};
AnchoredCategorySeries.prototype.sl = function () {
_super.prototype.sl.call(this);
if (this.index < 0) {
return;
}
this.aa2.dq();
if (this.trendLineBrush != null) {
this.aa2.dn();
}
else {
this.aa2.dm();
}
};
AnchoredCategorySeries.prototype.ky = function (a, b) {
if (this.aa2.dl && a == this.aa2.dk.g$n) {
return null;
}
return _super.prototype.ky.call(this, a, b);
};
Object.defineProperty(AnchoredCategorySeries.prototype, "currentCategoryMode", {
get: function () {
return this.preferredCategoryMode(typeCast(CategoryAxisBase.$, this.yx()));
},
enumerable: false,
configurable: true
});
Object.defineProperty(AnchoredCategorySeries.prototype, "scaler", {
get: function () {
return typeCast(ICategoryScaler_$type, this.yx());
},
enumerable: false,
configurable: true
});
Object.defineProperty(AnchoredCategorySeries.prototype, "yScaler", {
get: function () {
return typeCast(IScaler_$type, this.ze());
},
enumerable: false,
configurable: true
});
Object.defineProperty(AnchoredCategorySeries.prototype, "bucketizer", {
get: function () {
return this.aa2.c9;
},
enumerable: false,
configurable: true
});
Object.defineProperty(AnchoredCategorySeries.prototype, "currentMode2Index", {
get: function () {
return this.z3();
},
enumerable: false,
configurable: true
});
AnchoredCategorySeries.prototype.provideCollisionDetector = function () {
if (this.aa4 == 1) {
return new CollisionAvoider();
}
return NonCollisionAvoider.b;
};
Object.defineProperty(AnchoredCategorySeries.prototype, "trendlinePreparer", {
get: function () {
return this.aa2.dl ? this.aa2.dk : null;
},
enumerable: false,
configurable: true
});
AnchoredCategorySeries.prototype.p1 = function (a) {
_super.prototype.p1.call(this, a);
if (this.aa2.dl) {
this.bc.exportTrendlineData(this, a, this.aa2.dk.g$n);
}
};
AnchoredCategorySeries.prototype.ko = function (a) {
var _this = this;
var b = this.fetchXAxis();
var c = this.fetchYAxis();
return this.aa7.c$b(this, a, this.z0(this.cw), this.valueColumn, b, c, this.aa5 == 1, function (d) { return _super.prototype.ko.call(_this, d); });
};
Object.defineProperty(AnchoredCategorySeries.prototype, "mayContainUnknowns", {
get: function () {
return this.valueColumn == null || this.valueColumn.mayContainUnknowns;
},
enumerable: false,
configurable: true
});
AnchoredCategorySeries.prototype.iz = function () {
return Series.i0(this.valueColumn, typeCast(ISortingAxis_$type, this.fetchXAxis()));
};
AnchoredCategorySeries.prototype.get_abi = function () {
return 0;
};
Object.defineProperty(AnchoredCategorySeries.prototype, "abi", {
get: function () {
return this.get_abi();
},
enumerable: false,
configurable: true
});
AnchoredCategorySeries.prototype.az = function (a) {
if (a.isEmpty && this.dc != null) {
a = this.dc.wt;
}
if (this.valueColumn == null) {
return null;
}
var b = this.wo(this.cw);
var c = this.yx();
var d = new ScalerParams(0, a, this.dc.xb, c.ch, this.getEffectiveViewport());
var e = (c.eo(b.left, d));
var f = (c.eo(b.right, d));
if (c.ch) {
var g = e;
e = f;
f = g;
}
e -= this.abi;
f += this.abi;
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.ze(), a);
return n;
};
AnchoredCategorySeries.prototype.ab2 = function () {
this.io = this.valueColumn == null || this.valueColumn.count == 0 ? NaN : this.valueColumn.item(this.valueColumn.count - 1);
};
AnchoredCategorySeries.prototype.ab1 = function () {
if (this.aba) {
this.abe = 0;
for (var a = 0; a < this.valueColumn.count; a++) {
this.abe += this.valueColumn.item(a);
}
this.abf = this.abe / this.valueColumn.count;
this.aba = false;
}
};
AnchoredCategorySeries.prototype.i9 = function (a, b) {
if (b == null || !b.cj) {
return NaN;
}
var c = this.ze();
if (b != c) {
return NaN;
}
var d = this.aq(a);
if (c.cp) {
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.aba) {
this.ab1();
}
b = this.abf;
break;
}
var c = this.ze();
if (c.cp) {
return [NaN, b];
}
else {
return [b, NaN];
}
};
AnchoredCategorySeries.prototype.wk = 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.aba) {
this.ab1();
}
b = this.abf;
break;
}
if (isNaN_(b)) {
return { $type: Point_$type, x: NaN, y: NaN };
}
var c = this.ze();
var d = this.getEffectiveViewport1(this.cw);
var e = new ScalerParams(0, this.cw.ca, this.cw.b9, c.ch, d);
if (c.cp) {
e.b = this.iz();
}
e.c = d;
if (c.cp) {
return { $type: Point_$type, x: NaN, y: c.el(b, e) };
}
else {
return { $type: Point_$type, x: c.el(b, e), y: NaN };
}
};
AnchoredCategorySeries.prototype.wl = function (a) {
var b = this.ze();
var c = this.getEffectiveViewport1(this.cw);
var d = new ScalerParams(0, this.cw.ca, this.cw.b9, b.ch, c);
if (b.cp) {
d.b = this.iz();
}
d.c = c;
if (b.cp) {
return { $type: Point_$type, x: NaN, y: b.el(a[1], d) };
}
else {
return { $type: Point_$type, x: b.el(a[0], d), y: NaN };
}
};
AnchoredCategorySeries.prototype.aal = 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.abb(e, f, h)) {
if (g == 7 || g == 6) {
b.add(((function () {
var $ret = new ChartSelection();
$ret.series = _this;
return $ret;
})()));
return;
}
this.aac(b, h, g);
}
}
else {
if (this.abc(e, f, h)) {
if (g == 7 || g == 6) {
b.add(((function () {
var $ret = new ChartSelection();
$ret.series = _this;
return $ret;
})()));
return;
}
this.aac(b, h, g);
}
}
}
};
AnchoredCategorySeries.prototype.abc = function (a, b, c) {
return this.valueColumn.item(c) < b && a < this.valueColumn.item(c);
};
AnchoredCategorySeries.prototype.abb = function (a, b, c) {
return 0 < b && a < this.valueColumn.item(c);
};
AnchoredCategorySeries.prototype.aac = 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);
};
Object.defineProperty(AnchoredCategorySeries.prototype, "useHighMarkerFidelity", {
get: function () {
return this.zv;
},
enumerable: false,
configurable: true
});
AnchoredCategorySeries.$t = markType(AnchoredCategorySeries, 'AnchoredCategorySeries', CategorySeries.$, [IIsCategoryBased_$type, IHasSingleValueCategory_$type, IHasCategoryTrendline_$type, ITrendLineSeries_$type]);
AnchoredCategorySeries.ab3 = 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:aa5:ab4', [ConsolidatedItemHitTestBehavior_$type, enumGetBox(ConsolidatedItemHitTestBehavior_$type, 0)], 'HighlightedValueMemberPath:abm:ab5', [2, null], 'MarkerCollisionAvoidance:aa4:ab6', [CategorySeriesMarkerCollisionAvoidance_$type, enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, 1)], 'ValueMemberAsLegendLabel:abq:ace', [2, null], 'ValueMemberAsLegendUnit:abs:acf', [2, null], 'ValueMemberPath:abu:acg', [2, null], 'TrendLineType::acc', [TrendLineType_$type, enumGetBox(TrendLineType_$type, 0)], 'TrendLineThickness::acb', [1, 1.5], 'TrendLinePeriod::aca', [1, 7], 'TrendLineBrush::ab7', [Brush.$, null], 'TrendLineZIndex:abh:acd', [1, 1001], 'TrendLineDashArray:aci:ab8', [DoubleCollection.$], 'TrendLineDashCap:acj:ab9', [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.sz, 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.ach = null;
};
AnchoredCategorySeriesView.prototype.dn = function () {
this.di.ach = this.di.trendLineBrush;
};
AnchoredCategorySeriesView.prototype.dm = function () {
this.di.ach = this.di.ve;
};
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.ach;
c.ai = this.di.aci;
c.aj = this.di.acj;
a.v(c);
}
}
_super.prototype.bi.call(this, a, b);
};
AnchoredCategorySeriesView.prototype.getDefaultTooltipTemplate = function () {
return this.di.aa7.c$c(this.f, this.di.abu);
};
AnchoredCategorySeriesView.$t = markType(AnchoredCategorySeriesView, 'AnchoredCategorySeriesView', CategorySeriesView.$);
return AnchoredCategorySeriesView;
}(CategorySeriesView));
export { AnchoredCategorySeriesView };