igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
1,405 lines • 64.2 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 { Series } from "./Series";
import { ISupportsFillScale_$type } from "./ISupportsFillScale";
import { DependencyProperty } from "igniteui-angular-core";
import { BrushScale } from "./BrushScale";
import { HighlightingInfo } from "igniteui-angular-core";
import { ShapeItemSearchMode_$type } from "./ShapeItemSearchMode";
import { IEnumerable$1_$type, String_$type, enumGetBox, Number_$type, Point_$type, typeCast, runOn, delegateCombine, fromEnum, Array_$type, markType, markDep } from "igniteui-angular-core";
import { NumericXAxis } from "./NumericXAxis";
import { NumericYAxis } from "./NumericYAxis";
import { List$1 } from "igniteui-angular-core";
import { Rect } from "igniteui-angular-core";
import { StyleShapeEventArgs } from "./StyleShapeEventArgs";
import { FrameworkElement } from "igniteui-angular-core";
import { IFastItemsSource_$type } from "igniteui-angular-core";
import { DataContext } from "igniteui-angular-core";
import { Tuple$2 } from "igniteui-angular-core";
import { ShapeHitRegion } from "./ShapeHitRegion";
import { RectUtil } from "igniteui-angular-core";
import { Tuple$3 } from "igniteui-angular-core";
import { CoreGeometryUtil } from "igniteui-angular-core";
import { GeometryUtil } from "igniteui-angular-core";
import { AssigningShapeStyleEventArgs } from "./AssigningShapeStyleEventArgs";
import { AssigningShapeMarkerStyleEventArgs } from "./AssigningShapeMarkerStyleEventArgs";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { CustomPaletteBrushScale } from "./CustomPaletteBrushScale";
import { ValueBrushScale } from "./ValueBrushScale";
import { PointCollectionUtil } from "igniteui-angular-core";
import { FlattenedShape } from "./FlattenedShape";
import { SeriesView } from "./SeriesView";
import { Clipper } from "igniteui-angular-core";
import { ScalerParams } from "./ScalerParams";
import { Dictionary$2 } from "igniteui-angular-core";
import { ActualRange } from "./ActualRange";
import { SeriesRenderManager } from "./SeriesRenderManager";
import { PolySimplification } from "igniteui-angular-core";
import { DefaultFlattener } from "./DefaultFlattener";
import { ChartSelection } from "./ChartSelection";
import { AxisRange } from "./AxisRange";
import { Style } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { boxArray$1 } from "igniteui-angular-core";
import { InvalidOperationException } from "igniteui-angular-core";
import { isNaN_, truncate } from "igniteui-angular-core";
import { FastItemObjectColumn } from "igniteui-angular-core";
import { Path } from "igniteui-angular-core";
import { Pool$1 } from "igniteui-angular-core";
import { PointCollection } from "igniteui-angular-core";
import { PathGeometry } from "igniteui-angular-core";
import { PolyLineSegment } from "igniteui-angular-core";
import { PathFigure } from "igniteui-angular-core";
import { PolygonUtil } from "igniteui-angular-core";
/**
* @hidden
*/
export let ShapeSeriesBase = /*@__PURE__*/ (() => {
class ShapeSeriesBase extends Series {
constructor() {
super();
this.yd = null;
this.yi = false;
this.yh = false;
this.yb = null;
this.yc = null;
this.x1 = 1;
this.xm = null;
this.xn = null;
this.assigningShapeStyle = null;
this.assigningShapeMarkerStyle = null;
this.x5 = null;
this.ye = null;
this.xx = null;
this.xz = null;
this.y4 = 0;
this.y0 = null;
this.xj = null;
this.xl = null;
this.xk = null;
this.xi = null;
this.aao = null;
this.xv = null;
this.x7 = null;
this.xq = null;
this.y7 = 0;
this.styleShape = null;
this.x5 = new ShapeSeriesRenderManager();
FastItemObjectColumn.m();
this.y7 = this.y6;
this.aao = Rect.empty;
}
pe() {
super.pe();
this.xy = null;
this.x0 = null;
}
ai() {
return [this.xy, this.x0];
}
kz(a, b) {
let c = this.no(b);
if (c == ShapeSeriesBase.$$p[9]) {
return this.k0(a, b, this.zr);
}
return null;
}
mo(a) {
let b = this.no(a);
if (b == ShapeSeriesBase.$$p[9]) {
return this.zr;
}
return super.mo(a);
}
get yf() {
return this.yd;
}
set yf(a) {
if (this.yd != a) {
let b = this.yf;
this.yd = a;
this.raisePropertyChanged("FillColumn", b, this.yf);
}
}
get_fh() {
return true;
}
get_ef() {
return true;
}
x9(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.wq(b);
let e = this.x6.df(d, false);
let f = -1;
if (e == null) {
if (a != null) {
f = this.dp.indexOf(a);
}
else {
return null;
}
}
else if (e.dataContext != null) {
f = e.dataContext.c;
}
if (f == -1) {
return null;
}
let g = new HighlightingInfo();
g.i = this;
g.g = f;
g.f = f;
g.c = false;
if (c != null && c.g == g.g && c.f == g.f) {
return c;
}
return g;
}
ya(a, b, c) {
if (this.dp == null) {
return null;
}
let d = this.x6.ch(this.wq(b));
let e = -1;
if (d == null) {
if (a != null) {
e = this.dp.indexOf(a);
}
else {
return null;
}
}
else {
e = d.ak;
}
if (e == -1) {
return null;
}
let f = new HighlightingInfo();
f.i = this;
f.g = e;
f.f = e;
f.c = false;
f.d = true;
if (c != null && c.g == f.g && c.f == f.f) {
return c;
}
return f;
}
get x2() {
return this.x1;
}
set x2(a) {
let b = this.x1;
this.x1 = a;
if (b != this.x1) {
this.raisePropertyChanged("ActualItemSearchMode", enumGetBox(ShapeItemSearchMode_$type, b), enumGetBox(ShapeItemSearchMode_$type, this.x1));
}
}
x3() {
if (this.x4 != 0) {
return this.x4;
}
return 1;
}
iy(a) {
switch (this.x2) {
case 1: return this.zx(a).c;
case 2: return this.y5(a);
case 3: return this.y5(a);
}
return -1;
}
zx(a) {
let b = this.wq(a);
let c = { $type: Point_$type, x: NaN, y: NaN };
let d = this.x6.cr;
if (d == null) {
return new Tuple$2(Number_$type, Point_$type, -1, c);
}
let e = this.x6.ci(b, false, !this.yk);
if (e != null) {
c = RectUtil.l(e.d);
return new Tuple$2(Number_$type, Point_$type, e.b, c);
}
let f = b.x;
let g = b.y;
if (this.dp == null || this.xy == null || this.x0 == null || this.y0 == null) {
return new Tuple$2(Number_$type, Point_$type, -1, c);
}
if (this.dp.count > this.za) {
return new Tuple$2(Number_$type, Point_$type, -1, c);
}
let h = 1.7976931348623157E+308;
let i = -1;
for (let j = 0; j < d.count; j++) {
let k = d._inner[j].d;
let l = RectUtil.g(k, b);
if (l < h) {
h = l;
i = d._inner[j].b;
c = RectUtil.l(d._inner[j].d);
}
}
return new Tuple$2(Number_$type, Point_$type, i, c);
}
zw(a) {
let b = this.wq(a);
let c = b.x;
let d = b.y;
let e = { $type: Point_$type, x: NaN, y: NaN };
if (this.dp == null || this.xy == null || this.x0 == null || this.y0 == null) {
return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
}
if (this.dp.count > this.za) {
return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
}
let f = 1.7976931348623157E+308;
let g = this.x6.cr;
if (g == null) {
return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
}
let h = this.x6.ci(b, false, !this.yk);
if (h != null) {
let i = RectUtil.l(h.d);
let j = this.zv(b, h.a, this.yk);
return new Tuple$3(Number_$type, Point_$type, Point_$type, h.b, j.d, i);
}
for (let k = 0; k < g.count; k++) {
let l = g._inner[k].d;
let m = RectUtil.g(l, b);
let n = (l.width * l.width) + (l.height * l.height) + m;
if (n <= f) {
f = n;
}
}
let o = 1.7976931348623157E+308;
let p = -1;
for (let q = 0; q < g.count; q++) {
let r = g._inner[q].d;
let s = RectUtil.g(r, b);
if (s < f) {
let t = this.zv(b, g._inner[q].a, this.yk);
if (t.c < o) {
o = t.c;
e = t.d;
p = q;
}
}
}
if (p >= 0) {
return new Tuple$3(Number_$type, Point_$type, Point_$type, g._inner[p].b, e, RectUtil.l(g._inner[p].d));
}
return new Tuple$3(Number_$type, Point_$type, Point_$type, -1, e, e);
}
get_yk() {
return true;
}
get yk() {
return this.get_yk();
}
zv(a, b, c) {
let d = { $type: Point_$type, x: NaN, y: NaN };
let e = 1.7976931348623157E+308;
let f = { $type: Point_$type, x: NaN, y: NaN };
let g = false;
let h = -1;
for (let i = 0; i < b.count; i++) {
let j = b._inner[i];
if (i >= 1) {
let k = CoreGeometryUtil.q(a, d, j);
if (k < e) {
e = k;
g = true;
h = i;
}
}
d = j;
}
if (c) {
let l = b._inner[0];
let m = CoreGeometryUtil.q(a, d, l);
if (m < e) {
e = m;
let n = GeometryUtil.j(a, d, l);
f = { $type: Point_$type, x: d.x + (l.x - d.x) * n, y: d.y + (l.y - d.y) * n };
return new Tuple$2(Number_$type, Point_$type, e, f);
}
}
if (g) {
let o = b._inner[h - 1];
let p = b._inner[h];
let q = GeometryUtil.j(a, o, p);
f = { $type: Point_$type, x: o.x + (p.x - o.x) * q, y: o.y + (p.y - o.y) * q };
}
return new Tuple$2(Number_$type, Point_$type, e, f);
}
y5(a) {
return this.zw(a).c;
}
wv(a, b, c) {
if (this.xy == null || this.x0 == null || this.y0 == null) {
return { $type: Point_$type, x: NaN, y: NaN };
}
switch (this.x2) {
case 1:
let d = this.zx(a);
return d.d;
case 2:
let e = this.zw(a);
return e.e;
case 3:
let f = this.zw(a);
return f.d;
}
return { $type: Point_$type, x: NaN, y: NaN };
}
kw(a) {
let b = this.kc(a);
if (this.dp != null && b >= 0 && b < this.dp.count) {
return this.dp.item(b);
}
return null;
}
x8(a, b, c) {
let d = new HighlightingInfo();
d.i = this;
d.g = 0;
d.f = this.dp.count - 1;
d.c = true;
if (c != null && c.g == d.g && c.f == d.f) {
return c;
}
return d;
}
dh(a, b, c) {
if (this.ef && this.f2(this.by) && !c) {
let d = this.x9(a, b, this.yb);
this.yb = d;
return d;
}
else {
let e = this.x8(a, b, this.yb);
this.yb = e;
return e;
}
}
di(a, b, c) {
if (this.f2(this.by) && !c) {
let d = this.ya(a, b, this.yc);
this.yc = d;
return d;
}
else {
let e = this.x8(a, b, this.yc);
e.d = true;
this.yc = e;
return e;
}
}
yy() {
return (this.assigningShapeStyle != null && this.yi) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1) || (this.yf != null && this.xu != null);
}
yx() {
return (this.assigningShapeMarkerStyle != null && this.yh) || this.d3 || (this.by != 1) || (this.cq != 1) || (this.cp != 1);
}
get zi() {
return this.c(ShapeSeriesBase.aae);
}
set zi(a) {
this.h(ShapeSeriesBase.aae, a);
}
gh() {
return this.highlightedItemsSource != null || this.zi != null;
}
hz() {
let a = super.hz();
{
let b = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "ShapeMemberPath";
$ret.p = true;
$ret.y = "HighlightedShapeMemberPath";
$ret.q = true;
return $ret;
})());
b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.z0));
a.add(b);
}
{
let c = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Brush";
$ret.p = true;
$ret.y = "ActualBrush";
$ret.q = true;
return $ret;
})());
c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.sh));
a.add(c);
}
{
let d = ((() => {
let $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Outline";
$ret.p = true;
$ret.y = "ActualOutline";
$ret.q = true;
return $ret;
})());
d.valueResolving = delegateCombine(d.valueResolving, runOn(this, this.sh));
a.add(d);
}
return a;
}
z0(a, b) {
if (this.zi != null) {
b.value = this.zi;
return;
}
b.value = this.zr;
}
get yg() {
return this.ye;
}
set yg(a) {
let b = this.yg != a;
if (b) {
let c = this.yg;
this.ye = a;
this.raisePropertyChanged("ShapeColumn", c, this.yg);
}
}
yp(array_) {
let a = (Array.isArray(array_));
return a;
}
static yt(a) {
if (a == null) {
return true;
}
let val_ = a;
return (val_ == undefined);
}
convertToListList(a) {
if (a == null) {
return null;
}
let b = new List$1(List$1.$.specialize(Point_$type), 0);
let c;
let curr_;
let d;
let e;
let f = false;
let g = false;
for (let h = 0; h < a.length; h++) {
c = a[h];
if (c == null) {
continue;
}
let i = new List$1(Point_$type, 0);
for (let j = 0; j < c.length; j++) {
curr_ = c[j];
if (f) {
d = (curr_.X);
e = (curr_.Y);
}
else {
d = (curr_.x);
e = (curr_.y);
}
if (!g) {
if ((isNaN_(d) || ShapeSeriesBase.yt(d)) && (isNaN_(e) || ShapeSeriesBase.yt(e))) {
d = (curr_.X);
e = (curr_.Y);
if (!isNaN_(d) && !ShapeSeriesBase.yt(d) && !isNaN_(e) && !ShapeSeriesBase.yt(e)) {
g = true;
f = true;
}
}
else {
g = true;
}
}
i.add({ $type: Point_$type, x: d, y: e });
}
b.add(i);
}
return b;
}
dn(a) {
if (this.dp != null && this.yp(this.itemsSource) && a != null && a.split('!').length != 2) {
if (this.coercionMethods == null) {
this.coercionMethods = {};
}
let methods_ = this.coercionMethods;
methods_.convertToListList = this.convertToListList;
a += "!convertToListList";
}
return super.dn(a);
}
rp(a, b, c, d) {
super.rp(a, b, c, d);
let e = false;
let f = false;
switch (b) {
case ShapeSeriesBase.$$p[5]:
this.x2 = this.x3();
break;
case "FastItemsSource":
let g = typeCast(IFastItemsSource_$type, c);
if (g != null) {
if (this.yf != null) {
g.deregisterColumn(this.yf);
}
if (this.yg != null) {
g.deregisterColumn(this.yg);
}
this.yg = null;
}
let h = typeCast(IFastItemsSource_$type, d);
if (h != null) {
if (this.zr != null) {
this.yg = this.dn(this.zr);
}
if (this.ze != null) {
this.yf = this.dl(this.ze);
}
}
e = this.xy != null && !this.xy.ec();
f = this.x0 != null && !this.x0.ec();
if (e || f) {
this.r7(this.gm && c != null);
}
break;
case ShapeSeriesBase.$$p[9]:
if (this.dp != null) {
this.dp.deregisterColumn(this.yg);
this.yg = this.dn(this.zr);
}
break;
case "ShapeColumn":
this.z8();
e = this.xy != null && !this.xy.ec();
f = this.x0 != null && !this.x0.ec();
if (e || f) {
this.r7(this.gm && this.d9);
}
this.qz();
break;
case ShapeSeriesBase.$$p[10]:
case ShapeSeriesBase.$$p[11]:
this.xx = this.xy;
this.xz = this.x0;
let i = c;
let j = d;
this.z9(i);
this.z1(j);
if ((j != null && !j.ec()) || (j == null && i != null)) {
this.r7(false);
}
this.qz();
break;
case "ActualResolution":
this.y4 = this.ik;
this.qz();
break;
case "ActualBrush":
this.r7(false);
break;
case ShapeSeriesBase.$$p[8]:
this.y7 = this.y6;
this.r7(false);
this.qz();
break;
case ShapeSeriesBase.$$p[2]:
case "ActualThickness":
this.r7(false);
this.qz();
break;
case ShapeSeriesBase.$$p[4]:
this.yi = this.yw();
this.r7(false);
break;
case ShapeSeriesBase.$$p[3]:
this.yh = this.yv();
this.r7(false);
break;
case ShapeSeriesBase.$$p[1]:
if (c != null) {
c.o.remove(this);
c.x();
this.xv = null;
this.x7 = null;
}
if (d != null) {
d.o.add(this);
d.x();
this.xv = typeCast(CustomPaletteBrushScale.$, d);
this.x7 = typeCast(ValueBrushScale.$, d);
}
this.r7(false);
this.qz();
break;
case "FillColumn":
this.r7(this.gm && this.d9);
this.qz();
break;
case ShapeSeriesBase.$$p[0]:
if (this.xu != null) {
this.xu.x();
}
if (this.dp != null) {
this.dp.deregisterColumn(this.yf);
this.yf = this.dl(this.ze);
}
break;
}
}
yw() {
return this.ys;
}
yv() {
return this.yr;
}
ym(a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
}
yl(a) {
if (typeCast(NumericXAxis.$, a) !== null) {
return true;
}
return false;
}
z8() {
this.y0 = null;
if (this.yg == null) {
return;
}
this.y0 = new List$1(Rect.$, 2, this.yg.count);
for (let a = 0; a < this.yg.count; a++) {
this.y0.add(PointCollectionUtil.j(this.yg.item(a)));
}
}
aap(a) {
if (typeCast(IEnumerable$1_$type.specialize(IEnumerable$1_$type.specialize(Point_$type)), a) !== null) {
return PointCollectionUtil.h(a);
}
else if (typeCast(IEnumerable$1_$type.specialize(Point_$type), a) !== null) {
return PointCollectionUtil.g(a);
}
return Rect.empty;
}
y2(a, b, c, d, e, f, g) {
return this.y3(a, b, c, d, e, f, g);
if (typeCast(List$1.$.specialize(List$1.$.specialize(Point_$type)), c) !== null) {
return this.y3(a, b, c, d, e, f, g);
}
else if (typeCast(IEnumerable$1_$type.specialize(IEnumerable$1_$type.specialize(Point_$type)), c) !== null) {
let h = c;
let i = new List$1(FlattenedShape.$, 0);
let j = null;
for (let k of fromEnum(h)) {
j = this.xw(a, b, PointCollectionUtil.b(k), d, e, f, g);
if (j == null) {
continue;
}
i.add(j);
}
return i;
}
else if (typeCast(IEnumerable$1_$type.specialize(Point_$type), c) !== null) {
let l = c;
let m = this.xw(a, b, PointCollectionUtil.b(l), d, e, f, g);
let n = new List$1(FlattenedShape.$, 0);
if (m != null) {
n.add(m);
}
return n;
}
else {
throw new InvalidOperationException(1, "Unrecognized data in ShapeColumn");
}
}
get_yq() {
return true;
}
get yq() {
return this.get_yq();
}
yz() {
return false;
}
r8(a) {
this.z7(this.cw);
}
r6(a, b, c, d, e) {
super.r6(a, b, c, d, e);
let f = this.ba.a$k.item(d);
let g = f;
f.bd(c);
if (this.d7(f)) {
return;
}
this.z7(f);
}
updateFillScaleGlobals() {
let a = new ActualRange();
a.b = NaN;
a.a = NaN;
if (this.yf != null) {
a.b = this.yf.minimum;
a.a = this.yf.maximum;
}
if (this.xu != null) {
this.xu.z(a.b, a.a);
}
}
z7(a) {
if (this.d7(a)) {
return;
}
if (this.xu != null) {
this.xq = this.xr();
}
let b;
let c;
let d = a;
let e = a.getViewInfo(c, b);
c = e.p0;
b = e.p1;
if (c.width < 1 || c.height < 1 || this.yg == null) {
return;
}
let f = this.xy;
let g = this.x0;
let h = this.getEffectiveViewport1(a);
let i = new ScalerParams(1, b, c, f.dn);
i.c = h;
let j = new ScalerParams(1, b, c, g.dn);
j.c = h;
if (!this.gx) {
d.c7();
let k = new Rect(0, 0, 0, 0, 0);
let l;
let m;
let n;
let o;
let p = this.yg.count;
if (this.xl == null || this.xl.length != p) {
this.xl = new Array(p);
this.xj = new Array(p);
this.xk = new Array(p);
this.xi = new Array(p);
}
let q = this.xl;
let r = this.xj;
let s = this.xk;
let t = this.xi;
let u;
for (let v = 0; v < p; v++) {
u = this.y0._inner[v];
q[v] = u.top;
r[v] = u.left;
s[v] = u.right;
t[v] = u.bottom;
}
this.xx.ky(boxArray$1(r), 0, r.length, i);
this.xx.ky(boxArray$1(s), 0, s.length, i);
this.xz.ky(boxArray$1(q), 0, q.length, j);
this.xz.ky(boxArray$1(t), 0, t.length, j);
d.c8(r, q, s, t);
let w = this.yg;
let x = this.dp;
this.aaa(d);
let y = c.left;
let z = c.right;
let aa = c.top;
let ab = c.bottom;
let ac = null;
if (this.aao.isEmpty) {
ac = null;
}
else {
ac = new Clipper(1, this.aao.left, this.aao.bottom, this.aao.right, this.aao.top, this.yq);
}
let ad = this.yz();
if (ad) {
d.cp.clear();
}
let ae = false;
let af = true;
let ag = 0;
if (this.dc != null) {
if (this.dc.g0()) {
let ah = this.dc.oj(b, i);
ae = ah.c;
ag = ah.d;
}
}
let ai;
for (let aj = 0; aj < p; aj++) {
n = r[aj];
l = q[aj];
m = t[aj];
o = s[aj];
k.x = Math.min(n, o);
k.y = Math.min(l, m);
k.width = Math.max(n, o) - k.x;
k.height = Math.max(l, m) - k.y;
if (k.intersectsWith(c)) {
if (k.x < y || k.y < aa || k.x > z || k.y > ab) {
ai = ac;
}
else {
ai = null;
}
let ak = this.y2(a, ai, w.item(aj), i, j, 0, ag);
if (ad) {
ShapeSeriesBase.z6(d, aj, ak);
}
d.cv(aj, x.item(aj), k, ak);
}
else if (ae) {
k.x = k.x + ag;
if (k.intersectsWith(c)) {
if (k.x < y || k.y < aa || k.x > z || k.y > ab) {
ai = ac;
}
else {
ai = null;
}
let al = this.y2(a, ai, w.item(aj), i, j, ag, ag);
if (ad) {
ShapeSeriesBase.z6(d, aj, al);
}
d.cv(aj, x.item(aj), k, al);
}
}
}
d.c6();
}
let am = this.yy();
this.x5.az(this, this.yy(), runOn(this, this.xo));
let an = false;
let ao = this.x5.b;
if (ao != null) {
an = true;
}
let ap = a.t;
let aq = this.f1;
let ar = d.cn;
d.c2((as) => {
let at = as.dataContext != null ? as.dataContext.item : null;
let au = as.dataContext != null ? as.dataContext.c : -1;
d.cz(as, at, am);
if (an) {
this.z3(as, aq, au, this.yg.count, ap, ar);
}
else {
if (ar) {
{
this.x5.a1(as, this.ii, ar);
}
}
}
{
this.x5.ad(as, false, false, false, false);
}
});
}
xr() {
let a = new ActualRange();
a.b = NaN;
a.a = NaN;
if (this.yf != null) {
a.b = this.yf.minimum;
a.a = this.yf.maximum;
}
let b = typeCast(ValueBrushScale.$, this.xu);
if (b != null) {
b.s();
if (this.yn && this.xu.o.count > 1) {
a.b = b.q;
a.a = b.p;
}
}
return a;
}
z3(a, b, c, d, e, f) {
let g = this.by != 1;
let h = this.cq != 1;
let i = this.cp != 1;
this.x5.a0(this.x5.b, c, d, false);
{
this.x5.a1(a, this.ii, f);
}
let j = this.x5.ax;
let k = null;
let l = null;
let m = null;
let n = this.dp;
if (this.yf != null && this.xu != null) {
if (j.z >= 0 && j.z < this.yf.count) {
let o = this.yf.item(j.z);
let p = this.xq;
let q = p.b;
let r = p.a;
let s = j.aa;
if (this.xv != null) {
s = this.xv.getBrush1(j.z, this.yf.count);
}
else if (this.x7 != null && this.yf != null) {
let t = this.yf.item(j.z);
s = this.x7.getBrushByRange(t, q, r);
}
else if (this.xu != null) {
s = this.xu.getBrush(j.z);
}
j.aa = s;
}
}
if (g && this.dc != null) {
k = this.dc.d7.getHighlightingInfo(this, n, j.z, j.y, false);
j.c = k;
}
if (h && this.dc != null) {
l = this.dc.d8.getHighlightingInfo(this, n, j.z, j.y, false);
if (l == null && this.bo != null) {
l = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, j.z, j.y, false);
}
if (l == null && this.bl != null) {
l = this.dc.d8.getHighlightingInfo(this.bl, this.bl.dp, j.z, j.y, true);
}
j.d = l;
}
if (i && this.dc != null) {
m = this.dc.d6.getHighlightingInfo(this, n, j.z, j.y, false);
j.b = m;
}
j.h = e;
this.z5(j);
this.x5.z(this, k, l, m, e, g, h, i, false);
}
z2(a, b, c) {
let d = this.by != 1;
let e = this.cq != 1;
let f = this.cp != 1;
this.x5.a0(this.x5.d, a, b, true);
this.x5.aa(this.ii);
let g = this.x5.aw;
let h = null;
let i = null;
let j = null;
let k = this.dp;
let l = null;
let m = null;
let n = null;
if (d && this.dc != null) {
h = this.dc.d7.getHighlightingInfo(this, k, g.z, g.y, true);
if (this.dc.d7.isCrossContextHighlight(this)) {
l = this.dc.d7.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.c = h;
}
if (e && this.dc != null) {
i = this.dc.d8.getHighlightingInfo(this, k, g.z, g.y, true);
if (i == null && this.bo != null) {
i = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, g.z, g.y, true);
}
if (this.dc.d8.isCrossContextHighlight(this)) {
m = this.dc.d8.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.d = i;
}
if (f && this.dc != null) {
j = this.dc.d6.getHighlightingInfo(this, k, g.z, g.y, true);
if (this.dc.d6.isCrossContextHighlight(this)) {
n = this.dc.d6.getHighlightingInfo(this, k, g.z, g.y, true);
}
g.b = i;
}
g.h = c;
this.z4(g);
this.x5.y(this, h, i, j, c, d, e, f, g.v, this.dc.d7.totalHighWaterMark, g.x, this.dc.d8.totalHighWaterMark, g.t, this.dc.d6.totalHighWaterMark);
}
z5(a) {
if (this.assigningShapeStyle != null && this.yi) {
this.assigningShapeStyle(this, a);
}
}
z4(a) {
if (this.assigningShapeMarkerStyle != null && this.yh) {
this.assigningShapeMarkerStyle(this, a);
}
}
xo(a, b) {
return this.xp(a, b);
}
xp(a, b) {
if (b < a || a < 0 || a > this.yg.count || b < 0 || b > this.yg.count) {
return null;
}
let c = new Array((b - a) + 1);
for (let d = a; d <= b; d++) {
let e = d;
c[d - a] = this.dp.item(d);
}
return c;
}
static z6(a, b, c) {
let d = 0;
let e = null;
for (let f = 0; f < c.count; f++) {
let g = c._inner[f];
let h = g.b.width * g.b.height;
if (h > d) {
d = h;
e = g;
}
}
a.cp.addItem(b, e);
}
qo() {
super.qo();
if (this.xy != null) {
this.xy.lu();
}
if (this.x0 != null) {
this.x0.lu();
}
}
s8(a, b) {
this.r7(false);
}
s7(a, b) {
this.r7(false);
}
pn(a, b, c, d) {
super.pn(a, b, c, d);
switch (a) {
case 3:
if (d == this.zr) {
this.y0._inner[b] = this.aap(this.yg.item(b));
}
break;
case 1:
for (let e = b; e < b + c; e++) {
this.y0.insert(e, this.aap(this.yg.item(e)));
}
break;
case 0:
this.y0.v(b, c);
break;
case 2:
for (let f = b; f < b + c; f++) {
this.y0._inner[f] = this.aap(this.yg.item(f));
}
break;
case 4:
this.z8();
break;
}
this.r7(false);
}
hk(a, b, c) {
let d = true;
if (!super.hk(a, b, c) || (this.yu && this.yg == null) || b.isEmpty || a.isEmpty || this.xy == null || this.x0 == null || this.xy.b2 == null || this.x0.b2 == null || this.xy.qt == this.xy.qs || this.x0.qt == this.x0.qs || this.yg == null || this.yg.count == 0 || this.y0 == null || this.y0.count == 0 || this.y0.count != this.yg.count) {
d = false;
}
return d;
}
get_yu() {
return true;
}
get yu() {
return this.get_yu();
}
rg(a) {
super.rg(a);
this.x6 = typeCast(ShapeSeriesViewBase.$, a);
}
y3(a, b, c, d, e, f, g) {
let h = new List$1(FlattenedShape.$, 0);
let i;
let j = c.count;
for (let k = 0; k < j; k++) {
i = c._inner[k];
let l = this.xw(a, b, i, d, e, f, g);
if (l == null) {
continue;
}
h.add(l);
}
return h;
}
xw(a, b, c, d, e, f, g) {
let h = this.zy(c, d, e);
let i = h.c;
let j = h.d;
let k = i.length;
let l = 1.7976931348623157E+308;
let m = 1.7976931348623157E+308;
let n = -1.7976931348623157E+308;
let o = -1.7976931348623157E+308;
let p;
let q;
if (f != 0) {
for (let r = 0; r < k; r++) {
i[r] = i[r] + f;
}
}
for (let s = 0; s < k; s++) {
p = i[s];
q = j[s];
l = p < l ? p : l;
m = q < m ? q : m;
n = p > n ? p : n;
o = q > o ? q : o;
}
let t = !(l > this.aao.right || n < this.aao.left || m > this.aao.bottom || o < this.aao.top);
if (!t && f == 0 && g != 0) {
if (g != 0) {
for (let u = 0; u < k; u++) {
i[u] = i[u] + g;
}
}
for (let v = 0; v < k; v++) {
p = i[v];
q = j[v];
l = p < l ? p : l;
m = q < m ? q : m;
n = p > n ? p : n;
o = q > o ? q : o;
}
t = !(l > this.aao.right || n < this.aao.left || m > this.aao.bottom || o < this.aao.top);
}
if (!t) {
return null;
}
let w = b != null && (l < this.aao.left || m < this.aao.top || n > this.aao.right || o > this.aao.bottom);
let x = new Rect(0, l, m, n - l, o - m);
if (!a.co(x)) {
return null;
}
l = l < this.aao.left ? this.aao.left : l;
n = n > this.aao.right ? this.aao.right : n;
m = m < this.aao.top ? this.aao.top : m;
o = o > this.aao.bottom ? this.aao.bottom : o;
let y = PolySimplification.b(h, this.ik);
let z = new DefaultFlattener().c(h.c, h.d, y, this.y4);
let aa = z.count;
if (w) {
let ab = new List$1(Point_$type, 0);
b.i = ab;
for (let ac = 0; ac < aa; ac++) {
b.j(z._inner[ac]);
}
b.i = null;
z = ab;
}
if (z == null || z.count == 0) {
return null;
}
let ad = new FlattenedShape();
ad.a = z;
ad.b = new Rect(0, l, m, n - l, o - m);
ad.c = x;
return ad;
}
zy(a, b, c) {
let d = this.xx;
let e = this.xz;
let f = a.count;
let g = new Array(f);
let h = new Array(f);
for (let i = 0; i < f; i++) {
g[i] = a._inner[i].x;
h[i] = a._inner[i].y;
}
d.ky(boxArray$1(g), 0, g.length, b);
e.ky(boxArray$1(h), 0, h.length, c);
return new Tuple$2(Array_$type, Array_$type, g, h);
}
aaa(a) {
a.dd();
}
ph(a, b) {
super.ph(a, b);
let c = b;
c.c0();
}
z1(a) {
if (a != null) {
a.d3(this);
}
}
z9(a) {
if (a != null) {
a.cx(this);
}
}
zz(a, b, c) {
let d = this.cw;
let e = d.b9;
let f = this.dc.y6(this.dc.yw(a));
if (e.width < 1 || e.height < 1 || this.yg == null) {
return;
}
let g = this.getEffectiveViewport1(d);
let h = new ScalerParams(0, f, e, this.xy.dn, g);
let i = new ScalerParams(0, f, e, this.x0.dn, g);
d.c7();
let j = this.yg.count;
let k = new Array(j);
let l = new Array(j);
let m = new Array(j);
let n = new Array(j);
let o;
for (let p = 0; p < j; p++) {
o = this.y0._inner[p];
k[p] = o.top;
l[p] = o.left;
m[p] = o.right;
n[p] = o.bottom;
}
this.xy.ky(boxArray$1(l), 0, l.length, h);
this.xy.ky(boxArray$1(m), 0, m.length, h);
this.x0.ky(boxArray$1(k), 0, k.length, i);
this.x0.ky(boxArray$1(n), 0, n.length, i);
d.c8(l, k, m, n);
d.dd();
let q = null;
if (!this.aao.isEmpty) {
q = new Clipper(1, this.aao.left, this.aao.bottom, this.aao.right, this.aao.top, this.yq);
}
let r = false;
let s = 0;
if (this.dc != null) {
if (this.dc.g0()) {
let t = this.dc.oj(f, h);
r = t.c;
s = t.d;
}
}
let u, v, w, x;
let y = new Rect(0, 0, 0, 0, 0);
for (let z = 0; z < j; z++) {
w = l[z];
u = k[z];
v = n[z];
x = m[z];
y.x = Math.min(w, x);
y.y = Math.min(u, v);
y.width = Math.max(w, x) - y.x;
y.height = Math.max(u, v) - y.y;
if (r) {
y.x = y.x + s;
}
if (!y.intersectsWith(e)) {
continue;
}
let aa = this.y2(d, q, this.yg.item(z), h, i, s, s);
if (aa.count <= 0) {
continue;
}
this.yj(b, c, z);
}
}
yj(a, b, c) {
if (b == 7 || b == 6) {
a.add(((() => {
let $ret = new ChartSelection();
$ret.series = this;
return $ret;
})()));
return false;
}
else if (b == 1 || b == 2) {
a.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.dp.item(c);
return $ret;
})()));
return true;
}
else {
a.add(((() => {
let $ret = new ChartSelection();
$ret.item = this.dp.item(c);
$ret.series = this;
return $ret;
})()));
return true;
}
}
a2(a, b) {
let c = this.x6.df(a, b);
let d = null;
if (c != null) {
d = c.dataContext;
}
if (d != null) {
return d;
}
return super.a2(a, b);
}
b3() {
if (this.b4 == 0) {
return 1;
}
else {
return super.b3();
}
}
g2(a, b) {
if (this.g5(a, b)) {
return true;
}
return false;
}
g5(a, b) {
if (this.a2(a, b) != null) {
return true;
}
return false;
}
zb(a) {
return this.dp.item(a);
}
get_hd() {
return true;
}
set_hd(a) {
super.set_hd(a);
}
ay(a) {
if (typeCast(NumericXAxis.$, a) !== null && this.y0 != null) {
let b = 1.7976931348623157E+308;
let c = -1.7976931348623157E+308;
for (let d of fromEnum(this.y0)) {
b = Math.min(b, d.left);
c = Math.max(c, d.right);
}
return new AxisRange(b, c);
}
if (typeCast(NumericYAxis.$, a) !== null && this.y0 != null) {
let e = 1.7976931348623157E+308;
let f = -1.7976931348623157E+308;
for (let g of fromEnum(this.y0)) {
e = Math.min(e, g.top);
f = Math.max(f, g.bottom);
}
return new AxisRange(e, f)