igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
1,633 lines • 199 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 { 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, delegateRemove, 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 class StackedSeriesCreatedEventArgs extends EventArgs {
static { this.$t = markType(StackedSeriesCreatedEventArgs, 'StackedSeriesCreatedEventArgs', EventArgs.$); }
constructor(a) {
super();
this.c = null;
this.c = a;
}
get brush() {
return this.c.lb;
}
set brush(a) {
this.c.lb = a;
}
get legendItemTemplate() {
return this.c.h1;
}
set legendItemTemplate(a) {
this.c.h1 = a;
}
get legendItemBadgeTemplate() {
return this.c.h0;
}
set legendItemBadgeTemplate(a) {
this.c.h0 = a;
}
get legendItemVisibility() {
return this.c.l6;
}
set legendItemVisibility(a) {
this.c.l6 = a;
}
get outline() {
return this.c.lf;
}
set outline(a) {
this.c.lf = a;
}
get dashArray() {
return this.c.lk;
}
set dashArray(a) {
this.c.lk = a;
}
get dashCap() {
return this.c.ln;
}
set dashCap(a) {
this.c.ln = a;
}
get index() {
return this.c.ch;
}
get thickness() {
return this.c.b9;
}
set thickness(a) {
this.c.b9 = a;
}
get title() {
return this.c.co;
}
set title(a) {
this.c.co = a;
}
get transitionDuration() {
return this.c.ci;
}
set transitionDuration(a) {
this.c.ci = a;
}
get transitionEasingFunction() {
return this.c.al;
}
set transitionEasingFunction(a) {
this.c.al = a;
}
get markerBrush() {
return this.c.lc;
}
set markerBrush(a) {
this.c.lc = a;
}
get markerOutline() {
return this.c.ld;
}
set markerOutline(a) {
this.c.ld = a;
}
get markerStyle() {
return this.c.l3;
}
set markerStyle(a) {
this.c.l3 = a;
}
get markerTemplate() {
return this.c.h2;
}
set markerTemplate(a) {
this.c.h2 = a;
}
get markerType() {
return this.c.aa;
}
set markerType(a) {
this.c.aa = a;
}
get markerThickness() {
return this.c.b2;
}
set markerThickness(a) {
this.c.b2 = a;
}
get lineCap() {
return this.c.lm;
}
set lineCap(a) {
this.c.lo = a;
}
}
/**
* @hidden
*/
export class FragmentBase extends HorizontalAnchoredCategorySeries {
static { this.$t = markType(FragmentBase, 'FragmentBase', HorizontalAnchoredCategorySeries.$); }
constructor() {
super();
this.___neverPassByValue = true;
this.aeb = null;
this._logicalSeriesLink = null;
this.aed = null;
this.aeb = new CategoryLineRasterizer();
}
get logicalSeriesLink() {
return this._logicalSeriesLink;
}
set logicalSeriesLink(a) {
this._logicalSeriesLink = a;
}
get parentSeries() {
return this.aed;
}
set parentSeries(a) {
this.aed = a;
}
get_e9() {
return false;
}
get_isFragment() {
return true;
}
np() {
if (this.logicalSeriesLink != null) {
return this.logicalSeriesLink.e7;
}
return null;
}
kd() {
let a = this.parentSeries;
if (a.index == -1 || a.acf == null || a.acf.f.indexOf(this) == -1) {
return -1;
}
return a.acf.f.indexOf(this);
}
qq(a) {
super.qq(a);
a.parentSeries = this.parentSeries;
a.logicalSeriesLink = this.logicalSeriesLink;
}
ki() {
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.acj) {
return -1 + a.index + a.aca.count - a.acf.f.indexOf(this);
}
return super.resolveLegendIndex();
}
bq() {
return this.parentSeries;
}
z4() {
if (this.parentSeries == null) {
return null;
}
return this.parentSeries.fetchXAxis();
}
aea() {
if (this.parentSeries == null) {
return this.aab;
}
return this.parentSeries.aab;
}
aal() {
if (this.parentSeries == null) {
return null;
}
return this.parentSeries.fetchYAxis();
}
aeg(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.s.add({ $type: Point_$type, x: i, y: j });
a.updateMarkerTemplate(g, f, h);
return true;
}
return false;
}
abw(a, b) {
a.aa();
if (this.valueColumn == null || this.parentSeries == null || this.logicalSeriesLink == null) {
return;
}
if (this.logicalSeriesLink.bd.count == 0 || this.logicalSeriesLink.bc.count == 0) {
return;
}
this.aac(b).d(a, b);
}
wy(a, b, c) {
return this.w0(a, b, c, this.aea().r(this.z4(), this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.aal(), this.z4(), runOn(this, this.aeh), (d, e) => this.km(d, e, this.z4(), runOn(this, this.aa5), this.valueColumn != null ? new FragmentBaseValueList(this) : null), (d, e) => this.kk(d, e, this.z4(), runOn(this, this.aa5), this.valueColumn != null ? new FragmentBaseValueList(this) : null));
}
ai() {
return [this.z4(), this.aal()];
}
aeh(a, b, c) {
if (this.dc == null) {
return NaN;
}
let d = this.getEffectiveViewport1(this.cw);
let e = new ScalerParams(0, this.dc.yv, this.cw.b9, this.z4().dr, d);
let f = this.aab.r(this.z4(), this.dc.yv, this.cw.b9, d);
return this.jh(this.valueColumn != null ? new FragmentBaseValueList(this) : null, a, this.z4(), e, f, runOn(this, this.aa5), b, c);
}
aej(a, b, c) {
let d = this.acn(c);
let e = d;
let f = this.logicalSeriesLink.a4;
let g = f ? this.parentSeries.acf.e : this.parentSeries.acf.d;
let h = this;
if (this.bo != null) {
h = this.bo;
}
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.aeb != null && l.aeb.o.count > 0 && this.cw != null && l.hm(this.cw.b9, this.cw.ca, this.cw)) {
j = true;
for (let m = l.aeb.o.count - 1; m >= 0; m--) {
a.add(l.aeb.o._inner[m]);
}
}
}
}
hm(a, b, c) {
let d = super.hm(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.dp == null || e.b7 == null || f.b7 == 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;
}
acn(a) {
let b = 0;
let c = a.ca;
let d = a.b9;
let e = this.getEffectiveViewport1(a);
let f = new ScalerParams(0, c, d, this.aal().dr, e);
f.b = this.i7();
if (!c.isEmpty && !d.isEmpty && this.aal() != null) {
b = this.aal().gc(0, f);
}
return b;
}
ay(a) {
return null;
}
aei() {
if (this.parentSeries == null) {
return -1;
}
let a = this.parentSeries.index;
let b = 0;
let c = 1;
if (this.parentSeries.acj) {
b = this.parentSeries.aca.count - 1;
c = -1;
}
for (let d = b; this.parentSeries.acj ? d >= 0 : d < this.parentSeries.aca.count; d += c) {
let e = this.parentSeries.aca._inner[d];
if (e.visualSeriesLink == this) {
return a;
}
if (this.parentSeries.a5 == null || e.l5 != 0 || e.l4 != 0) {
continue;
}
a++;
}
return -1;
}
aek(a) {
if (a == null) {
}
}
rs(a, b, c, d) {
super.rs(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.ab9.dl) {
this.ab9.dk.g$m();
}
if (e != null && !e.ei()) {
this.parentSeries.ab9().c9.g(this.im);
this.sa(this.go && this.d9);
}
break;
case "ActualBrush":
if (this.logicalSeriesLink != null) {
this.logicalSeriesLink.k6 = this.vv;
}
break;
}
}
sc(a, b) {
super.sc(a, b);
}
get useHighMarkerFidelity() {
return this.aa2;
}
}
/**
* @hidden
*/
export class AreaFragment extends FragmentBase {
static { this.$t = markType(AreaFragment, 'AreaFragment', FragmentBase.$); }
bk() {
return new AreaFragment();
}
constructor() {
super();
this.ab = AreaFragment.$;
}
ct() {
return new AreaFragmentView(this);
}
rj(a) {
super.rj(a);
this.ael = a;
}
get_ey() {
return true;
}
get_ex() {
return true;
}
aag() {
return 1;
}
aen(a, b) {
let c = this.ael.dz.an;
if (this.g6(a, c)) {
return true;
}
let d = this.ael.d0.an;
if (this.g6(a, d)) {
return true;
}
return false;
}
g4(a, b) {
if (this.aem(a, b)) {
return true;
}
if (this.aen(a, b)) {
return true;
}
if (this.x5(a, b)) {
return true;
}
return false;
}
aem(a, b) {
let c = this.ael.d1.an;
if (this.g5(a, b, c)) {
return true;
}
let d = this.ael.d2.an;
if (this.g5(a, b, d)) {
return true;
}
return false;
}
preferredCategoryMode(a) {
return 0;
}
pk(a, b) {
super.pk(a, b);
let c = b;
c.du();
}
abz(a, b) {
super.abz(a, b);
this.aeb.a = typeCast(ISortingAxis_$type, this.xAxis) !== null ? true : false;
let c = typeCast(AreaFragmentView.$, b);
let d = a.k;
let e = this.getEffectiveViewport1(c);
this.aae.a2(this, this.aay(), runOn(this, this.zy), this.aa7(b), this.aa8(b));
let f = false;
let g = this.aae.b;
if (g != null) {
f = true;
}
if (f) {
let h = new ScalerParams(0, b.ca, b.b9, this.adr.dr, e);
this.abv(d, -1, this.valueColumn.count, this.adr, h, b.t, -1);
}
this.aae.ad(c.d1, true, false, true, true);
this.aae.ad(c.d2, true, false, true, true);
this.aae.ad(c.dz, false, true, false, false);
this.aae.ad(c.d0, false, true, false, false);
let i = c.c9.d;
this.aeb.j(c.dz, c.d1, c.d0, c.d2, a.k.count, a.k, true, i, this.im, (j, k, l, m, n) => this.aej(j, a.k, b), 0);
c.dz._opacity = this.aae.j * this.ii;
c.d0._opacity = 0.5 * this.aae.j * this.ii;
}
sx() {
let a = (typeCast(XamDataChart.$, this.dc));
if (a != null) {
this.ii = isNaN_(this.it) ? this.parentSeries.ii : this.it;
}
}
get useHighMarkerFidelity() {
return this.aa2;
}
}
/**
* @hidden
*/
export class ColumnFragment extends FragmentBase {
static { this.$t = markType(ColumnFragment, 'ColumnFragment', FragmentBase.$); }
bk() {
return new ColumnFragment();
}
get_e2() {
return true;
}
get_fp() {
return true;
}
ju() {
if (!isNaN_(this.jt)) {
return super.ju();
}
return Defaults.h;
}
aag() {
return 1;
}
constructor() {
super();
this.ab = ColumnFragment.$;
}
ct() {
return new ColumnFragmentView(this);
}
rj(a) {
super.rj(a);
this.aem = 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;
}
z4() {
return this.fragmentXAxis;
}
aal() {
return this.fragmentYAxis;
}
get_ef() {
return true;
}
fetchXAxis() {
return null;
}
fetchYAxis() {
return null;
}
pk(a, b) {
super.pk(a, b);
let c = b;
if (a && c.du != null) {
this.z6.s.clear();
c.du.count = 0;
}
}
ay(a) {
if (this.valueColumn == null || this.valueColumn.count == 0) {
return null;
}
return new AxisRange(this.valueColumn.minimum, this.valueColumn.maximum);
}
hm(a, b, c) {
if (this.parentSeries == null) {
return false;
}
return this.parentSeries.ack(this, a, b, this.aeo(c));
}
hj() {
return true;
}
aa7(a) {
if (this.parentSeries != null) {
return this.parentSeries.aa7(this.parentSeries.cw);
}
return super.aa7(a);
}
aa8(a) {
if (this.parentSeries != null) {
return this.parentSeries.aa8(this.parentSeries.cw);
}
return super.aa7(a);
}
aa9(a) {
if (this.parentSeries != null) {
return this.parentSeries.aa9(this.parentSeries.cw);
}
return super.aa9(a);
}
xa(a) {
if (this.z4() == null || this.fragmentYAxis == null) {
return Rect.empty;
}
let b = this.wt(a);
let c = this.cw.ca;
let d = this.cw.b9;
let e = this.getEffectiveViewport1(this.cw);
let f = new ScalerParams(0, c, d, this.fragmentYAxis.dr, e);
let g = this.an(this.z4(), this.z6.k, this.aa7(this.cw), this.aa8(this.cw), 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.z4().qe(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));
}
}
g4(a, b) {
if (this.g7(a, b)) {
return true;
}
if (this.x5(a, b)) {
return true;
}
return false;
}
g7(a, b) {
let c = this.xb(a);
if (c.isEmpty) {
return false;
}
let d = this.aev(c, this.i3(b));
return d.containsPoint(a);
}
aev(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);
}
k8(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.cw.b9;
let g = this.dc != null ? this.dc.yv : 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.ky(h);
}
return e;
}
ky(a) {
let b = 0;
if (typeCast(ISortingAxis_$type, this.z4()) !== null) {
b = this.kg(a);
if (b == -1) {
return null;
}
}
else {
b = this.ke(a);
}
return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
}
kg(a) {
let b = this.cw.ca;
let c = this.cw.b9;
let d = this.getEffectiveViewport1(this.cw);
if (b.isEmpty || c.isEmpty) {
return -1;
}
let e = this.z4();
let f = new ScalerParams(0, b, c, e.dr, d);
let g = typeCast(ISortingAxis_$type, this.fragmentXAxis);
let h = this.w6(this.cw);
let i = e.gf(h.left, f);
let j = e.gf(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;
}
ke(a) {
if (this.parentSeries == null) {
return -1;
}
return this.parentSeries.acr(a);
}
aeg(a, b, c, d, e, f, g, h) {
if (!a.shouldDisplayMarkers) {
return false;
}
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.s.add({ $type: Point_$type, x: j, y: k });
a.updateMarkerTemplate(g, f, h);
return true;
}
return false;
}
aeo(a) {
if (a.s) {
return this.parentSeries.ba.a$k.item(a.al);
}
else if (a == this.cv) {
return this.parentSeries.cv;
}
else {
return this.parentSeries.aaf;
}
}
r9(a, b, c, d, e) {
this.ba.a$aa(this, a, b, d, e);
let f = this.ba.a$k.item(d);
let g = f;
f.bd(c);
let h = this.aeo(f);
h.c9.g(this.im);
if (this.d7(g)) {
return;
}
if (this.aca == null) {
this.aca = new CategoryFrame(3);
}
this.aca.aa();
this.abw(this.aca, g);
this.abz(this.aca, g);
}
abw(a, b) {
a.aa();
if (this.valueColumn == null || this.parentSeries == null || this.logicalSeriesLink == null || this.logicalSeriesLink.bc.count == 0 || this.logicalSeriesLink.bd.count == 0) {
return;
}
let c;
if (b.s) {
c = this.parentSeries.ab8;
}
else if (b == this.cv) {
c = this.parentSeries.z9;
}
else {
c = this.parentSeries.z6;
}
let d = typeCast(CategorySeriesView.$, this.aeo(b));
a.k.clear();
if (a.r != null) {
a.r.clear();
}
a.s.clear();
let e = d.c9.e;
let f = d.c9.f;
let g = this.parentSeries.aab.h.yScaler;
let h = typeCast(ISortingAxis_$type, this.parentSeries.aab.h.scaler);
let i = typeCast(NumericAxisBase.$, g) !== null && g.qv;
let j = typeCast(StackedBucketCalculator.$, d.c9);
let k = d.c9.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.k.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.ca, b.b9, c);
}
else {
q = j.getBucket1(this, m, h.i$b._inner[m], b.ca, b.b9, c);
}
a.k.add(q);
if (h != null) {
if (a.r == null) {
a.r = new List$1(Number_$type, 0);
}
a.r.add(n);
}
if (p) {
if (this.aeg(b, a, q, this.aab.h.provideCollisionDetector(), o, n, l, a.k.count - 1)) {
l++;
}
}
}
}
b.dc.count = l;
}
abz(a, b) {
super.abz(a, b);
if (this.parentSeries == null) {
return;
}
this.parentSeries.ac0(this, a, b, runOn(this, this.zy));
CategoryMarkerManager.e(this, a.s, b.dc, this.x6);
}
zy(a, b) {
return this.ab6(a, b, this.fragmentXAxis);
}
rs(a, b, c, d) {
super.rs(a, b, c, d);
}
get useHighMarkerFidelity() {
return this.aa2;
}
static { this.$$p = markDep(DependencyProperty, PropertyMetadata, ColumnFragment, 'raisePropertyChanged', ['RadiusX:aep:aet', [1, 0], 'RadiusY:aeq:aeu', [1, 0]]); }
}
/**
* @hidden
*/
export class BarFragment extends ColumnFragment {
static { this.$t = markType(BarFragment, 'BarFragment', ColumnFragment.$); }
constructor() {
super();
this.ab = BarFragment.$;
}
get_e0() {
return true;
}
get_fp() {
return true;
}
get_e2() {
return false;
}
aag() {
return 1;
}
get barFragmentXAxis() {
return this.parentSeries != null ? this.parentSeries.xAxis : null;
}
get barFragmentYAxis() {
return this.parentSeries != null ? this.parentSeries.yAxis : null;
}
z4() {
if (this.parentSeries == null) {
return null;
}
return this.parentSeries.fetchYAxis();
}
get_isVertical() {
return true;
}
i0(a) {
let b = this.dc != null ? this.dc.yv : Rect.empty;
let c = this.cw.b9;
let d = this.w6(this.cw);
let e = this.getEffectiveViewport1(this.cw);
let f = this.z4();
let g = -1;
if (f != null && !b.isEmpty && !c.isEmpty) {
let h = new ScalerParams(0, b, c, f.dr, e);
let i = f.gf(d.top, h);
let j = f.gf(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;
}
aal() {
if (this.parentSeries == null) {
return null;
}
return this.parentSeries.aal();
}
aev(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);
}
xa(a) {
if (this.z4() == null) {
return Rect.empty;
}
let b = this.wt(a);
let c = this.cw.ca;
let d = this.cw.b9;
let e = this.getEffectiveViewport1(this.cw);
let f = this.z4();
let g = new ScalerParams(0, c, d, f.dr, e);
let h = this.an(this.z4(), this.z6.k, this.aa7(this.cw), this.aa8(this.cw), 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.qe(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);
}
}
g4(a, b) {
if (this.g7(a, b)) {
return true;
}
if (this.x5(a, b)) {
return true;
}
return false;
}
aeg(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.s.add({ $type: Point_$type, x: j, y: i });
a.updateMarkerTemplate(g, f, h);
return true;
}
return false;
}
ky(a) {
let b = 0;
if (typeCast(ISortingAxis_$type, this.barFragmentYAxis) !== null) {
b = this.kg(a);
if (b == -1) {
return null;
}
}
else {
b = this.ke(a);
}
return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
}
kg(a) {
let b = this.cw.ca;
let c = this.cw.b9;
if (b.isEmpty || c.isEmpty) {
return -1;
}
let d = this.getEffectiveViewport1(this.cw);
let e = new ScalerParams(0, b, c, this.barFragmentYAxis.dr, d);
let f = typeCast(ISortingAxis_$type, this.barFragmentYAxis);
let g = this.w6(this.cw);
let h = this.barFragmentYAxis.gf(g.top, e);
let i = this.barFragmentYAxis.gf(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;
}
acn(a) {
let b = 0;
let c = a.ca;
let d = a.b9;
let e = this.getEffectiveViewport1(a);
let f = new ScalerParams(0, c, d, this.barFragmentXAxis.dr, e);
if (!c.isEmpty && !d.isEmpty && this.barFragmentXAxis != null) {
b = this.barFragmentXAxis.gc(0, f);
}
return b;
}
rs(a, b, c, d) {
super.rs(a, b, c, d);
if (this.parentSeries == null || this.barFragmentXAxis == null) {
return;
}
let e = this.barFragmentXAxis;
switch (b) {
case "ValueColumn":
if (this.ab9.dl) {
this.ab9.dk.g$m();
}
if (e != null && !e.ei()) {
this.parentSeries.ab9().c9.g(this.im);
this.sa(this.go && this.d9);
}
break;
}
}
get useHighMarkerFidelity() {
return this.aa2;
}
}
/**
* @hidden
*/
export class AreaFragmentBucketCalculator extends AnchoredCategoryBucketCalculator {
static { this.$t = markType(AreaFragmentBucketCalculator, 'AreaFragmentBucketCalculator', AnchoredCategoryBucketCalculator.$); }
constructor(a) {
super(a);
}
getBucketWithoutUnknowns(a) {
return this.getBucket(a);
}
getBucket(a) {
let b = Math.min(a * this.d, this.i.di.valueColumn.count - 1);
let c = Math.min(b + this.d - 1, this.i.di.valueColumn.count - 1);
let d = NaN;
let e = NaN;
let f = this.i.di;
let g = f.parentSeries;
let h = typeCast(IStacked100Series_$type, g) !== null;
let i = this.i.di.valueColumn;
let j = g.ab6;
let k = g.ab7;
let l = f.logicalSeriesLink.bd;
let m = f.logicalSeriesLink.bc;
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];
}
}
/**
* @hidden
*/
export class LineFragmentBucketCalculator extends AnchoredCategoryBucketCalculator {
static { this.$t = markType(LineFragmentBucketCalculator, 'LineFragmentBucketCalculator', AnchoredCategoryBucketCalculator.$); }
constructor(a) {
super(a);
}
getBucketWithoutUnknowns(a) {
return this.getBucket(a);
}
getBucket(a) {
let b = Math.min(a * this.d, this.i.di.valueColumn.count - 1);
let c = Math.min(b + this.d - 1, this.i.di.valueColumn.count - 1);
let d = NaN;
let e = NaN;
let f = typeCast(FragmentBase.$, this.i.di);
let g = f.parentSeries;
for (let h = b; h <= c; ++h) {
let i = this.i.di.valueColumn.item(h);
let j = Math.abs(g.ab7[h]) + g.ab6[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.bd._inner[h] + i) / j * 100;
}
else {
i = (f.logicalSeriesLink.bc._inner[h] + i) / j * 100;
}
}
else {
i = i < 0 ? f.logicalSeriesLink.bd._inner[h] + i : f.logicalSeriesLink.bc._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];
}
}
/**
* @hidden
*/
export class SplineFragmentBucketCalculator extends AnchoredCategoryBucketCalculator {
static { this.$t = markType(SplineFragmentBucketCalculator, 'SplineFragmentBucketCalculator', AnchoredCategoryBucketCalculator.$); }
constructor(a) {
super(a);
}
getBucket(a) {
let b = Math.min(a * this.d, this.i.di.valueColumn.count - 1);
let c = Math.min(b + this.d - 1, this.i.di.valueColumn.count - 1);
let d = NaN;
let e = NaN;
let f = typeCast(SplineFragmentBase.$, this.i.di);
let g = f.parentSeries;
for (let h = b; h <= c; ++h) {
let i = this.i.di.valueColumn.item(h);
let j = Math.abs(g.ab7[h]) + g.ab6[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.bd._inner[h] + i) / j * 100;
}
else {
i = (f.logicalSeriesLink.bc._inner[h] + i) / j * 100;
}
}
else {
i = i < 0 ? f.logicalSeriesLink.bd._inner[h] + i : f.logicalSeriesLink.bc._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];
}
}
/**
* @hidden
*/
export class StackedBucketCalculator extends CategoryBucketCalculator {
static { this.$t = markType(StackedBucketCalculator, 'StackedBucketCalculator', CategoryBucketCalculator.$); }
constructor(a) {
super(a);
}
getBucket(a) {
let b = typeCast(StackedSeriesBase.$, this.c.db);
let c = Math.min(b.ab7 != null ? b.ab7.length : 0, b.ab6 != null ? b.ab6.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.ab7[h], b.ab6[h]);
let j = Math.max(b.ab7[h], b.ab6[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;
}
}
/**
* @hidden
*/
export class StackedBarBucketCalculator extends StackedBucketCalculator {
static { this.$t = markType(StackedBarBucketCalculator, 'StackedBarBucketCalculator', StackedBucketCalculator.$); }
constructor(a) {
super(a);
}
g(a) {
let b = this.c.ca;
let c = this.c.b9;
let d = typeCast(StackedBarSeries.$, this.c.db);
let e = this.c.db.dp;
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.dr, f);
let h = d.w6(this.c);
let i = Math.floor(d.yAxis.ge(h.top, g, 0));
let j = Math.ceil(d.yAxis.ge(h.bottom, g, 0));
if (!d.yAxis.dr) {
j = Math.ceil(d.yAxis.ge(h.top, g, 0));
i = Math.floor(d.yAxis.ge(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.db);
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.ab7 != null ? i.ab7.length : 0, i.ab6 != null ? i.ab6.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.bd._inner[t] + j);
n = Math.max(n, h.logicalSeriesLink.bd._inner[t]);
}
else {
o = Math.min(o, h.logicalSeriesLink.bc._inner[t]);
n = Math.max(n, h.logicalSeriesLink.bc._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.dr, p);
g = [f.k._inner[b - this.e][0], i.xAxis.gc(m, u), i.xAxis.gc(l, u)];
return g;
}
}
/**
* @hidden
*/
export class StackedColumnBucketCalculator extends StackedBucketCalculator {
static { this.$t = markType(StackedColumnBucketCalculator, 'StackedColumnBucketCalculator', StackedBucketCalculator.$); }
constructor(a) {
super(a);
}
getBucket(a) {
return super.getBucket(a);
}
getBucket1(a, b, c, d, e, f) {
let g = [NaN, NaN, NaN];
let h = typeCast(ColumnFragment.$, a);
if (h == null || h.logicalSeriesLink == null) {
return g;
}
let i = typeCast(StackedColumnSeries.$, this.c.db);
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.ab7 != null ? i.ab7.length : 0, i.ab6 != null ? i.ab6.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.bd._inner[t] + j);
n = Math.max(n, h.logicalSeriesLink.bd._inner[t]);
}
else {
o = Math.min(o, h.logicalSeriesLink.bc._inner[t]);
n = Math.max(n, h.logicalSeriesLink.bc._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.yAxis.dr, p);
g = [f.k._inner[b - this.e][0], i.yAxis.gc(m, u), i.yAxis.gc(l, u)];
return g;
}
}
/**
* @hidden
*/
export class FragmentBaseValueList extends Base {
static { this.$t = markType(FragmentBaseValueList, 'FragmentBaseValueList', Base.$, [IList$1_$type.specialize(Number_$type)]); }
constructor(a) {
super();
this.a = null;
this.a = a;
}
indexOf(a) {
throw new NotImplementedException(0);
}
insert(a, b) {
throw new NotImplementedException(0);
}
removeAt(a) {
throw new NotImplementedException(0);
}
item(a, b) {
if (arguments.length === 2) {
throw new NotImplementedException(0);
return b;
}
else {
let b = false;
if (this.a.parentSeries != null) {
b = this.a.parentSeries.aci;
}
let c = this.a.parentSeries;
if (c == null) {
return NaN;
}
if (c.ab7 == null || c.ab6 == null || c.ab7.length == 0 || c.ab6.length == 0) {
return NaN;
}
let d = this.a.valueColumn.item(a);
let e = Math.abs(c.ab7[a]) + c.ab6[a];
let f = this.a.logicalSeriesLink.bc;
let g = this.a.logicalSeriesLink.bd;
if (isNaN_(d) || isInfinity(d)) {
d = 0;
}
if (b) {
if (e == 0) {
d = 0;
}
else if (d < 0) {
d = (g._inner[a] + d) / e * 100;
}
else {
d = (f._inner[a] + d) / e * 100;
}
}
else {
d = d < 0 ? g._inner[a] + d : f._inner[a] + d;
}
return d;
}
}
add(a) {
throw new NotImplementedException(0);
}
clear() {
throw new NotImplementedException(0);
}
contains(a) {
throw new NotImplementedException(0);
}
copyTo(a, b) {
throw new NotImplementedException(0);
}
get count() {
return this.a.valueColumn.count;
}
get isReadOnly() {
throw new NotImplementedException(0);
}
remove(a) {
throw new NotImplementedException(0);
}
getEnumerator() {
throw new NotImplementedException(0);
}
getEnumeratorObject() {
return this.getEnumerator();
}
}
/**
* @hidden
*/
export class LineFragment extends FragmentBase {
static { this.$t = markType(LineFragment, 'LineFragment', FragmentBase.$); }
bk() {
return new LineFragment();
}
get_fo() {
return true;
}
aa0() {
return true;
}
constructor() {
super();
this.ab = LineFragment.$;
}
ct() {
return new LineFragmentView(this);
}
rj(a) {
super.rj(a);
this.ael = a;
}
aen(a, b) {
let c = this.ael.dy.an;
if (this.g6(a, c)) {
return true;
}
return false;
}
get_ey() {
return true;
}
g4(a, b) {
if (this.aem(a, b)) {
return true;
}
if (this.aen(a, b)) {
return true;
}
if (this.x5(a, b)) {
return true;
}
return false;
}
aem(a, b) {
let c = this.ael.dz.an;
if (this.g5(a, b, c)) {
return true;
}
let d = this.ael.d0.an;
if (this.g5(a, b, d)) {
return true;
}
return false;
}
preferredCategoryMode(a) {
return 0;
}
pk(a, b) {
super.pk(a, b);
let c = b;
c.du();
}
abz(a, b) {
super.abz(a, b);
let c = (d) => a.k._inner[d][0];
let d = (e) => a.k._inner[e][1];
let e = (f) => a.k._inner[f][0];
let f = (g) => a.k._inner[g][2];
this.aeb.a = typeCast(ISortingAxis_$type, this.xAxis) !== null ? true : false;
let g = b.c9.d;
let h = typeCast(LineFragmentView.$, b);
let i = this.getEffectiveViewport1(b);
let j = a.k;
this.aae.a2(this, this.aay(), runOn(this, this.zy), this.aa7(b), this.aa8(b));
let k = false;
let l = this.aae.b;
if (l != null) {
k = true;
}
if (k) {
let m = new ScalerParams(0, b.ca, b.b9, this.adr.dr, i);
this.abv(j, -1, this.valueColumn.count, this.adr, m, b.t, -1);
}
this.aae.ad(h.dz, true, false, true, false);
this.aae.ad(h.d0, true, false, true, false);
this.aae.ad(h.dy, false, true, false, false);
h.dy._opacity = 0.75 * this.aae.j;
this.aeb.m(h.dz, h.dy, h.d0, a.k.count, a.k, true, 0, this.ab8(a.k, a.k.count - 1, b.b9, b.ca), g, this.im);
}
get useHighMarkerFidelity() {
return this.aa2;
}
}
/**
* @hidden
*/
export class SplineFragmentBase extends SplineSeriesBase {
static { this.$t = markType(SplineFragmentBase, 'SplineFragmentBase', SplineSeriesBase.$); }
get logicalSeriesLink() {
return this._logicalSeriesLink;
}
set logicalSeriesLink(a) {
this._logicalSeriesLink = a;
}
constructor() {
super();
this._logicalSeriesLink = null;
this.aeu = null;
this.aew = null