UNPKG

igniteui-react-charts

Version:

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

1,438 lines 286 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 { EventArgs, Base, markType, Point_$type, runOn, typeCast, IList$1_$type, Number_$type, markDep, IEnumerable_$type, Array_$type, delegateCombine, fromEnum, Boolean_$type, enumGetBox, fromEn, String_$type, getInstanceType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, Delegate_$type, toNullable, TypeRegistrar } from "igniteui-react-core"; import { Brush } from "igniteui-react-core"; import { DataTemplate } from "igniteui-react-core"; import { Visibility_$type } from "igniteui-react-core"; import { DoubleCollection } from "igniteui-react-core"; import { PenLineCap_$type } from "igniteui-react-core"; import { Style } from "igniteui-react-core"; import { MarkerType_$type } from "./MarkerType"; import { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries"; import { CategoryLineRasterizer } from "./CategoryLineRasterizer"; import { Series } from "./Series"; import { List$1 } from "igniteui-react-core"; import { AnchoredCategorySeries } from "./AnchoredCategorySeries"; import { CategoryAxisBase } from "./CategoryAxisBase"; import { CategorySeries } from "./CategorySeries"; import { CategoryFramePreparer } from "./CategoryFramePreparer"; import { NumericAxisBase } from "./NumericAxisBase"; import { ISupportsMarkers_$type } from "./ISupportsMarkers"; import { CategoryFrame } from "./CategoryFrame"; import { Rect } from "igniteui-react-core"; import { CategorySeriesView } from "./CategorySeriesView"; import { Axis } from "./Axis"; import { ScalerParams } from "./ScalerParams"; import { ObservableCollection$1 } from "igniteui-react-core"; import { AxisRange } from "./AxisRange"; import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView"; import { CategoryBucketCalculator } from "./CategoryBucketCalculator"; import { isNaN_, isInfinity, truncate } from "igniteui-react-core"; import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode"; import { Path } from "igniteui-react-core"; import { ISortingAxis_$type } from "./ISortingAxis"; import { FrameworkElement } from "igniteui-react-core"; import { XamDataChart } from "./XamDataChart"; import { DependencyProperty } from "igniteui-react-core"; import { DependencyObject } from "igniteui-react-core"; import { NumericYAxis } from "./NumericYAxis"; import { Defaults } from "./Defaults"; import { Pool$1 } from "igniteui-react-core"; import { Rectangle } from "igniteui-react-core"; import { DataContext } from "igniteui-react-core"; import { Dictionary$2 } from "igniteui-react-core"; import { IScaler_$type } from "./IScaler"; import { IIsCategoryBased_$type } from "./IIsCategoryBased"; import { CategoryMarkerManager } from "./CategoryMarkerManager"; import { PropertyMetadata } from "igniteui-react-core"; import { dateMinValue, dateMaxValue } from "igniteui-react-core"; import { NumericXAxis } from "./NumericXAxis"; import { CategoryYAxis } from "./CategoryYAxis"; import { AnchoredCategoryBucketCalculator } from "./AnchoredCategoryBucketCalculator"; import { IStacked100Series_$type } from "./IStacked100Series"; import { NotImplementedException } from "igniteui-react-core"; import { SplineSeriesBase } from "./SplineSeriesBase"; import { CollisionAvoider } from "./CollisionAvoider"; import { SafeSortedReadOnlyDoubleCollection } from "./SafeSortedReadOnlyDoubleCollection"; import { Numeric } from "igniteui-react-core"; import { ICategoryScaler_$type } from "./ICategoryScaler"; import { ChartSelection } from "./ChartSelection"; import { CategoryXAxis } from "./CategoryXAxis"; import { IBarSeries_$type } from "./IBarSeries"; import { Color } from "igniteui-react-core"; import { LegendItemBadgeShape_$type } from "igniteui-react-core"; import { LegendItemBadgeMode_$type } from "igniteui-react-core"; import { MarkerFillMode_$type } from "./MarkerFillMode"; import { MarkerOutlineMode_$type } from "./MarkerOutlineMode"; import { SeriesOutlineMode_$type } from "./SeriesOutlineMode"; import { SeriesHighlightedValuesDisplayMode_$type } from "igniteui-react-core"; import { TransitionInSpeedType_$type } from "./TransitionInSpeedType"; import { PropertyUpdatedEventArgs } from "igniteui-react-core"; import { DataLegendSeriesValueInfo } from "igniteui-react-core"; import { DataLegendSeriesContext } from "igniteui-react-core"; import { SingleValuesHolder } from "./SingleValuesHolder"; import { stringIsNullOrEmpty } from "igniteui-react-core"; import { SplineSeriesBaseView } from "./SplineSeriesBaseView"; import { Canvas } from "igniteui-react-core"; import { Panel } from "igniteui-react-core"; import { PlatformConstants } from "igniteui-react-core"; /** * @hidden */ var StackedSeriesCreatedEventArgs = /** @class */ /*@__PURE__*/ (function (_super) { __extends(StackedSeriesCreatedEventArgs, _super); function StackedSeriesCreatedEventArgs(a) { var _this = _super.call(this) || this; _this.c = null; _this.c = a; return _this; } Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "brush", { get: function () { return this.c.kz; }, set: function (a) { this.c.kz = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "legendItemTemplate", { get: function () { return this.c.hr; }, set: function (a) { this.c.hr = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "legendItemBadgeTemplate", { get: function () { return this.c.hq; }, set: function (a) { this.c.hq = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "legendItemVisibility", { get: function () { return this.c.lu; }, set: function (a) { this.c.lu = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "outline", { get: function () { return this.c.k3; }, set: function (a) { this.c.k3 = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "dashArray", { get: function () { return this.c.k8; }, set: function (a) { this.c.k8 = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "dashCap", { get: function () { return this.c.lb; }, set: function (a) { this.c.lb = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "index", { get: function () { return this.c.cc; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "thickness", { get: function () { return this.c.b4; }, set: function (a) { this.c.b4 = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "title", { get: function () { return this.c.cj; }, set: function (a) { this.c.cj = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "transitionDuration", { get: function () { return this.c.cd; }, set: function (a) { this.c.cd = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "transitionEasingFunction", { get: function () { return this.c.ai; }, set: function (a) { this.c.ai = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerBrush", { get: function () { return this.c.k0; }, set: function (a) { this.c.k0 = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerOutline", { get: function () { return this.c.k1; }, set: function (a) { this.c.k1 = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerStyle", { get: function () { return this.c.lr; }, set: function (a) { this.c.lr = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerTemplate", { get: function () { return this.c.hs; }, set: function (a) { this.c.hs = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerType", { get: function () { return this.c.x; }, set: function (a) { this.c.x = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "markerThickness", { get: function () { return this.c.bx; }, set: function (a) { this.c.bx = a; }, enumerable: false, configurable: true }); Object.defineProperty(StackedSeriesCreatedEventArgs.prototype, "lineCap", { get: function () { return this.c.la; }, set: function (a) { this.c.lc = a; }, enumerable: false, configurable: true }); StackedSeriesCreatedEventArgs.$t = markType(StackedSeriesCreatedEventArgs, 'StackedSeriesCreatedEventArgs', EventArgs.$); return StackedSeriesCreatedEventArgs; }(EventArgs)); export { StackedSeriesCreatedEventArgs }; /** * @hidden */ var FragmentBase = /** @class */ /*@__PURE__*/ (function (_super) { __extends(FragmentBase, _super); function FragmentBase() { var _this = _super.call(this) || this; _this.___neverPassByValue = true; _this.ac4 = null; _this._logicalSeriesLink = null; _this.ac6 = null; _this.ac4 = new CategoryLineRasterizer(); return _this; } Object.defineProperty(FragmentBase.prototype, "logicalSeriesLink", { get: function () { return this._logicalSeriesLink; }, set: function (a) { this._logicalSeriesLink = a; }, enumerable: false, configurable: true }); Object.defineProperty(FragmentBase.prototype, "parentSeries", { get: function () { return this.ac6; }, set: function (a) { this.ac6 = a; }, enumerable: false, configurable: true }); FragmentBase.prototype.get_e7 = function () { return false; }; FragmentBase.prototype.get_isFragment = function () { return true; }; FragmentBase.prototype.ne = function () { if (this.logicalSeriesLink != null) { return this.logicalSeriesLink.e0; } return null; }; FragmentBase.prototype.j3 = function () { var a = this.parentSeries; if (a.index == -1 || a.aa8 == null || a.aa8.f.indexOf(this) == -1) { return -1; } return a.aa8.f.indexOf(this); }; FragmentBase.prototype.qc = function (a) { _super.prototype.qc.call(this, a); a.parentSeries = this.parentSeries; a.logicalSeriesLink = this.logicalSeriesLink; }; FragmentBase.prototype.j8 = function () { var a = this.parentSeries; if (a.index == -1 || a.series.count == 0 || a.series.indexOf(this.logicalSeriesLink) == -1) { return -1; } return a.series.indexOf(this.logicalSeriesLink); }; FragmentBase.prototype.resolveLegendIndex = function () { var a = this.parentSeries; if (a.abc) { return -1 + a.index + a.aa3.count - a.aa8.f.indexOf(this); } return _super.prototype.resolveLegendIndex.call(this); }; FragmentBase.prototype.bq = function () { return this.parentSeries; }; FragmentBase.prototype.yx = function () { if (this.parentSeries == null) { return null; } return this.parentSeries.fetchXAxis(); }; FragmentBase.prototype.ac3 = function () { if (this.parentSeries == null) { return this.y4; } return this.parentSeries.y4; }; FragmentBase.prototype.ze = function () { if (this.parentSeries == null) { return null; } return this.parentSeries.fetchYAxis(); }; FragmentBase.prototype.ac9 = function (a, b, c, d, e, f, g, h) { var i = c[0]; var j = c[1]; var k = new Rect(0, i - 5, j - 5, 11, 11); if (!isNaN_(i) && !isNaN_(j) && !isInfinity(i) && !isInfinity(j) && d.tryAdd(k)) { b.p.add({ $type: Point_$type, x: i, y: j }); a.updateMarkerTemplate(g, f, h); return true; } return false; }; FragmentBase.prototype.aap = function (a, b) { a.x(); if (this.valueColumn == null || this.parentSeries == null || this.logicalSeriesLink == null) { return; } if (this.logicalSeriesLink.a8.count == 0 || this.logicalSeriesLink.a7.count == 0) { return; } this.y5(b).d(a, b); }; FragmentBase.prototype.wh = function (a, b, c) { var _this = this; return this.wj(a, b, c, this.ac3().r(this.yx(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ze(), this.yx(), runOn(this, this.ada), function (d, e) { return _this.kc(d, e, _this.yx(), runOn(_this, _this.zy), _this.valueColumn != null ? new FragmentBaseValueList(_this) : null); }, function (d, e) { return _this.ka(d, e, _this.yx(), runOn(_this, _this.zy), _this.valueColumn != null ? new FragmentBaseValueList(_this) : null); }); }; FragmentBase.prototype.ai = function () { return [this.yx(), this.ze()]; }; FragmentBase.prototype.ada = function (a, b, c) { if (this.dc == null) { return NaN; } var d = this.getEffectiveViewport1(this.cw); var e = new ScalerParams(0, this.dc.wt, this.cw.b9, this.yx().ch, d); var f = this.y4.r(this.yx(), this.dc.wt, this.cw.b9, d); return this.i8(this.valueColumn != null ? new FragmentBaseValueList(this) : null, a, this.yx(), e, f, runOn(this, this.zy), b, c); }; FragmentBase.prototype.adc = function (a, b, c) { var d = this.abg(c); var e = d; var f = this.logicalSeriesLink.az; var g = f ? this.parentSeries.aa8.e : this.parentSeries.aa8.d; var h = this; if (this.bo != null) { h = this.bo; } var i = g.indexOf(h); if (a.count == 0) { return; } if (i == -1) { return; } var j = false; for (var k = i; k >= 0; k--) { if (j) { break; } if (k == 0) { 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 }); break; } var l = typeCast(FragmentBase.$, g._inner[k - 1]); if (l != null && l.ac4 != null && l.ac4.o.count > 0 && this.cw != null && l.hf(this.cw.b9, this.cw.ca, this.cw)) { j = true; for (var m = l.ac4.o.count - 1; m >= 0; m--) { a.add(l.ac4.o._inner[m]); } } } }; FragmentBase.prototype.hf = function (a, b, c) { var d = _super.prototype.hf.call(this, a, b, c); var e = typeCast(CategoryAxisBase.$, this.parentSeries.fetchXAxis()); var f = this.parentSeries.fetchYAxis(); if (this.parentSeries == null || e == null || e.itemsSource == null || f == null || this.parentSeries.dp == null || e.bi == null || f.bi == null) { d = false; } if (this.valueColumn == null) { return false; } if (isInfinity(this.valueColumn.minimum) && isInfinity(this.valueColumn.maximum)) { d = false; } if (isNaN_(this.valueColumn.minimum) && isNaN_(this.valueColumn.maximum)) { d = false; } return d; }; FragmentBase.prototype.abg = function (a) { var b = 0; var c = a.ca; var d = a.b9; var e = this.getEffectiveViewport1(a); var f = new ScalerParams(0, c, d, this.ze().ch, e); f.b = this.iz(); if (!c.isEmpty && !d.isEmpty && this.ze() != null) { b = this.ze().el(0, f); } return b; }; FragmentBase.prototype.ay = function (a) { return null; }; FragmentBase.prototype.adb = function () { if (this.parentSeries == null) { return -1; } var a = this.parentSeries.index; var b = 0; var c = 1; if (this.parentSeries.abc) { b = this.parentSeries.aa3.count - 1; c = -1; } for (var d = b; this.parentSeries.abc ? d >= 0 : d < this.parentSeries.aa3.count; d += c) { var e = this.parentSeries.aa3._inner[d]; if (e.visualSeriesLink == this) { return a; } if (this.parentSeries.a5 == null || e.lt != 0 || e.ls != 0) { continue; } a++; } return -1; }; FragmentBase.prototype.add = function (a) { if (a == null) { } }; FragmentBase.prototype.rc = function (a, b, c, d) { _super.prototype.rc.call(this, a, b, c, d); if (this.parentSeries == null) { return; } var e = typeCast(NumericAxisBase.$, this.parentSeries.fetchYAxis()); if (e == null) { return; } switch (b) { case "ValueColumn": if (this.aa2.dl) { this.aa2.dk.g$m(); } if (e != null && !e.c1()) { this.parentSeries.aa2().c9.g(this.ie); this.ru(this.gh && this.d9); } break; case "ActualBrush": if (this.logicalSeriesLink != null) { this.logicalSeriesLink.ku = this.ve; } break; } }; FragmentBase.prototype.rw = function (a, b) { _super.prototype.rw.call(this, a, b); }; Object.defineProperty(FragmentBase.prototype, "useHighMarkerFidelity", { get: function () { return this.zv; }, enumerable: false, configurable: true }); FragmentBase.$t = markType(FragmentBase, 'FragmentBase', HorizontalAnchoredCategorySeries.$); return FragmentBase; }(HorizontalAnchoredCategorySeries)); export { FragmentBase }; /** * @hidden */ var AreaFragment = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AreaFragment, _super); function AreaFragment() { var _this = _super.call(this) || this; _this.ab = AreaFragment.$; return _this; } AreaFragment.prototype.bk = function () { return new AreaFragment(); }; AreaFragment.prototype.ct = function () { return new AreaFragmentView(this); }; AreaFragment.prototype.q3 = function (a) { _super.prototype.q3.call(this, a); this.ade = a; }; AreaFragment.prototype.get_ex = function () { return true; }; AreaFragment.prototype.get_ew = function () { return true; }; AreaFragment.prototype.y9 = function () { return 1; }; AreaFragment.prototype.adg = function (a, b) { var c = this.ade.dz.an; if (this.gz(a, c)) { return true; } var d = this.ade.d0.an; if (this.gz(a, d)) { return true; } return false; }; AreaFragment.prototype.gx = function (a, b) { if (this.adf(a, b)) { return true; } if (this.adg(a, b)) { return true; } if (this.xm(a, b)) { return true; } return false; }; AreaFragment.prototype.adf = function (a, b) { var c = this.ade.d1.an; if (this.gy(a, b, c)) { return true; } var d = this.ade.d2.an; if (this.gy(a, b, d)) { return true; } return false; }; AreaFragment.prototype.preferredCategoryMode = function (a) { return 0; }; AreaFragment.prototype.o7 = function (a, b) { _super.prototype.o7.call(this, a, b); var c = b; c.du(); }; AreaFragment.prototype.aas = function (a, b) { var _this = this; _super.prototype.aas.call(this, a, b); this.ac4.a = typeCast(ISortingAxis_$type, this.xAxis) !== null ? true : false; var c = typeCast(AreaFragmentView.$, b); var d = a.h; var e = this.getEffectiveViewport1(c); this.y7.a2(this, this.zr(), runOn(this, this.yr), this.z0(b), this.z1(b)); var f = false; var g = this.y7.b; if (g != null) { f = true; } if (f) { var h = new ScalerParams(0, b.ca, b.b9, this.ack.ch, e); this.aao(d, -1, this.valueColumn.count, this.ack, h, b.t, -1); } this.y7.ad(c.d1, true, false, true, true); this.y7.ad(c.d2, true, false, true, true); this.y7.ad(c.dz, false, true, false, false); this.y7.ad(c.d0, false, true, false, false); var i = c.c9.d; this.ac4.i(c.dz, c.d1, c.d0, c.d2, a.h.count, a.h, true, i, this.ie, function (j, k, l, m, n) { return _this.adc(j, a.h, b); }, 0); c.dz._opacity = this.y7.j * this.ia; c.d0._opacity = 0.5 * this.y7.j * this.ia; }; AreaFragment.prototype.sh = function () { var a = (typeCast(XamDataChart.$, this.dc)); if (a != null) { this.ia = isNaN_(this.il) ? this.parentSeries.ia : this.il; } }; Object.defineProperty(AreaFragment.prototype, "useHighMarkerFidelity", { get: function () { return this.zv; }, enumerable: false, configurable: true }); AreaFragment.$t = markType(AreaFragment, 'AreaFragment', FragmentBase.$); return AreaFragment; }(FragmentBase)); export { AreaFragment }; /** * @hidden */ var ColumnFragment = /** @class */ /*@__PURE__*/ (function (_super) { __extends(ColumnFragment, _super); function ColumnFragment() { var _this = _super.call(this) || this; _this.ab = ColumnFragment.$; return _this; } ColumnFragment.prototype.bk = function () { return new ColumnFragment(); }; ColumnFragment.prototype.get_e1 = function () { return true; }; ColumnFragment.prototype.get_fm = function () { return true; }; ColumnFragment.prototype.jl = function () { if (!isNaN_(this.jk)) { return _super.prototype.jl.call(this); } return Defaults.h; }; ColumnFragment.prototype.y9 = function () { return 1; }; ColumnFragment.prototype.ct = function () { return new ColumnFragmentView(this); }; ColumnFragment.prototype.q3 = function (a) { _super.prototype.q3.call(this, a); this.adf = a; }; Object.defineProperty(ColumnFragment.prototype, "fragmentXAxis", { get: function () { return this.parentSeries != null ? typeCast(CategoryAxisBase.$, this.parentSeries.fetchXAxis()) : null; }, enumerable: false, configurable: true }); Object.defineProperty(ColumnFragment.prototype, "fragmentYAxis", { get: function () { return this.parentSeries != null ? typeCast(NumericYAxis.$, this.parentSeries.fetchYAxis()) : null; }, enumerable: false, configurable: true }); ColumnFragment.prototype.preferredCategoryMode = function (a) { return 2; }; ColumnFragment.prototype.yx = function () { return this.fragmentXAxis; }; ColumnFragment.prototype.ze = function () { return this.fragmentYAxis; }; ColumnFragment.prototype.get_ef = function () { return true; }; ColumnFragment.prototype.fetchXAxis = function () { return null; }; ColumnFragment.prototype.fetchYAxis = function () { return null; }; ColumnFragment.prototype.o7 = function (a, b) { _super.prototype.o7.call(this, a, b); var c = b; if (a && c.du != null) { this.yz.p.clear(); c.du.count = 0; } }; ColumnFragment.prototype.ay = function (a) { if (this.valueColumn == null || this.valueColumn.count == 0) { return null; } return new AxisRange(this.valueColumn.minimum, this.valueColumn.maximum); }; ColumnFragment.prototype.hf = function (a, b, c) { if (this.parentSeries == null) { return false; } return this.parentSeries.abd(this, a, b, this.adh(c)); }; ColumnFragment.prototype.hc = function () { return true; }; ColumnFragment.prototype.z0 = function (a) { if (this.parentSeries != null) { return this.parentSeries.z0(this.parentSeries.cw); } return _super.prototype.z0.call(this, a); }; ColumnFragment.prototype.z1 = function (a) { if (this.parentSeries != null) { return this.parentSeries.z1(this.parentSeries.cw); } return _super.prototype.z0.call(this, a); }; ColumnFragment.prototype.z2 = function (a) { if (this.parentSeries != null) { return this.parentSeries.z2(this.parentSeries.cw); } return _super.prototype.z2.call(this, a); }; ColumnFragment.prototype.ws = function (a) { if (this.yx() == null || this.fragmentYAxis == null) { return Rect.empty; } var b = this.wc(a); var c = this.cw.ca; var d = this.cw.b9; var e = this.getEffectiveViewport1(this.cw); var f = new ScalerParams(0, c, d, this.fragmentYAxis.ch, e); var g = this.an(this.yx(), this.yz.h, this.z0(this.cw), this.z1(this.cw), a, true); if (g == null) { return Rect.empty; } var h = g[0]; var i = g[1]; var j = Math.abs(b.x - h[0]); var k = Math.abs(b.x - i[0]); var l = this.yx().k8(c, d, e); if (j < k) { var m = h[0] - 0.5 * l; var n = h[1]; var o = h[2]; return new Rect(0, m, Math.min(n, o), l, Math.max(n, o) - Math.min(n, o)); } else { var p = i[0] - 0.5 * l; var q = i[1]; var r = i[2]; return new Rect(0, p, Math.min(q, r), l, Math.max(q, r) - Math.min(q, r)); } }; ColumnFragment.prototype.gx = function (a, b) { if (this.g0(a, b)) { return true; } if (this.xm(a, b)) { return true; } return false; }; ColumnFragment.prototype.g0 = function (a, b) { var c = this.wt(a); if (c.isEmpty) { return false; } var d = this.ado(c, this.iv(b)); return d.containsPoint(a); }; ColumnFragment.prototype.ado = function (a, b) { var c = a.left + a.width / 2; var d = a.top + a.height / 2; var e = c - ((a.width / 2) + b); var f = d - (a.height / 2); var g = a.height; var h = a.width + b * 2; return new Rect(0, e, f, h, g); }; ColumnFragment.prototype.ky = function (a, b) { var c = typeCast(FrameworkElement.$, a); var d = c != null ? typeCast(DataContext.$, c.dataContext) : null; var e = d != null ? d.item : null; if (e == null) { var f = this.cw.b9; var g = this.dc != null ? this.dc.wt : Rect.empty; var h = { $type: Point_$type, x: g.left + g.width * (b.x - f.left) / f.width, y: g.top + g.height * (b.y - f.top) / f.height }; e = this.ko(h); } return e; }; ColumnFragment.prototype.ko = function (a) { var b = 0; if (typeCast(ISortingAxis_$type, this.yx()) !== null) { b = this.j6(a); if (b == -1) { return null; } } else { b = this.j4(a); } return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; }; ColumnFragment.prototype.j6 = function (a) { var b = this.cw.ca; var c = this.cw.b9; var d = this.getEffectiveViewport1(this.cw); if (b.isEmpty || c.isEmpty) { return -1; } var e = this.yx(); var f = new ScalerParams(0, b, c, e.ch, d); var g = typeCast(ISortingAxis_$type, this.fragmentXAxis); var h = this.wo(this.cw); var i = e.eo(h.left, f); var j = e.eo(h.right, f); var k = (a.x - b.left) / b.width; var l = i + ((j - i) * k); if (truncate(l) <= dateMinValue().getTime() || truncate(l) >= dateMaxValue().getTime()) { return -1; } var m = g.i$f(l); return m; }; ColumnFragment.prototype.j4 = function (a) { if (this.parentSeries == null) { return -1; } return this.parentSeries.abk(a); }; ColumnFragment.prototype.ac9 = function (a, b, c, d, e, f, g, h) { var i = 0; var j = c[0]; var k = e < i ? c[2] : c[1]; var l = new Rect(0, j - 5, k - 5, 11, 11); if (!isNaN_(j) && !isNaN_(k) && !isInfinity(j) && !isInfinity(k) && d.tryAdd(l)) { b.p.add({ $type: Point_$type, x: j, y: k }); a.updateMarkerTemplate(g, f, h); return true; } return false; }; ColumnFragment.prototype.adh = function (a) { if (a.s) { return this.parentSeries.ba.a$j.item(a.al); } else if (a == this.cv) { return this.parentSeries.cv; } else { return this.parentSeries.y8; } }; ColumnFragment.prototype.rt = function (a, b, c, d, e) { this.ba.a$z(this, a, b, d, e); var f = this.ba.a$j.item(d); var g = f; f.bd(c); var h = this.adh(f); h.c9.g(this.ie); 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); }; ColumnFragment.prototype.aap = function (a, b) { a.x(); if (this.valueColumn == null || this.parentSeries == null || this.logicalSeriesLink == null || this.logicalSeriesLink.a7.count == 0 || this.logicalSeriesLink.a8.count == 0) { return; } var c; if (b.s) { c = this.parentSeries.aa1; } else if (b == this.cv) { c = this.parentSeries.y2; } else { c = this.parentSeries.yz; } var d = typeCast(CategorySeriesView.$, this.adh(b)); a.h.clear(); if (a.o != null) { a.o.clear(); } a.p.clear(); var e = d.c9.e; var f = d.c9.f; var g = this.parentSeries.y4.h.yScaler; var h = typeCast(ISortingAxis_$type, this.parentSeries.y4.h.scaler); var i = typeCast(NumericAxisBase.$, g) !== null && g.lp; var j = typeCast(StackedBucketCalculator.$, d.c9); var k = d.c9.d; var l = 0; if (e <= f) { for (var m = e; m <= f; m++) { var n = m * k; if (this._visibility != 0) { break; } if (m >= this.valueColumn.count || m >= c.h.count + e) { continue; } var o = this.valueColumn.item(m); var p = !i || (i && o > 0); var q = void 0; if (h == null) { q = j.getBucket1(this, m, m, b.ca, b.b9, c); } else { q = j.getBucket1(this, m, h.i$b._inner[m], b.ca, b.b9, c); } a.h.add(q); if (h != null) { if (a.o == null) { a.o = new List$1(Number_$type, 0); } a.o.add(n); } if (p) { if (this.ac9(b, a, q, this.y4.h.provideCollisionDetector(), o, n, l, a.h.count - 1)) { l++; } } } } b.dc.count = l; }; ColumnFragment.prototype.aas = function (a, b) { _super.prototype.aas.call(this, a, b); if (this.parentSeries == null) { return; } this.parentSeries.abt(this, a, b, runOn(this, this.yr)); CategoryMarkerManager.e(this, a.p, b.dc, this.xn); }; ColumnFragment.prototype.rc = function (a, b, c, d) { _super.prototype.rc.call(this, a, b, c, d); }; Object.defineProperty(ColumnFragment.prototype, "useHighMarkerFidelity", { get: function () { return this.zv; }, enumerable: false, configurable: true }); ColumnFragment.$t = markType(ColumnFragment, 'ColumnFragment', FragmentBase.$); ColumnFragment.$$p = markDep(DependencyProperty, PropertyMetadata, ColumnFragment, 'raisePropertyChanged', ['RadiusX:adi:adm', [1, 0], 'RadiusY:adj:adn', [1, 0]]); return ColumnFragment; }(FragmentBase)); export { ColumnFragment }; /** * @hidden */ var BarFragment = /** @class */ /*@__PURE__*/ (function (_super) { __extends(BarFragment, _super); function BarFragment() { var _this = _super.call(this) || this; _this.ab = BarFragment.$; return _this; } BarFragment.prototype.get_ez = function () { return true; }; BarFragment.prototype.get_fm = function () { return true; }; BarFragment.prototype.get_e1 = function () { return false; }; BarFragment.prototype.y9 = function () { return 1; }; Object.defineProperty(BarFragment.prototype, "barFragmentXAxis", { get: function () { return this.parentSeries != null ? this.parentSeries.xAxis : null; }, enumerable: false, configurable: true }); Object.defineProperty(BarFragment.prototype, "barFragmentYAxis", { get: function () { return this.parentSeries != null ? this.parentSeries.yAxis : null; }, enumerable: false, configurable: true }); BarFragment.prototype.yx = function () { if (this.parentSeries == null) { return null; } return this.parentSeries.fetchYAxis(); }; BarFragment.prototype.get_isVertical = function () { return true; }; BarFragment.prototype.is = function (a) { var b = this.dc != null ? this.dc.wt : Rect.empty; var c = this.cw.b9; var d = this.wo(this.cw); var e = this.getEffectiveViewport1(this.cw); var f = this.yx(); var g = -1; if (f != null && !b.isEmpty && !c.isEmpty) { var h = new ScalerParams(0, b, c, f.ch, e); var i = f.eo(d.top, h); var j = f.eo(d.bottom, h); var k = (a.y - b.top) / b.height; var l = i + (k * (j - i)); if (f.categoryMode != 0) { l -= 0.5; } g = l; } return g; }; BarFragment.prototype.ze = function () { if (this.parentSeries == null) { return null; } return this.parentSeries.ze(); }; BarFragment.prototype.ado = function (a, b) { var c = a.left + a.width / 2; var d = a.top + a.height / 2; var e = c - (a.width / 2); var f = d - ((a.height / 2) + b); var g = a.height + b * 2; var h = a.width; return new Rect(0, e, f, h, g); }; BarFragment.prototype.ws = function (a) { if (this.yx() == null) { return Rect.empty; } var b = this.wc(a); var c = this.cw.ca; var d = this.cw.b9; var e = this.getEffectiveViewport1(this.cw); var f = this.yx(); var g = new ScalerParams(0, c, d, f.ch, e); var h = this.an(this.yx(), this.yz.h, this.z0(this.cw), this.z1(this.cw), a, true); if (h == null) { return Rect.empty; } var i = h[0]; var j = h[1]; var k = Math.abs(b.y - i[0]); var l = Math.abs(b.y - j[0]); var m = f.k8(c, d, e); if (k < l) { var n = i[0] - 0.5 * m; var o = i[2]; var p = i[1]; return new Rect(0, o, n, Math.max(p, o) - Math.min(p, o), m); } else { var q = j[0] - 0.5 * m; var r = j[2]; var s = j[1]; return new Rect(0, r, q, Math.max(s, r) - Math.min(s, r), m); } }; BarFragment.prototype.gx = function (a, b) { if (this.g0(a, b)) { return true; } if (this.xm(a, b)) { return true; } return false; }; BarFragment.prototype.ac9 = function (a, b, c, d, e, f, g, h) { var i = c[0]; var j = e < 0 ? c[2] : c[1]; var k = new Rect(0, j - 5, i - 5, 11, 11); if (!isNaN_(j) && !isNaN_(i) && !isInfinity(j) && !isInfinity(i) && d.tryAdd(k)) { b.p.add({ $type: Point_$type, x: j, y: i }); a.updateMarkerTemplate(g, f, h); return true; } return false; }; BarFragment.prototype.ko = function (a) { var b = 0; if (typeCast(ISortingAxis_$type, this.barFragmentYAxis) !== null) { b = this.j6(a); if (b == -1) { return null; } } else { b = this.j4(a); } return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; }; BarFragment.prototype.j6 = function (a) { var b = this.cw.ca; var c = this.cw.b9; if (b.isEmpty || c.isEmpty) { return -1; } var d = this.getEffectiveViewport1(this.cw); var e = new ScalerParams(0, b, c, this.barFragmentYAxis.ch, d); var f = typeCast(ISortingAxis_$type, this.barFragmentYAxis); var g = this.wo(this.cw); var h = this.barFragmentYAxis.eo(g.top, e); var i = this.barFragmentYAxis.eo(g.bottom, e); var j = (a.y - b.top) / b.height; var k = h + ((i - h) * j); if (truncate(k) <= dateMinValue().getTime() || truncate(k) >= dateMaxValue().getTime()) { return -1; } var l = f.i$f(k); return l; }; BarFragment.prototype.abg = function (a) { var b = 0; var c = a.ca; var d = a.b9; var e = this.getEffectiveViewport1(a); var f = new ScalerParams(0, c, d, this.barFragmentXAxis.ch, e); if (!c.isEmpty && !d.isEmpty && this.barFragmentXAxis != null) { b = this.barFragmentXAxis.el(0, f); } return b; }; BarFragment.prototype.rc = function (a, b, c, d) { _super.prototype.rc.call(this, a, b, c, d); if (this.parentSeries == null || this.barFragmentXAxis == null) { return; } var e = this.barFragmentXAxis; switch (b) { case "ValueColumn": if (this.aa2.dl) { this.aa2.dk.g$m(); } if (e != null && !e.c1()) { this.parentSeries.aa2().c9.g(this.ie); this.ru(this.gh && this.d9); } break; } }; Object.defineProperty(BarFragment.prototype, "useHighMarkerFidelity", { get: function () { return this.zv; }, enumerable: false, configurable: true }); BarFragment.$t = markType(BarFragment, 'BarFragment', ColumnFragment.$); return BarFragment; }(ColumnFragment)); export { BarFragment }; /** * @hidden */ var AreaFragmentBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(AreaFragmentBucketCalculator, _super); function AreaFragmentBucketCalculator(a) { return _super.call(this, a) || this; } AreaFragmentBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) { return this.getBucket(a); }; AreaFragmentBucketCalculator.prototype.getBucket = function (a) { var b = Math.min(a * this.d, this.i.di.valueColumn.count - 1); var c = Math.min(b + this.d - 1, this.i.di.valueColumn.count - 1); var d = NaN; var e = NaN; var f = this.i.di; var g = f.parentSeries; var h = typeCast(IStacked100Series_$type, g) !== null; var i = this.i.di.valueColumn; var j = g.aaz; var k = g.aa0; var l = f.logicalSeriesLink.a8; var m = f.logicalSeriesLink.a7; for (var n = b; n <= c; ++n) { var o = i.item(n); if (isNaN_(o) || isInfinity(o)) { o = 0; } var p = Math.abs(k[n]) + j[n]; if (h) { if (p == 0) { o = 0; } else if (o < 0) { o = (l._inner[n] + o) / p * 100; } else { o = (m._inner[n] + o) / p * 100; } } else { o = o < 0 ? l._inner[n] + o : m._inner[n] + o; } if (!isNaN_(d)) { if (!isNaN_(o)) { d = Math.min(d, o); e = Math.max(e, o); } } else { d = o; e = o; } } if (!isNaN_(d)) { return [0.5 * (b + c), d, e]; } return [0.5 * (b + c), NaN, NaN]; }; AreaFragmentBucketCalculator.$t = markType(AreaFragmentBucketCalculator, 'AreaFragmentBucketCalculator', AnchoredCategoryBucketCalculator.$); return AreaFragmentBucketCalculator; }(AnchoredCategoryBucketCalculator)); export { AreaFragmentBucketCalculator }; /** * @hidden */ var LineFragmentBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(LineFragmentBucketCalculator, _super); function LineFragmentBucketCalculator(a) { return _super.call(this, a) || this; } LineFragmentBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) { return this.getBucket(a); }; LineFragmentBucketCalculator.prototype.getBucket = function (a) { var b = Math.min(a * this.d, this.i.di.valueColumn.count - 1); var c = Math.min(b + this.d - 1, this.i.di.valueColumn.count - 1); var d = NaN; var e = NaN; var f = typeCast(FragmentBase.$, this.i.di); var g = f.parentSeries; for (var h = b; h <= c; ++h) { var i = this.i.di.valueColumn.item(h); var j = Math.abs(g.aa0[h]) + g.aaz[h]; if (isNaN_(i) || isInfinity(i)) { i = 0; } if (typeCast(IStacked100Series_$type, g) !== null) { if (j == 0) { i = 0; } else if (i < 0) { i = (f.logicalSeriesLink.a8._inner[h] + i) / j * 100; } else { i = (f.logicalSeriesLink.a7._inner[h] + i) / j * 100; } } else { i = i < 0 ? f.logicalSeriesLink.a8._inner[h] + i : f.logicalSeriesLink.a7._inner[h] + i; } if (!isNaN_(d)) { if (!isNaN_(i)) { d = Math.min(d, i); e = Math.max(e, i); } } else { d = i; e = i; } } if (!isNaN_(d)) { return [0.5 * (b + c), d, e]; } return [0.5 * (b + c), NaN, NaN]; }; LineFragmentBucketCalculator.$t = markType(LineFragmentBucketCalculator, 'LineFragmentBucketCalculator', AnchoredCategoryBucketCalculator.$); return LineFragmentBucketCalculator; }(AnchoredCategoryBucketCalculator)); export { LineFragmentBucketCalculator }; /** * @hidden */ var SplineFragmentBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(SplineFragmentBucketCalculator, _super); function SplineFragmentBucketCalculator(a) { return _super.call(this, a) || this; } SplineFragmentBucketCalculator.prototype.getBucket = function (a) { var b = Math.min(a * this.d, this.i.di.valueColumn.count - 1); var c = Math.min(b + this.d - 1, this.i.di.valueColumn.count - 1); var d = NaN; var e = NaN; var f = typeCast(SplineFragmentBase.$, this.i.di); var g = f.parentSeries; for (var h = b; h <= c; ++h) { var i = this.i.di.valueColumn.item(h); var j = Math.abs(g.aa0[h]) + g.aaz[h]; if (isNaN_(i) || isInfinity(i)) { i = 0; } if (typeCast(IStacked100Series_$type, g) !== null) { if (j == 0) { i = 0; } else if (i < 0) { i = (f.logicalSeriesLink.a8._inner[h] + i) / j * 100; } else { i = (f.logicalSeriesLink.a7._inner[h] + i) / j * 100; } } else { i = i < 0 ? f.logicalSeriesLink.a8._inner[h] + i : f.logicalSeriesLink.a7._inner[h] + i; } if (!isNaN_(d)) { if (!isNaN_(i)) { d = Math.min(d, i); e = Math.max(e, i); } } else { d = i; e = i; } } if (!isNaN_(d)) { return [0.5 * (b + c), d, e]; } return [0.5 * (b + c), NaN, NaN]; }; SplineFragmentBucketCalculator.$t = markType(SplineFragmentBucketCalculator, 'SplineFragmentBucketCalculator', AnchoredCategoryBucketCalculator.$); return SplineFragmentBucketCalculator; }(AnchoredCategoryBucketCalculator)); export { SplineFragmentBucketCalculator }; /** * @hidden */ var StackedBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) { __extends(StackedBucketCalculator, _super); function StackedBucketCalculator(a) { return _super.call(this, a) || this; } StackedBucketCalculator.prototype.getBucket = function (a) { var b = typeCast(StackedSeriesBase.$, this.c.db); var c = Math.min(b.aa0 != null ? b.aa0.length : 0, b.aaz != null ? b.aaz.length : 0); var d = Math.min(a * this.d, c - 1); var e = Math.min(d + this.d - 1, c - 1); var f = NaN; var g = NaN; for (var h = d; h <= e; ++h) { var i = Math.min(b.aa0[h], b.aaz[h]); var j = Math.max(b.aa0[h], b.aaz[h]); if (!isNaN_(f)) { if (!isNaN_(i)) { f = Math.min(f, i); g = Math.max(g, i); } if (!isNaN_(j)) { f = Math.min(f, j); g = Math.max(g, j); } } else { f = i; g = j; } } if (!isNaN_(f) && !isNaN_(g)) { return [0.5 * (d + e), f, g]; } return [NaN, NaN, NaN]; }; StackedBucketCalculator.prototype.getBucket1 = function (a, b, c, d, e, f) { return null; }; StackedBucketCalculator.$t = markType(StackedBucketCalculator, 'StackedBucketCalculator', CategoryBucketCalculator.$); return StackedBucketCalculator; }(CategoryBucketCalculator)); export { StackedBucketCalculator }; /** * @hidden */ var StackedBarBucketCalculator = /** @cla