UNPKG

igniteui-angular-charts

Version:

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

1,406 lines 233 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 { 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-angular-core"; import { Brush } from "igniteui-angular-core"; import { DataTemplate } from "igniteui-angular-core"; import { Visibility_$type } from "igniteui-angular-core"; import { DoubleCollection } from "igniteui-angular-core"; import { PenLineCap_$type } from "igniteui-angular-core"; import { Style } from "igniteui-angular-core"; import { MarkerType_$type } from "./MarkerType"; import { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries"; import { CategoryLineRasterizer } from "./CategoryLineRasterizer"; import { Series } from "./Series"; import { List$1 } from "igniteui-angular-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-angular-core"; import { CategorySeriesView } from "./CategorySeriesView"; import { Axis } from "./Axis"; import { ScalerParams } from "./ScalerParams"; import { ObservableCollection$1 } from "igniteui-angular-core"; import { AxisRange } from "./AxisRange"; import { AnchoredCategorySeriesView } from "./AnchoredCategorySeriesView"; import { CategoryBucketCalculator } from "./CategoryBucketCalculator"; import { isNaN_, isInfinity, truncate } from "igniteui-angular-core"; import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode"; import { Path } from "igniteui-angular-core"; import { ISortingAxis_$type } from "./ISortingAxis"; import { FrameworkElement } from "igniteui-angular-core"; import { XamDataChart } from "./XamDataChart"; import { DependencyProperty } from "igniteui-angular-core"; import { DependencyObject } from "igniteui-angular-core"; import { NumericYAxis } from "./NumericYAxis"; import { Defaults } from "./Defaults"; import { Pool$1 } from "igniteui-angular-core"; import { Rectangle } from "igniteui-angular-core"; import { DataContext } from "igniteui-angular-core"; import { Dictionary$2 } from "igniteui-angular-core"; import { IScaler_$type } from "./IScaler"; import { IIsCategoryBased_$type } from "./IIsCategoryBased"; import { CategoryMarkerManager } from "./CategoryMarkerManager"; import { PropertyMetadata } from "igniteui-angular-core"; import { dateMinValue, dateMaxValue } from "igniteui-angular-core"; import { NumericXAxis } from "./NumericXAxis"; import { CategoryYAxis } from "./CategoryYAxis"; import { AnchoredCategoryBucketCalculator } from "./AnchoredCategoryBucketCalculator"; import { IStacked100Series_$type } from "./IStacked100Series"; import { NotImplementedException } from "igniteui-angular-core"; import { SplineSeriesBase } from "./SplineSeriesBase"; import { CollisionAvoider } from "./CollisionAvoider"; import { SafeSortedReadOnlyDoubleCollection } from "./SafeSortedReadOnlyDoubleCollection"; import { Numeric } from "igniteui-angular-core"; import { ICategoryScaler_$type } from "./ICategoryScaler"; import { ChartSelection } from "./ChartSelection"; import { CategoryXAxis } from "./CategoryXAxis"; import { IBarSeries_$type } from "./IBarSeries"; import { Color } from "igniteui-angular-core"; import { LegendItemBadgeShape_$type } from "igniteui-angular-core"; import { LegendItemBadgeMode_$type } from "igniteui-angular-core"; import { MarkerFillMode_$type } from "./MarkerFillMode"; import { MarkerOutlineMode_$type } from "./MarkerOutlineMode"; import { SeriesOutlineMode_$type } from "./SeriesOutlineMode"; import { SeriesHighlightedValuesDisplayMode_$type } from "igniteui-angular-core"; import { TransitionInSpeedType_$type } from "./TransitionInSpeedType"; import { PropertyUpdatedEventArgs } from "igniteui-angular-core"; import { DataLegendSeriesValueInfo } from "igniteui-angular-core"; import { DataLegendSeriesContext } from "igniteui-angular-core"; import { SingleValuesHolder } from "./SingleValuesHolder"; import { stringIsNullOrEmpty } from "igniteui-angular-core"; import { SplineSeriesBaseView } from "./SplineSeriesBaseView"; import { Canvas } from "igniteui-angular-core"; import { Panel } from "igniteui-angular-core"; import { PlatformConstants } from "igniteui-angular-core"; /** * @hidden */ export let StackedSeriesCreatedEventArgs = /*@__PURE__*/ (() => { class StackedSeriesCreatedEventArgs extends EventArgs { constructor(a) { super(); this.c = null; this.c = a; } get brush() { return this.c.kz; } set brush(a) { this.c.kz = a; } get legendItemTemplate() { return this.c.hr; } set legendItemTemplate(a) { this.c.hr = a; } get legendItemBadgeTemplate() { return this.c.hq; } set legendItemBadgeTemplate(a) { this.c.hq = a; } get legendItemVisibility() { return this.c.lu; } set legendItemVisibility(a) { this.c.lu = a; } get outline() { return this.c.k3; } set outline(a) { this.c.k3 = a; } get dashArray() { return this.c.k8; } set dashArray(a) { this.c.k8 = a; } get dashCap() { return this.c.lb; } set dashCap(a) { this.c.lb = a; } get index() { return this.c.cc; } get thickness() { return this.c.b4; } set thickness(a) { this.c.b4 = a; } get title() { return this.c.cj; } set title(a) { this.c.cj = a; } get transitionDuration() { return this.c.cd; } set transitionDuration(a) { this.c.cd = a; } get transitionEasingFunction() { return this.c.ai; } set transitionEasingFunction(a) { this.c.ai = a; } get markerBrush() { return this.c.k0; } set markerBrush(a) { this.c.k0 = a; } get markerOutline() { return this.c.k1; } set markerOutline(a) { this.c.k1 = a; } get markerStyle() { return this.c.lr; } set markerStyle(a) { this.c.lr = a; } get markerTemplate() { return this.c.hs; } set markerTemplate(a) { this.c.hs = a; } get markerType() { return this.c.x; } set markerType(a) { this.c.x = a; } get markerThickness() { return this.c.bx; } set markerThickness(a) { this.c.bx = a; } get lineCap() { return this.c.la; } set lineCap(a) { this.c.lc = a; } } StackedSeriesCreatedEventArgs.$t = markType(StackedSeriesCreatedEventArgs, 'StackedSeriesCreatedEventArgs', EventArgs.$); return StackedSeriesCreatedEventArgs; })(); /** * @hidden */ export let FragmentBase = /*@__PURE__*/ (() => { class FragmentBase extends HorizontalAnchoredCategorySeries { constructor() { super(); this.___neverPassByValue = true; this.acw = null; this._logicalSeriesLink = null; this.acy = null; this.acw = new CategoryLineRasterizer(); } get logicalSeriesLink() { return this._logicalSeriesLink; } set logicalSeriesLink(a) { this._logicalSeriesLink = a; } get parentSeries() { return this.acy; } set parentSeries(a) { this.acy = a; } get_e5() { return false; } get_isFragment() { return true; } nb() { if (this.logicalSeriesLink != null) { return this.logicalSeriesLink.e0; } return null; } j1() { let a = this.parentSeries; if (a.index == -1 || a.aa0 == null || a.aa0.f.indexOf(this) == -1) { return -1; } return a.aa0.f.indexOf(this); } p9(a) { super.p9(a); a.parentSeries = this.parentSeries; a.logicalSeriesLink = this.logicalSeriesLink; } j6() { let 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); } resolveLegendIndex() { let a = this.parentSeries; if (a.aa4) { return -1 + a.index + a.aav.count - a.aa0.f.indexOf(this); } return super.resolveLegendIndex(); } bp() { return this.parentSeries; } yr() { if (this.parentSeries == null) { return null; } return this.parentSeries.fetchXAxis(); } acv() { if (this.parentSeries == null) { return this.yy; } return this.parentSeries.yy; } y8() { if (this.parentSeries == null) { return null; } return this.parentSeries.fetchYAxis(); } ac1(a, b, c, d, e, f, g, h) { let i = c[0]; let j = c[1]; let k = new Rect(0, i - 5, j - 5, 11, 11); if (!isNaN_(i) && !isNaN_(j) && !isInfinity(i) && !isInfinity(j) && d.tryAdd(k)) { b.n.add({ $type: Point_$type, x: i, y: j }); a.updateMarkerTemplate(g, f, h); return true; } return false; } aag(a, b) { a.v(); if (this.valueColumn == null || this.parentSeries == null || this.logicalSeriesLink == null) { return; } if (this.logicalSeriesLink.a8.count == 0 || this.logicalSeriesLink.a7.count == 0) { return; } this.yz(b).d(a, b); } wb(a, b, c) { return this.wd(a, b, c, this.acv().r(this.yr(), this.cv.by, this.cv.bx, this.getEffectiveViewport1(this.cv)), this.y8(), this.yr(), runOn(this, this.ac2), (d, e) => this.ka(d, e, this.yr(), runOn(this, this.zs), this.valueColumn != null ? new FragmentBaseValueList(this) : null), (d, e) => this.j8(d, e, this.yr(), runOn(this, this.zs), this.valueColumn != null ? new FragmentBaseValueList(this) : null)); } ai() { return [this.yr(), this.y8()]; } ac2(a, b, c) { if (this.db == null) { return NaN; } let d = this.getEffectiveViewport1(this.cv); let e = new ScalerParams(0, this.db.v4, this.cv.bx, this.yr().ch, d); let f = this.yy.r(this.yr(), this.db.v4, this.cv.bx, d); return this.i6(this.valueColumn != null ? new FragmentBaseValueList(this) : null, a, this.yr(), e, f, runOn(this, this.zs), b, c); } ac4(a, b, c) { let d = this.aa8(c); let e = d; let f = this.logicalSeriesLink.az; let g = f ? this.parentSeries.aa0.e : this.parentSeries.aa0.d; let h = this; if (this.bn != null) { h = this.bn; } let i = g.indexOf(h); if (a.count == 0) { return; } if (i == -1) { return; } let j = false; for (let 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; } let l = typeCast(FragmentBase.$, g._inner[k - 1]); if (l != null && l.acw != null && l.acw.o.count > 0 && this.cv != null && l.hd(this.cv.bx, this.cv.by, this.cv)) { j = true; for (let m = l.acw.o.count - 1; m >= 0; m--) { a.add(l.acw.o._inner[m]); } } } } hd(a, b, c) { let d = super.hd(a, b, c); let e = typeCast(CategoryAxisBase.$, this.parentSeries.fetchXAxis()); let f = this.parentSeries.fetchYAxis(); if (this.parentSeries == null || e == null || e.itemsSource == null || f == null || this.parentSeries.dn == 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; } aa8(a) { let b = 0; let c = a.by; let d = a.bx; let e = this.getEffectiveViewport1(a); let f = new ScalerParams(0, c, d, this.y8().ch, e); f.b = this.ix(); if (!c.isEmpty && !d.isEmpty && this.y8() != null) { b = this.y8().el(0, f); } return b; } ay(a) { return null; } ac3() { if (this.parentSeries == null) { return -1; } let a = this.parentSeries.index; let b = 0; let c = 1; if (this.parentSeries.aa4) { b = this.parentSeries.aav.count - 1; c = -1; } for (let d = b; this.parentSeries.aa4 ? d >= 0 : d < this.parentSeries.aav.count; d += c) { let e = this.parentSeries.aav._inner[d]; if (e.visualSeriesLink == this) { return a; } if (this.parentSeries.a5 == null || e.lt != 0 || e.ls != 0) { continue; } a++; } return -1; } ac5(a) { if (a == null) { } } q8(a, b, c, d) { super.q8(a, b, c, d); if (this.parentSeries == null) { return; } let e = typeCast(NumericAxisBase.$, this.parentSeries.fetchYAxis()); if (e == null) { return; } switch (b) { case "ValueColumn": if (this.aau.c8) { this.aau.c7.g$i(); } if (e != null && !e.c1()) { this.parentSeries.aau().cw.g(this.ic); this.rq(this.gf && this.d7); } break; case "ActualBrush": if (this.logicalSeriesLink != null) { this.logicalSeriesLink.ku = this.u8; } break; } } rs(a, b) { super.rs(a, b); } get useHighMarkerFidelity() { return this.zp; } } FragmentBase.$t = markType(FragmentBase, 'FragmentBase', HorizontalAnchoredCategorySeries.$); return FragmentBase; })(); /** * @hidden */ export let AreaFragment = /*@__PURE__*/ (() => { class AreaFragment extends FragmentBase { constructor() { super(); this.ab = AreaFragment.$; } bj() { return new AreaFragment(); } cs() { return new AreaFragmentView(this); } q0(a) { super.q0(a); this.ac6 = a; } get_ev() { return true; } get_eu() { return true; } y3() { return 1; } ac8(a, b) { let c = this.ac6.dl.an; if (this.gx(a, c)) { return true; } let d = this.ac6.dm.an; if (this.gx(a, d)) { return true; } return false; } gv(a, b) { if (this.ac7(a, b)) { return true; } if (this.ac8(a, b)) { return true; } if (this.xg(a, b)) { return true; } return false; } ac7(a, b) { let c = this.ac6.dn.an; if (this.gw(a, b, c)) { return true; } let d = this.ac6.dp.an; if (this.gw(a, b, d)) { return true; } return false; } preferredCategoryMode(a) { return 0; } o4(a, b) { super.o4(a, b); let c = b; c.dg(); } aaj(a, b) { super.aaj(a, b); this.acw.a = typeCast(ISortingAxis_$type, this.xAxis) !== null ? true : false; let c = typeCast(AreaFragmentView.$, b); let d = a.f; let e = this.getEffectiveViewport1(c); this.y1.a2(this, this.zl(), runOn(this, this.yl), this.zu(b), this.zv(b)); let f = false; let g = this.y1.b; if (g != null) { f = true; } if (f) { let h = new ScalerParams(0, b.by, b.bx, this.acc.ch, e); this.aaf(d, -1, this.valueColumn.count, this.acc, h, b.q, -1); } this.y1.ad(c.dn, true, false, true, true); this.y1.ad(c.dp, true, false, true, true); this.y1.ad(c.dl, false, true, false, false); this.y1.ad(c.dm, false, true, false, false); let i = c.cw.d; this.acw.i(c.dl, c.dn, c.dm, c.dp, a.f.count, a.f, true, i, this.ic, (j, k, l, m, n) => this.ac4(j, a.f, b), 0); c.dl._opacity = this.y1.j * this.h8; c.dm._opacity = 0.5 * this.y1.j * this.h8; } sc() { let a = (typeCast(XamDataChart.$, this.db)); if (a != null) { this.h8 = isNaN_(this.ij) ? this.parentSeries.h8 : this.ij; } } get useHighMarkerFidelity() { return this.zp; } } AreaFragment.$t = markType(AreaFragment, 'AreaFragment', FragmentBase.$); return AreaFragment; })(); /** * @hidden */ export let ColumnFragment = /*@__PURE__*/ (() => { class ColumnFragment extends FragmentBase { constructor() { super(); this.ab = ColumnFragment.$; } bj() { return new ColumnFragment(); } get_ez() { return true; } get_fk() { return true; } jj() { if (!isNaN_(this.ji)) { return super.jj(); } return Defaults.h; } y3() { return 1; } cs() { return new ColumnFragmentView(this); } q0(a) { super.q0(a); this.ac7 = a; } get fragmentXAxis() { return this.parentSeries != null ? typeCast(CategoryAxisBase.$, this.parentSeries.fetchXAxis()) : null; } get fragmentYAxis() { return this.parentSeries != null ? typeCast(NumericYAxis.$, this.parentSeries.fetchYAxis()) : null; } preferredCategoryMode(a) { return 2; } yr() { return this.fragmentXAxis; } y8() { return this.fragmentYAxis; } get_ed() { return true; } fetchXAxis() { return null; } fetchYAxis() { return null; } o4(a, b) { super.o4(a, b); let c = b; if (a && c.dg != null) { this.yt.n.clear(); c.dg.count = 0; } } ay(a) { if (this.valueColumn == null || this.valueColumn.count == 0) { return null; } return new AxisRange(this.valueColumn.minimum, this.valueColumn.maximum); } hd(a, b, c) { if (this.parentSeries == null) { return false; } return this.parentSeries.aa5(this, a, b, this.ac9(c)); } ha() { return true; } zu(a) { if (this.parentSeries != null) { return this.parentSeries.zu(this.parentSeries.cv); } return super.zu(a); } zv(a) { if (this.parentSeries != null) { return this.parentSeries.zv(this.parentSeries.cv); } return super.zu(a); } zw(a) { if (this.parentSeries != null) { return this.parentSeries.zw(this.parentSeries.cv); } return super.zw(a); } wm(a) { if (this.yr() == null || this.fragmentYAxis == null) { return Rect.empty; } let b = this.v6(a); let c = this.cv.by; let d = this.cv.bx; let e = this.getEffectiveViewport1(this.cv); let f = new ScalerParams(0, c, d, this.fragmentYAxis.ch, e); let g = this.an(this.yr(), this.yt.f, this.zu(this.cv), this.zv(this.cv), a, true); if (g == null) { return Rect.empty; } let h = g[0]; let i = g[1]; let j = Math.abs(b.x - h[0]); let k = Math.abs(b.x - i[0]); let l = this.yr().k8(c, d, e); if (j < k) { let m = h[0] - 0.5 * l; let n = h[1]; let o = h[2]; return new Rect(0, m, Math.min(n, o), l, Math.max(n, o) - Math.min(n, o)); } else { let p = i[0] - 0.5 * l; let q = i[1]; let r = i[2]; return new Rect(0, p, Math.min(q, r), l, Math.max(q, r) - Math.min(q, r)); } } gv(a, b) { if (this.gy(a, b)) { return true; } if (this.xg(a, b)) { return true; } return false; } gy(a, b) { let c = this.wn(a); if (c.isEmpty) { return false; } let d = this.adg(c, this.it(b)); return d.containsPoint(a); } adg(a, b) { let c = a.left + a.width / 2; let d = a.top + a.height / 2; let e = c - ((a.width / 2) + b); let f = d - (a.height / 2); let g = a.height; let h = a.width + b * 2; return new Rect(0, e, f, h, g); } kw(a, b) { let c = typeCast(FrameworkElement.$, a); let d = c != null ? typeCast(DataContext.$, c.dataContext) : null; let e = d != null ? d.item : null; if (e == null) { let f = this.cv.bx; let g = this.db != null ? this.db.v4 : Rect.empty; let 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.km(h); } return e; } km(a) { let b = 0; if (typeCast(ISortingAxis_$type, this.yr()) !== null) { b = this.j4(a); if (b == -1) { return null; } } else { b = this.j2(a); } return b >= 0 && this.dn != null && b < this.dn.count ? this.dn.item(b) : null; } j4(a) { let b = this.cv.by; let c = this.cv.bx; let d = this.getEffectiveViewport1(this.cv); if (b.isEmpty || c.isEmpty) { return -1; } let e = this.yr(); let f = new ScalerParams(0, b, c, e.ch, d); let g = typeCast(ISortingAxis_$type, this.fragmentXAxis); let h = this.wi(this.cv); let i = e.eo(h.left, f); let j = e.eo(h.right, f); let k = (a.x - b.left) / b.width; let l = i + ((j - i) * k); if (truncate(l) <= dateMinValue().getTime() || truncate(l) >= dateMaxValue().getTime()) { return -1; } let m = g.i$f(l); return m; } j2(a) { if (this.parentSeries == null) { return -1; } return this.parentSeries.abc(a); } ac1(a, b, c, d, e, f, g, h) { let i = 0; let j = c[0]; let k = e < i ? c[2] : c[1]; let l = new Rect(0, j - 5, k - 5, 11, 11); if (!isNaN_(j) && !isNaN_(k) && !isInfinity(j) && !isInfinity(k) && d.tryAdd(l)) { b.n.add({ $type: Point_$type, x: j, y: k }); a.updateMarkerTemplate(g, f, h); return true; } return false; } ac9(a) { if (a.p) { return this.parentSeries.ba.a$j.item(a.ad); } else if (a == this.cu) { return this.parentSeries.cu; } else { return this.parentSeries.y2; } } rp(a, b, c, d, e) { this.ba.a$z(this, a, b, d, e); let f = this.ba.a$j.item(d); let g = f; f.a3(c); let h = this.ac9(f); h.cw.g(this.ic); if (this.d5(g)) { return; } if (this.aav == null) { this.aav = new CategoryFrame(3); } this.aav.v(); this.aag(this.aav, g); this.aaj(this.aav, g); } aag(a, b) { a.v(); if (this.valueColumn == null || this.parentSeries == null || this.logicalSeriesLink == null || this.logicalSeriesLink.a7.count == 0 || this.logicalSeriesLink.a8.count == 0) { return; } let c; if (b.p) { c = this.parentSeries.aat; } else if (b == this.cu) { c = this.parentSeries.yw; } else { c = this.parentSeries.yt; } let d = typeCast(CategorySeriesView.$, this.ac9(b)); a.f.clear(); if (a.m != null) { a.m.clear(); } a.n.clear(); let e = d.cw.e; let f = d.cw.f; let g = this.parentSeries.yy.h.yScaler; let h = typeCast(ISortingAxis_$type, this.parentSeries.yy.h.scaler); let i = typeCast(NumericAxisBase.$, g) !== null && g.lp; let j = typeCast(StackedBucketCalculator.$, d.cw); let k = d.cw.d; let l = 0; if (e <= f) { for (let m = e; m <= f; m++) { let n = m * k; if (this._visibility != 0) { break; } if (m >= this.valueColumn.count || m >= c.f.count + e) { continue; } let o = this.valueColumn.item(m); let p = !i || (i && o > 0); let q; if (h == null) { q = j.getBucket1(this, m, m, b.by, b.bx, c); } else { q = j.getBucket1(this, m, h.i$b._inner[m], b.by, b.bx, c); } a.f.add(q); if (h != null) { if (a.m == null) { a.m = new List$1(Number_$type, 0); } a.m.add(n); } if (p) { if (this.ac1(b, a, q, this.yy.h.provideCollisionDetector(), o, n, l, a.f.count - 1)) { l++; } } } } b.cz.count = l; } aaj(a, b) { super.aaj(a, b); if (this.parentSeries == null) { return; } this.parentSeries.abl(this, a, b, runOn(this, this.yl)); CategoryMarkerManager.e(this, a.n, b.cz, this.xh); } q8(a, b, c, d) { super.q8(a, b, c, d); } get useHighMarkerFidelity() { return this.zp; } } ColumnFragment.$t = markType(ColumnFragment, 'ColumnFragment', FragmentBase.$); ColumnFragment.$$p = markDep(DependencyProperty, PropertyMetadata, ColumnFragment, 'raisePropertyChanged', ['RadiusX:ada:ade', [1, 0], 'RadiusY:adb:adf', [1, 0]]); return ColumnFragment; })(); /** * @hidden */ export let BarFragment = /*@__PURE__*/ (() => { class BarFragment extends ColumnFragment { constructor() { super(); this.ab = BarFragment.$; } get_ex() { return true; } get_fk() { return true; } get_ez() { return false; } y3() { return 1; } get barFragmentXAxis() { return this.parentSeries != null ? this.parentSeries.xAxis : null; } get barFragmentYAxis() { return this.parentSeries != null ? this.parentSeries.yAxis : null; } yr() { if (this.parentSeries == null) { return null; } return this.parentSeries.fetchYAxis(); } get_isVertical() { return true; } iq(a) { let b = this.db != null ? this.db.v4 : Rect.empty; let c = this.cv.bx; let d = this.wi(this.cv); let e = this.getEffectiveViewport1(this.cv); let f = this.yr(); let g = -1; if (f != null && !b.isEmpty && !c.isEmpty) { let h = new ScalerParams(0, b, c, f.ch, e); let i = f.eo(d.top, h); let j = f.eo(d.bottom, h); let k = (a.y - b.top) / b.height; let l = i + (k * (j - i)); if (f.categoryMode != 0) { l -= 0.5; } g = l; } return g; } y8() { if (this.parentSeries == null) { return null; } return this.parentSeries.y8(); } adg(a, b) { let c = a.left + a.width / 2; let d = a.top + a.height / 2; let e = c - (a.width / 2); let f = d - ((a.height / 2) + b); let g = a.height + b * 2; let h = a.width; return new Rect(0, e, f, h, g); } wm(a) { if (this.yr() == null) { return Rect.empty; } let b = this.v6(a); let c = this.cv.by; let d = this.cv.bx; let e = this.getEffectiveViewport1(this.cv); let f = this.yr(); let g = new ScalerParams(0, c, d, f.ch, e); let h = this.an(this.yr(), this.yt.f, this.zu(this.cv), this.zv(this.cv), a, true); if (h == null) { return Rect.empty; } let i = h[0]; let j = h[1]; let k = Math.abs(b.y - i[0]); let l = Math.abs(b.y - j[0]); let m = f.k8(c, d, e); if (k < l) { let n = i[0] - 0.5 * m; let o = i[2]; let p = i[1]; return new Rect(0, o, n, Math.max(p, o) - Math.min(p, o), m); } else { let q = j[0] - 0.5 * m; let r = j[2]; let s = j[1]; return new Rect(0, r, q, Math.max(s, r) - Math.min(s, r), m); } } gv(a, b) { if (this.gy(a, b)) { return true; } if (this.xg(a, b)) { return true; } return false; } ac1(a, b, c, d, e, f, g, h) { let i = c[0]; let j = e < 0 ? c[2] : c[1]; let k = new Rect(0, j - 5, i - 5, 11, 11); if (!isNaN_(j) && !isNaN_(i) && !isInfinity(j) && !isInfinity(i) && d.tryAdd(k)) { b.n.add({ $type: Point_$type, x: j, y: i }); a.updateMarkerTemplate(g, f, h); return true; } return false; } km(a) { let b = 0; if (typeCast(ISortingAxis_$type, this.barFragmentYAxis) !== null) { b = this.j4(a); if (b == -1) { return null; } } else { b = this.j2(a); } return b >= 0 && this.dn != null && b < this.dn.count ? this.dn.item(b) : null; } j4(a) { let b = this.cv.by; let c = this.cv.bx; if (b.isEmpty || c.isEmpty) { return -1; } let d = this.getEffectiveViewport1(this.cv); let e = new ScalerParams(0, b, c, this.barFragmentYAxis.ch, d); let f = typeCast(ISortingAxis_$type, this.barFragmentYAxis); let g = this.wi(this.cv); let h = this.barFragmentYAxis.eo(g.top, e); let i = this.barFragmentYAxis.eo(g.bottom, e); let j = (a.y - b.top) / b.height; let k = h + ((i - h) * j); if (truncate(k) <= dateMinValue().getTime() || truncate(k) >= dateMaxValue().getTime()) { return -1; } let l = f.i$f(k); return l; } aa8(a) { let b = 0; let c = a.by; let d = a.bx; let e = this.getEffectiveViewport1(a); let 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; } q8(a, b, c, d) { super.q8(a, b, c, d); if (this.parentSeries == null || this.barFragmentXAxis == null) { return; } let e = this.barFragmentXAxis; switch (b) { case "ValueColumn": if (this.aau.c8) { this.aau.c7.g$i(); } if (e != null && !e.c1()) { this.parentSeries.aau().cw.g(this.ic); this.rq(this.gf && this.d7); } break; } } get useHighMarkerFidelity() { return this.zp; } } BarFragment.$t = markType(BarFragment, 'BarFragment', ColumnFragment.$); return BarFragment; })(); /** * @hidden */ export let AreaFragmentBucketCalculator = /*@__PURE__*/ (() => { class AreaFragmentBucketCalculator extends AnchoredCategoryBucketCalculator { constructor(a) { super(a); } getBucketWithoutUnknowns(a) { return this.getBucket(a); } getBucket(a) { let b = Math.min(a * this.d, this.i.c5.valueColumn.count - 1); let c = Math.min(b + this.d - 1, this.i.c5.valueColumn.count - 1); let d = NaN; let e = NaN; let f = this.i.c5; let g = f.parentSeries; let h = typeCast(IStacked100Series_$type, g) !== null; let i = this.i.c5.valueColumn; let j = g.aar; let k = g.aas; let l = f.logicalSeriesLink.a8; let m = f.logicalSeriesLink.a7; for (let n = b; n <= c; ++n) { let o = i.item(n); if (isNaN_(o) || isInfinity(o)) { o = 0; } let 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; })(); /** * @hidden */ export let LineFragmentBucketCalculator = /*@__PURE__*/ (() => { class LineFragmentBucketCalculator extends AnchoredCategoryBucketCalculator { constructor(a) { super(a); } getBucketWithoutUnknowns(a) { return this.getBucket(a); } getBucket(a) { let b = Math.min(a * this.d, this.i.c5.valueColumn.count - 1); let c = Math.min(b + this.d - 1, this.i.c5.valueColumn.count - 1); let d = NaN; let e = NaN; let f = typeCast(FragmentBase.$, this.i.c5); let g = f.parentSeries; for (let h = b; h <= c; ++h) { let i = this.i.c5.valueColumn.item(h); let j = Math.abs(g.aas[h]) + g.aar[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; })(); /** * @hidden */ export let SplineFragmentBucketCalculator = /*@__PURE__*/ (() => { class SplineFragmentBucketCalculator extends AnchoredCategoryBucketCalculator { constructor(a) { super(a); } getBucket(a) { let b = Math.min(a * this.d, this.i.c5.valueColumn.count - 1); let c = Math.min(b + this.d - 1, this.i.c5.valueColumn.count - 1); let d = NaN; let e = NaN; let f = typeCast(SplineFragmentBase.$, this.i.c5); let g = f.parentSeries; for (let h = b; h <= c; ++h) { let i = this.i.c5.valueColumn.item(h); let j = Math.abs(g.aas[h]) + g.aar[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; })(); /** * @hidden */ export let StackedBucketCalculator = /*@__PURE__*/ (() => { class StackedBucketCalculator extends CategoryBucketCalculator { constructor(a) { super(a); } getBucket(a) { let b = typeCast(StackedSeriesBase.$, this.c.cy); let c = Math.min(b.aas != null ? b.aas.length : 0, b.aar != null ? b.aar.length : 0); let d = Math.min(a * this.d, c - 1); let e = Math.min(d + this.d - 1, c - 1); let f = NaN; let g = NaN; for (let h = d; h <= e; ++h) { let i = Math.min(b.aas[h], b.aar[h]); let j = Math.max(b.aas[h], b.aar[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]; } getBucket1(a, b, c, d, e, f) { return null; } } StackedBucketCalculator.$t = markType(StackedBucketCalculator, 'StackedBucketCalculator', CategoryBucketCalculator.$); return StackedBucketCalculator; })(); /** * @hidden */ export let StackedBarBucketCalculator = /*@__PURE__*/ (() => { class StackedBarBucketCalculator extends StackedBucketCalculator { constructor(a) { super(a); } g(a) { let b = this.c.by; let c = this.c.bx; let d = typeCast(StackedBarSeries.$, this.c.cy); let e = this.c.cy.dn; if (b.isEmpty || c.isEmpty || d.yAxis == null || e == null || e.count == 0) { this.d = 0; return; } let f = d.getEffectiveViewport1(this.c); let g = new ScalerParams(0, b, c, d.yAxis.ch, f); let h = d.wi(this.c); let i = Math.floor(d.yAxis.ep(h.top, g, 0)); let j = Math.ceil(d.yAxis.ep(h.bottom, g, 0)); if (!d.yAxis.ch) { j = Math.ceil(d.yAxis.ep(h.top, g, 0)); i = Math.floor(d.yAxis.ep(h.bottom, g, 0)); } let k = Math.floor((j - i + 1) * a / h.height); this.d = truncate(Math.max(1, k)); this.e = truncate(Math.max(0, Math.floor(i / this.d) - 1)); this.f = truncate(Math.ceil(j / this.d)); } getBucket(a) { return super.getBucket(a); } getBucket1(a, b, c, d, e, f) { let g = [NaN, NaN, NaN]; let h = typeCast(BarFragment.$, a); if (h == null || h.logicalSeriesLink == null) { return g; } let i = typeCast(StackedBarSeries.$, this.c.cy); let j = a.valueColumn.item(c); let k = 0; let l = NaN; let m = NaN; let n = Number.NEGATIVE_INFINITY; let o = Number.POSITIVE_INFINITY; let p = i.getEffectiveViewport1(this.c); let q = Math.min(i.aas != null ? i.aas.length : 0, i.aar != null ? i.aar.length : 0); let r = c * this.d; let s = Math.min(r + this.d - 1, q - 1); if (r <= s) { for (let t = r; t <= s; ++t) { j = a.valueColumn.item(t); if (j < k) { o = Math.min(o, h.logicalSeriesLink.a8._inner[t] + j); n = Math.max(n, h.logicalSeriesLink.a8._inner[t]); } else { o = Math.min(o, h.logicalSeriesLink.a7._inner[t]); n = Math.max(n, h.logicalSeriesLink.a7._inner[t] + j); } if (!isNaN_(l)) { if (!isNaN_(o)) { l = Math.min(l, o); m = Math.max(m, o); } if (!isNaN_(n)) { l = Math.min(l, n); m = Math.max(m, n); } } else { l = o; m = n; } } } let u = new ScalerParams(0, d, e, i.xAxis.ch, p); g = [f.f._inner[b - this.e][0], i.xAxis.el(m, u), i.xAxis.el(l, u)]; return g; } } StackedBarBucketCalculator.$t = markType(StackedBarBucketCalculator, 'StackedBarBucketCalculator', StackedBucketCalculator.$); return StackedBarBucketCalculator; })(); /** * @hidden */ export let StackedColumnBucketCalculator = /*@__PURE__*/ (() => { class StackedColumnBucketCalculator extends StackedBucketCalculator { constructor(a) { super(a); } getBucket(a) { return super.getBucket