igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
964 lines (963 loc) • 35.8 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends, __values } from "tslib";
import { AnnotationLayer } from "./AnnotationLayer";
import { ValueLayerValueMode_$type } from "./ValueLayerValueMode";
import { DependencyProperty } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { Series } from "./Series";
import { Axis } from "./Axis";
import { Base, enumGetBox, Delegate_$type, Number_$type, typeCast, fromEnum, Point_$type, markType, markDep, runOn } from "igniteui-react-core";
import { Thickness } from "igniteui-react-core";
import { Visibility_$type } from "igniteui-react-core";
import { OverlayTextLocation_$type } from "./OverlayTextLocation";
import { AnnotationAppearanceMode_$type } from "./AnnotationAppearanceMode";
import { OverlayTextUtil } from "./OverlayTextUtil";
import { ValueLayerFrame } from "./ValueLayerFrame";
import { List$1 } from "igniteui-react-core";
import { Dictionary$2 } from "igniteui-react-core";
import { Pool$1 } from "igniteui-react-core";
import { AxisAnnotation } from "./AxisAnnotation";
import { DataLegendSeriesContext } from "igniteui-react-core";
import { DataLegendSeriesValueInfo } from "igniteui-react-core";
import { AxisAnnotationFrameManager } from "./AxisAnnotationFrameManager";
import { DoubleCollection } from "igniteui-react-core";
import { DeviceUtils } from "igniteui-react-core";
import { OverlayTextUpdatingEventArgs } from "./OverlayTextUpdatingEventArgs";
import { OverlayTextInfo } from "./OverlayTextInfo";
import { AnnotationLayerView } from "./AnnotationLayerView";
import { TextBlock } from "igniteui-react-core";
import { Rectangle } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { Tuple$2 } from "igniteui-react-core";
import { Path } from "igniteui-react-core";
import { PathGeometry } from "igniteui-react-core";
import { PathFigure } from "igniteui-react-core";
import { LineSegment } from "igniteui-react-core";
import { BrushUtil } from "igniteui-react-core";
import { PropertyMetadata } from "igniteui-react-core";
import { isNaN_ } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
import { Defaults } from "./Defaults";
import { TranslateTransform } from "igniteui-react-core";
import { LineGeometry } from "igniteui-react-core";
/**
* @hidden
*/
var ValueLayer = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ValueLayer, _super);
function ValueLayer() {
var _this = _super.call(this) || this;
_this.aap = null;
_this.aaa = [NaN, NaN];
_this.aaj = null;
_this.aak = null;
_this.afh = null;
_this.stylingOverlayText = null;
_this.aa0 = null;
_this.aaz = null;
var a = new ValueLayerFrame();
var b = new ValueLayerFrame();
var c = new ValueLayerFrame();
var d = _this.ke / 1000;
_this.xh = a;
_this.xg = b;
_this.xi = c;
_this.ab = ValueLayer.$;
_this.aap = OverlayTextUtil.c();
return _this;
}
ValueLayer.prototype.bk = function () {
return new ValueLayer();
};
ValueLayer.prototype.get_ev = function () {
return true;
};
ValueLayer.prototype.ct = function () {
return new ValueLayerView(this);
};
ValueLayer.prototype.q3 = function (a) {
_super.prototype.q3.call(this, a);
this.aao = a;
};
ValueLayer.prototype.gv = function (a) {
if (this.aal == null) {
return true;
}
if (this.aal == a) {
return true;
}
return false;
};
Object.defineProperty(ValueLayer.prototype, "afj", {
get: function () {
return new Thickness(1, this.abd, this.abf, this.abe, this.abc);
},
enumerable: false,
configurable: true
});
Object.defineProperty(ValueLayer.prototype, "afk", {
get: function () {
return new Thickness(1, this.abj, this.abl, this.abk, this.abi);
},
enumerable: false,
configurable: true
});
Object.defineProperty(ValueLayer.prototype, "aaq", {
get: function () {
return this.aap;
},
set: function (a) {
var b = this.aap;
if (OverlayTextUtil.q(a)) {
a = OverlayTextUtil.c();
}
this.aap = a;
if (b != this.aap) {
this.raisePropertyChanged("OverlayTextStyle", b, this.aap);
}
},
enumerable: false,
configurable: true
});
ValueLayer.prototype.me = function () {
return "Value Layer";
};
ValueLayer.prototype.get_isSummarizationSupported = function () {
return false;
};
ValueLayer.prototype.i6 = function (a, b, c) {
if (isNaN_(this.aaa[0]) && isNaN_(this.aaa[1])) {
return _super.prototype.i6.call(this, a, b, c);
}
if (!isNaN_(this.aaa[0])) {
return this.aaa[0];
}
return this.aaa[1];
};
ValueLayer.prototype.getDataLegendSeriesContextAt = function (a, b) {
if (isNaN_(this.aaa[0]) || isNaN_(this.aaa[1])) {
return _super.prototype.getDataLegendSeriesContextAt.call(this, a, b);
}
if (this.aal == null) {
var c_1 = new DataLegendSeriesValueInfo();
c_1.l = this.aaa[0];
c_1.a = 0;
c_1.q = "Value";
c_1.r = "Value";
c_1.s = "";
var d_1 = new DataLegendSeriesValueInfo();
d_1.l = this.aaa[1];
d_1.a = 0;
d_1.q = "Value";
d_1.r = "Value";
d_1.s = "";
var e = new DataLegendSeriesContext();
e.e = ((function () {
var $ret = new List$1(DataLegendSeriesValueInfo.$, 0);
$ret.add(c_1);
$ret.add(d_1);
return $ret;
})());
e.h = this.me();
return e;
}
var f = this.aal.getDataLegendSeriesContextAt(a, b);
var g = typeCast(DataLegendSeriesContext.$, f);
if (g == null || g.e == null) {
return _super.prototype.getDataLegendSeriesContextAt.call(this, a, b);
}
if (g.e.count == 0) {
g.e._inner[0].l = isNaN_(this.aaa[0]) ? this.aaa[1] : this.aaa[0];
}
else {
g.e._inner[0].l = this.aaa[0];
g.e._inner[1].l = this.aaa[1];
}
return g;
};
ValueLayer.prototype.yw = function (a, b) {
if (this.aal == null || this.aal == a) {
if (!this.a1.c) {
this.ru(b);
}
}
};
ValueLayer.prototype.yy = function (a, b) {
var e_1, _a, e_2, _b;
_super.prototype.yy.call(this, a, b);
var c = a;
var d = this.aay;
var e = this.aax;
c.af.clear();
c.ag.clear();
c.ae.clear();
c.ah.clear();
AxisAnnotationFrameManager.b(c);
this.aaa = [NaN, NaN];
this.aaj = null;
this.aak = null;
this.aao.cu();
var f = this.aam();
if (this.xn(this.aal)) {
var g = this.aal.aq(f);
this.aaa = g;
this.adf(c, d, e, this.aal);
}
else {
if (f == 5 || f == 4 || f == 6) {
var h = null;
var i = null;
var j = [NaN, NaN];
var k = 0;
try {
for (var _c = __values(fromEnum(this.dc.series)), _d = _c.next(); !_d.done; _d = _c.next()) {
var l = _d.value;
if (!this.xn(l)) {
continue;
}
var m = l.ai();
for (var o = 0; o < m.length; o++) {
var n = m[o];
if (!this.aas(n)) {
continue;
}
var p = n.cp ? 1 : 0;
var q = j[p];
var r = null;
if (f == 5) {
var s = l.i9(2, n);
if (!isNaN_(s) && (s > q || isNaN_(q))) {
r = l;
}
q = !isNaN_(q) ? Math.max(s, q) : s;
}
else if (f == 4) {
var t = l.i9(1, n);
if (!isNaN_(t) && (t < q || isNaN_(q))) {
r = l;
}
q = !isNaN_(q) ? Math.min(t, q) : t;
}
else if (f == 6) {
var u = l.i9(3, n);
r = l;
q = !isNaN_(q) ? q + u : u;
}
if (n.cp) {
i = r != null ? r : i;
}
else {
h = r != null ? r : h;
}
j[p] = q;
}
k++;
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_d && !_d.done && (_a = _c.return))
_a.call(_c);
}
finally {
if (e_1)
throw e_1.error;
}
}
if (f == 6) {
j[0] = !isNaN_(j[0]) ? j[0] / k : NaN;
j[1] = !isNaN_(j[1]) ? j[1] / k : NaN;
}
if (h != null && !isNaN_(j[0])) {
var v = h.wl(j);
this.adi(h, { $type: Point_$type, x: v.x, y: NaN }, c, d, e);
}
if (i != null && !isNaN_(j[1])) {
var w = i.wl(j);
this.adi(i, { $type: Point_$type, x: NaN, y: w.y }, c, d, e);
}
this.aaa = j;
this.aaj = h;
this.aak = i;
}
else {
try {
for (var _e = __values(fromEnum(this.dc.series)), _f = _e.next(); !_f.done; _f = _e.next()) {
var x = _f.value;
this.adf(c, d, e, x);
}
}
catch (e_2_1) {
e_2 = { error: e_2_1 };
}
finally {
try {
if (_f && !_f.done && (_b = _e.return))
_b.call(_e);
}
finally {
if (e_2)
throw e_2.error;
}
}
}
}
};
ValueLayer.prototype.adf = function (a, b, c, d) {
var _this = this;
if (this.xn(d)) {
this.adh(d, a, b, c);
}
if (d.isStacked) {
d.p5(function (e) {
if (_this.xn(e)) {
_this.adh(e, a, b, c);
}
if (e.ei) {
e.p3(function (f) {
if (_this.xn(f)) {
_this.adh(f, a, b, c);
}
return true;
});
}
return true;
});
}
if (d.ei) {
d.p3(function (e) {
if (_this.xn(e)) {
_this.adh(e, a, b, c);
}
return true;
});
}
};
ValueLayer.prototype.xn = function (a) {
if (!_super.prototype.xn.call(this, a)) {
return false;
}
if (this.acl != null) {
if (a.isFragment) {
var b = a.ne();
if (!Base.equalsStatic(this.acl, b)) {
return false;
}
}
else {
if (!Base.equalsStatic(this.acl, a.name)) {
return false;
}
}
}
return true;
};
ValueLayer.prototype.aas = function (a) {
if (!a.cj) {
return false;
}
if (this.aae != null && this.aae != a) {
return false;
}
if (this.aci != null && !Base.equalsStatic(this.aci, a.name)) {
return false;
}
return true;
};
ValueLayer.prototype.qr = function () {
_super.prototype.qr.call(this);
if (!this.a1.c && !this.d4()) {
return;
}
if (this.d4()) {
this.adj(this.xi, false);
}
else {
this.adj(this.xg, false);
}
};
ValueLayer.prototype.aam = function () {
if (this.aan == 0) {
return 2;
}
return this.aan;
};
ValueLayer.prototype.w7 = function () {
return 3;
};
ValueLayer.prototype.xu = function () {
return 0.3;
};
ValueLayer.prototype.xx = function () {
return -0.4;
};
ValueLayer.prototype.xw = function () {
return 0.5;
};
ValueLayer.prototype.zz = function () {
return this.w4 == 3 ? this.afi() : null;
};
ValueLayer.prototype.z0 = function () {
return this.w5 == 3 ? this.afi() : null;
};
ValueLayer.prototype.afi = function () {
if (this.afh == null) {
this.afh = new DoubleCollection();
this.afh.add(DeviceUtils.g(5));
this.afh.add(DeviceUtils.g(5));
}
return this.afh;
};
ValueLayer.prototype.adg = function () {
if (OverlayTextUtil.q(this.aap)) {
this.aap = OverlayTextUtil.c();
}
else if (OverlayTextUtil.k(this.aap)) {
this.aap = this.cw.l(this.aap.fontString);
}
};
ValueLayer.prototype.adi = function (a, b, c, d, e) {
var f = false;
var g = this.ae5;
if (g == null) {
g = a.ve;
f = true;
}
var h = false;
var i = this.afb;
if (i == null) {
if (this.ae5 != null) {
i = this.ae5;
}
else {
i = a.ve;
h = true;
}
}
var j = false;
var k = this.afe;
if (k == null) {
if (this.ae5 != null) {
k = this.ae5;
}
else {
k = a.ve;
j = true;
}
}
var l = g;
var m = g;
var n = i;
var o = k;
if (this.ae6 != null) {
l = this.ae6;
}
else if (f) {
switch (this.w4) {
case 1:
l = this.aao.ck(l, this.xr);
break;
case 2:
l = this.aao.cm(l, this.xr);
break;
case 4:
l = this.aao.cl(l, this.xr);
break;
}
}
if (this.afa != null) {
m = this.afa;
}
else if (f) {
switch (this.w5) {
case 1:
m = this.aao.ck(m, this.xt);
break;
case 2:
m = this.aao.cm(m, this.xt);
break;
case 4:
m = this.aao.cl(m, this.xt);
break;
}
}
if (h) {
switch (this.w5) {
case 1:
n = this.aao.ck(n, this.xt);
break;
case 2:
n = this.aao.cm(n, this.xt);
break;
}
}
if (j) {
switch (this.w4) {
case 1:
o = this.aao.ck(o, this.xr);
break;
case 2:
o = this.aao.cm(o, this.xr);
break;
}
}
c.ae.add(l);
c.ah.add(m);
c.af.add(b.y);
c.ag.add(b.x);
var p = isNaN_(b.x);
var q = p ? b.y : b.x;
this.adg();
var r = this.aaq;
var s = OverlayTextUtil.o(r, this.aaw);
var t = this.aah;
if (t == 18) {
s = false;
}
var u = this.vi;
if (s && !stringIsNullOrEmpty(this.abt)) {
var v = new OverlayTextUpdatingEventArgs();
v.textLocation = this.aah;
v.textAngle = this.aa1;
v.textVisible = this.aaw;
v.textContent = this.abt;
v.textColorMode = this.aad;
v.textColorShift = this.aa6;
v.textColor = this.aav ? g : this.ae9;
v.backgroundMode = this.aab;
v.backgroundShift = this.aa2;
v.background = this.aat ? g : this.ae7;
v.borderMode = this.aac;
v.borderShift = this.aa4;
v.borderStroke = this.aau ? g : this.ae8;
v.borderRadius = this.aa3;
v.borderThickness = this.aa5;
v.shapeBrush = g;
v.shapeOutline = g;
v.f = p;
v.horizontalMargin = this.aa7;
v.verticalPadding = this.aba;
v.verticalMargin = this.aa9;
v.horizontalPadding = this.aa8;
if (this.stylingOverlayText != null) {
this.stylingOverlayText(this, v);
}
OverlayTextUtil.ad(v);
var w = OverlayTextInfo.d(v);
if (w.textVisible && !w.h) {
this.aao.cq.count += 1;
this.aao.cp.count += 1;
var x = this.aao.cq.count - 1;
w.f = r;
w.ad = this.cw.cc(w.textContent, w.f);
w.u = this.aao.cq.item(x);
w.ac = this.aao.cp.item(x);
if (w.g) {
var y = this.dc.wl({ $type: Point_$type, x: 0, y: NaN });
var z = this.dc.wl({ $type: Point_$type, x: 1, y: NaN });
var aa = z.x - y.x;
w.ab = new Rect(0, y.x, q, aa, 1);
}
else {
var ab = this.dc.wl({ $type: Point_$type, x: NaN, y: 0 });
var ac = this.dc.wl({ $type: Point_$type, x: NaN, y: 1 });
var ad = ac.y - ab.y;
w.ab = new Rect(0, q, ab.y, 1, ad);
}
OverlayTextUtil.ac(w);
this.cw.av(w.u, w.f);
this.cw.aw(w.u, w.f);
}
}
if (this.aar) {
AxisAnnotationFrameManager.c(c, b, a, this.dc, this.getEffectiveViewport(), g, n, this.abb, this.afd, this.afc, this.afj, this.abg, o, this.abh, this.afg, this.aff, this.afk, this.abm, this.afm == 0, this.afl == 0);
}
};
ValueLayer.prototype.adh = function (a, b, c, d) {
var e = { $type: Point_$type, x: NaN, y: NaN };
var f = this.aam();
switch (f) {
case 5:
e = a.wk(2);
break;
case 4:
e = a.wk(1);
break;
case 6:
e = a.wk(3);
break;
default:
e = a.wk(f);
break;
}
var i = a.ai();
for (var h = 0; h < i.length; h++) {
var g = i[h];
if (!this.aas(g)) {
continue;
}
if (g.cp) {
this.adi(a, { $type: Point_$type, x: NaN, y: e.y }, b, c, d);
}
else {
this.adi(a, { $type: Point_$type, x: e.x, y: NaN }, b, c, d);
}
}
};
ValueLayer.prototype.adj = function (a, b) {
var c = false;
if (this.aaz == null) {
c = true;
this.aa0 = new List$1(Axis.$, 0);
this.aaz = new Dictionary$2(Axis.$, Pool$1.$.specialize(AxisAnnotation.$), 0);
}
AxisAnnotationFrameManager.d(this, a, c, this.aaz, this.aa0, b, this.abn, this.abo, this.aaf, this.aag);
};
ValueLayer.prototype.ade = function (a, b, c, d, e) {
var f = a.item(b);
b++;
if (e) {
f._stroke = d.ah._inner[c];
f._fill = d.ah._inner[c];
}
else {
f._stroke = d.ae._inner[c];
f._fill = d.ae._inner[c];
}
f.ad = this.ig;
f.ai = e ? this.zx : this.zw;
f.am = this.wa;
f.al = this.v9;
f.ak = this.v9;
f.aj = this.v8;
f.ac = this.ji;
return new Tuple$2(Path.$, Number_$type, f, b);
};
ValueLayer.prototype.y1 = function (a, b) {
_super.prototype.y1.call(this, a, b);
var c = this.aao.co;
var d = a;
var e = d.af.count;
var f = 0;
var g = b.b9.left;
var h = b.b9.right;
var i = b.b9.top;
var j = b.b9.bottom;
var k = this.afm == 0;
var l = this.afl == 0;
for (var m = 0; m < e; m++) {
var n = Math.floor(d.af._inner[m]);
var o = Math.floor(d.ag._inner[m]);
var p = null;
if (k) {
if (!isNaN_(o)) {
var q = this.ade(c, f, m, d, true);
p = q.c;
f = q.d;
var r = new PathGeometry();
var s = new PathFigure();
s._startPoint = { $type: Point_$type, x: o, y: i };
var t = new LineSegment(1);
t.c = { $type: Point_$type, x: o, y: j };
s._segments.add(t);
r.c.add(s);
p.an = r;
}
}
if (l) {
if (!isNaN_(n)) {
var u = this.ade(c, f, m, d, false);
p = u.c;
f = u.d;
var v = new PathGeometry();
var w = new PathFigure();
w._startPoint = { $type: Point_$type, x: g, y: n };
var x = new LineSegment(1);
x.c = { $type: Point_$type, x: h, y: n };
w._segments.add(x);
v.c.add(w);
p.an = v;
}
}
}
c.count = f;
if (this.d4()) {
this.adj(this.xi, true);
}
else {
this.adj(this.xg, false);
}
};
ValueLayer.prototype.gb = function () {
return true;
};
ValueLayer.prototype.rc = function (a, b, c, d) {
_super.prototype.rc.call(this, a, b, c, d);
switch (b) {
case "SeriesViewer":
if (d == null) {
if (this.aaz != null && this.aaz.count > 0) {
var e = void 0;
if (this.d4()) {
e = this.xi;
}
else {
e = this.xg;
}
AxisAnnotationFrameManager.b(e);
AxisAnnotationFrameManager.d(this, e, true, this.aaz, this.aa0, true, this.abn, this.abo, this.aaf, this.aag);
}
}
break;
case ValueLayer.$$p[2]:
this.ru(true);
break;
case ValueLayer.$$p[34]:
this.ru(true);
break;
case ValueLayer.$$p[29]:
case ValueLayer.$$p[30]:
case "Visibility":
this.ru(true);
break;
case ValueLayer.$$p[3]:
case ValueLayer.$$p[36]:
case ValueLayer.$$p[35]:
case ValueLayer.$$p[39]:
case ValueLayer.$$p[41]:
case ValueLayer.$$p[43]:
case ValueLayer.$$p[42]:
case ValueLayer.$$p[40]:
case ValueLayer.$$p[44]:
case ValueLayer.$$p[45]:
case ValueLayer.$$p[47]:
case ValueLayer.$$p[50]:
case ValueLayer.$$p[52]:
case ValueLayer.$$p[54]:
case ValueLayer.$$p[53]:
case ValueLayer.$$p[51]:
case ValueLayer.$$p[55]:
case ValueLayer.$$p[56]:
case ValueLayer.$$p[1]:
case ValueLayer.$$p[33]:
case ValueLayer.$$p[31]:
this.ru(true);
break;
case "Brush":
case ValueLayer.$$p[32]:
if (this.vk != null) {
this.ae5 = this.vk;
}
else {
switch (this.aan) {
case 6:
this.ae5 = BrushUtil.j(255, 248, 173, 118);
break;
case 4:
this.ae5 = BrushUtil.j(255, 246, 93, 80);
break;
case 5:
this.ae5 = BrushUtil.j(255, 99, 208, 0);
break;
default:
this.ae5 = this.aal != null ? this.aal.ve : null;
break;
}
}
this.ru(true);
break;
case ValueLayer.$$p[22]:
case ValueLayer.$$p[25]:
case ValueLayer.$$p[21]:
case ValueLayer.$$p[4]:
case ValueLayer.$$p[17]:
case ValueLayer.$$p[15]:
case ValueLayer.$$p[16]:
case ValueLayer.$$p[18]:
case ValueLayer.$$p[7]:
case ValueLayer.$$p[5]:
case ValueLayer.$$p[6]:
case ValueLayer.$$p[8]:
case ValueLayer.$$p[10]:
case ValueLayer.$$p[11]:
case ValueLayer.$$p[13]:
case ValueLayer.$$p[9]:
case ValueLayer.$$p[12]:
case ValueLayer.$$p[14]:
case ValueLayer.$$p[19]:
case ValueLayer.$$p[20]:
case ValueLayer.$$p[24]:
case ValueLayer.$$p[23]:
this.ru(true);
break;
}
};
ValueLayer.prototype.o7 = function (a, b) {
_super.prototype.o7.call(this, a, b);
if (a) {
AxisAnnotationFrameManager.b(this.xg);
this.adj(this.xg, false);
}
};
ValueLayer.$t = markType(ValueLayer, 'ValueLayer', AnnotationLayer.$);
ValueLayer.$$p = markDep(DependencyProperty, PropertyMetadata, ValueLayer, 'raisePropertyChanged', ['ActualValueLayerBrush:ae5:adk', [Brush.$, null], 'HorizontalLineStroke:ae6:adl', [Brush.$, null], 'HorizontalLineVisibility:afl:adm', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'IsAxisAnnotationEnabled:aar:adn', [0, false], 'OverlayTextAngle:aa1:ado', [1, NaN], 'OverlayTextBackgroundMatchLayer:aat:adp', [0, false], 'OverlayTextBackgroundMode:aab:adq', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBackground:ae7:adr', [Brush.$, null], 'OverlayTextBackgroundShift:aa2:ads', [1, NaN], 'OverlayTextBorderColor:ae8:adt', [Brush.$, null], 'OverlayTextBorderMatchLayer:aau:adu', [0, false], 'OverlayTextBorderMode:aac:adv', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextBorderRadius:aa3:adw', [1, NaN], 'OverlayTextBorderShift:aa4:adx', [1, NaN], 'OverlayTextBorderThickness:aa5:ady', [1, 1], 'OverlayTextColorMatchLayer:aav:adz', [0, true], 'OverlayTextColorMode:aad:ad0', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'OverlayTextColor:ae9:ad1', [Brush.$, null], 'OverlayTextColorShift:aa6:ad2', [1, NaN], 'OverlayTextHorizontalMargin:aa7:ad3', [1, NaN], 'OverlayTextHorizontalPadding:aa8:ad4', [1, NaN], 'OverlayTextLocation:aah:ad5', [OverlayTextLocation_$type, enumGetBox(OverlayTextLocation_$type, 0)], 'OverlayText:abt:ad6', [2, null], 'OverlayTextVerticalMargin:aa9:ad7', [1, NaN], 'OverlayTextVerticalPadding:aba:ad8', [1, NaN], 'OverlayTextVisible:aaw:ad9', [0, true], 'SkipUnknownValues:aax:aea', [0, true], 'TargetAxisName:aci:aeb', [2, null], 'TargetAxis:aae:aec', [Axis.$, null], 'TargetSeriesName:acl:aed', [2, null], 'TargetSeries:aal:aee', [Series.$, null], 'UseInterpolation:aay:aef', [0, true], 'ValueMode:aan:aeg', [ValueLayerValueMode_$type, enumGetBox(ValueLayerValueMode_$type, 2)], 'VerticalLineStroke:afa:aeh', [Brush.$, null], 'VerticalLineVisibility:afm:aei', [Visibility_$type, enumGetBox(Visibility_$type, 0)], 'XAxisAnnotationBackgroundCornerRadius:abb:aej', [1, DeviceUtils.g(3)], 'XAxisAnnotationBackground:afb:aek', [Brush.$, null], 'XAxisAnnotationFormatLabel:aaf:ael', [Delegate_$type], 'XAxisAnnotationInterpolatedValuePrecision:abn:aem', [1, -1], 'XAxisAnnotationOutline:afc:aen', [Brush.$, null], 'XAxisAnnotationPaddingBottom:abc:aeo', [1, NaN], 'XAxisAnnotationPaddingLeft:abd:aep', [1, NaN], 'XAxisAnnotationPaddingRight:abe:aeq', [1, NaN], 'XAxisAnnotationPaddingTop:abf:aer', [1, NaN], 'XAxisAnnotationStrokeThickness:abg:aes', [1, NaN], 'XAxisAnnotationTextColor:afd:aet', [Brush.$, null], 'YAxisAnnotationBackgroundCornerRadius:abh:aeu', [1, DeviceUtils.g(3)], 'YAxisAnnotationBackground:afe:aev', [Brush.$, null], 'YAxisAnnotationFormatLabel:aag:aew', [Delegate_$type], 'YAxisAnnotationInterpolatedValuePrecision:abo:aex', [1, -1], 'YAxisAnnotationOutline:aff:aey', [Brush.$, null], 'YAxisAnnotationPaddingBottom:abi:aez', [1, NaN], 'YAxisAnnotationPaddingLeft:abj:ae0', [1, NaN], 'YAxisAnnotationPaddingRight:abk:ae1', [1, NaN], 'YAxisAnnotationPaddingTop:abl:ae2', [1, NaN], 'YAxisAnnotationStrokeThickness:abm:ae3', [1, NaN], 'YAxisAnnotationTextColor:afg:ae4', [Brush.$, null]]);
return ValueLayer;
}(AnnotationLayer));
export { ValueLayer };
/**
* @hidden
*/
var ValueLayerView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(ValueLayerView, _super);
function ValueLayerView(a) {
var _this = _super.call(this, a) || this;
_this.cn = null;
_this.co = null;
_this.ct = null;
_this.cs = null;
_this.cq = null;
_this.cr = null;
_this.cp = null;
_this.cn = a;
_this.ct = new List$1(Path.$, 0);
return _this;
}
ValueLayerView.prototype.cu = function () {
OverlayTextUtil.u(this.cq);
OverlayTextUtil.v(this.cs);
this.cp.clear();
this.cr.clear();
this.cq.count = 0;
this.cp.count = 0;
};
ValueLayerView.prototype.a4 = function () {
var _this = this;
_super.prototype.a4.call(this);
this.co = ((function () {
var $ret = new Pool$1(Path.$);
$ret.create = runOn(_this, _this.c6);
$ret.activate = runOn(_this, _this.cv);
$ret.disactivate = runOn(_this, _this.cx);
$ret.destroy = runOn(_this, _this.cw);
return $ret;
})());
this.cs = new List$1(TextBlock.$, 0);
this.cq = ((function () {
var $ret = new Pool$1(TextBlock.$);
$ret.create = runOn(_this, _this.c5);
$ret.activate = runOn(_this, _this.c1);
$ret.disactivate = runOn(_this, _this.c3);
$ret.destroy = runOn(_this, _this.c2);
return $ret;
})());
this.cr = new List$1(Rectangle.$, 0);
this.cp = ((function () {
var $ret = new Pool$1(Rectangle.$);
$ret.create = runOn(_this, _this.c7);
$ret.activate = runOn(_this, _this.cy);
$ret.disactivate = runOn(_this, _this.c0);
$ret.destroy = runOn(_this, _this.cz);
return $ret;
})());
this.cn.jq = Defaults.crosshairLineThickness;
};
ValueLayerView.prototype.c5 = function () {
var a = new TextBlock();
this.cs.add(a);
return a;
};
ValueLayerView.prototype.c2 = function (a) {
if (this.cs.contains(a)) {
this.cs.remove(a);
}
};
ValueLayerView.prototype.c1 = function (a) {
a._visibility = 0;
a.s = 0;
};
ValueLayerView.prototype.c3 = function (a) {
a._visibility = 1;
};
ValueLayerView.prototype.c7 = function () {
var a = new Rectangle();
this.cr.add(a);
return a;
};
ValueLayerView.prototype.cz = function (a) {
a.dataContext = null;
if (this.cr.contains(a)) {
this.cr.remove(a);
}
};
ValueLayerView.prototype.cy = function (a) {
a._visibility = 0;
};
ValueLayerView.prototype.c0 = function (a) {
a._visibility = 1;
};
ValueLayerView.prototype.c6 = function () {
var a = new Path();
a.j = new TranslateTransform();
this.ct.add(a);
return a;
};
ValueLayerView.prototype.cv = function (a) {
a._visibility = 0;
};
ValueLayerView.prototype.cx = function (a) {
a._visibility = 1;
};
ValueLayerView.prototype.cw = function (a) {
this.ct.remove(a);
};
ValueLayerView.prototype.c4 = function (a, b, c, d) {
if (a.an == null || a.an.c.x != d || a.an.d.x != c) {
var e = ((function () {
var $ret = new LineGeometry();
$ret.d = { $type: Point_$type, x: c, y: b };
$ret.c = { $type: Point_$type, x: d, y: b };
return $ret;
})());
a.an = e;
}
};
ValueLayerView.prototype.bj = function (a, b) {
_super.prototype.bj.call(this, a, b);
if (a.d && !b) {
for (var c = 0; c < this.ct.count; c++) {
var d = this.ct._inner[c];
if (d._visibility == 0) {
a.t(d);
}
}
for (var e = 0; e < this.cp.count; e++) {
var f = this.cp.item(e);
if (f._visibility == 0) {
a.w(f);
}
}
for (var g = 0; g < this.cq.count; g++) {
var h = this.cq.item(g);
a.ad(h.dataContext);
a.x(h);
}
}
};
ValueLayerView.prototype.ax = function (a) {
_super.prototype.ax.call(this, a);
for (var b = 0; b < this.ct.count; b++) {
this.f.bc.exportPathData(a, this.ct._inner[b], "crosshairLine", ["Main", "Crosshair"]);
}
};
ValueLayerView.$t = markType(ValueLayerView, 'ValueLayerView', AnnotationLayerView.$);
return ValueLayerView;
}(AnnotationLayerView));
export { ValueLayerView };