igniteui-angular-charts
Version:
Ignite UI Angular charting components for building rich data visualizations for modern web apps.
526 lines (525 loc) • 17.9 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 { DependencyProperty } from "igniteui-angular-core";
import { Point_$type, Boolean_$type, enumGetBox, runOn, delegateRemove, typeCast, delegateCombine, fromEnum, fromEn, markType, markDep } from "igniteui-angular-core";
import { AnnotationAppearanceMode_$type } from "./AnnotationAppearanceMode";
import { DoubleCollection } from "igniteui-angular-core";
import { SeriesView } from "./SeriesView";
import { XamDataChart } from "./XamDataChart";
import { Tuple$2 } from "igniteui-angular-core";
import { PropertyMetadata } from "igniteui-angular-core";
import { isNaN_ } from "igniteui-angular-core";
/**
* @hidden
*/
export let AnnotationLayer = /*@__PURE__*/ (() => {
class AnnotationLayer extends Series {
constructor() {
super();
this.zv = null;
this.xb = null;
this.xa = null;
this.xc = null;
this.zt = { $type: Point_$type, x: NaN, y: NaN };
this.xd = false;
this.zv = { $type: Point_$type, x: NaN, y: NaN };
this.yy();
}
cs() {
return new AnnotationLayerView(this);
}
q0(a) {
super.q0(a);
this.w9 = a;
}
xh(a) {
if (a == null) {
return false;
}
if (a.es) {
return false;
}
if (a.isValueOverlay) {
return false;
}
if (a == this) {
return false;
}
return a.hd(a.cv.bx, a.cv.by, a.cv);
}
get_e1() {
return this.xe;
}
b2() {
if (this.b3 == 0) {
return 1;
}
else {
return super.b2();
}
}
get_ff() {
return this.xj || this.xk;
}
get_isUsableInLegend() {
return this.xk;
}
q8(a, b, c, d) {
super.q8(a, b, c, d);
switch (b) {
case "SeriesViewer":
let e = c;
let f = d;
if (e != null) {
this.yx(e.series);
let g = e.series;
g.collectionChanged = delegateRemove(g.collectionChanged, runOn(this, this.yu));
if (typeCast(XamDataChart.$, e) !== null) {
let h = e;
this.yw(h.axes);
let i = h.axes;
i.collectionChanged = delegateRemove(i.collectionChanged, runOn(this, this.yk));
}
}
if (f != null) {
this.ys(f.series);
let j = f.series;
j.collectionChanged = delegateCombine(j.collectionChanged, runOn(this, this.yu));
if (typeCast(XamDataChart.$, f) !== null) {
let k = f;
this.yr(k.axes);
let l = k.axes;
l.collectionChanged = delegateCombine(l.collectionChanged, runOn(this, this.yk));
}
}
break;
case AnnotationLayer.$$p[16]:
case AnnotationLayer.$$p[15]:
if (this.ff) {
if (this.index == -1) {
this.index = XamDataChart.yr(this);
}
}
else {
this.index = -1;
this.u8 = null;
this.vc = null;
}
if (this.db != null) {
this.db.pe();
}
this.rq(true);
break;
case "TransitionProgress":
this.xc.c(this.jp, this.xb, this.xa);
if (this.d5(this.cv)) {
return;
}
if (this.jp == 1) {
this.yt(this.xa, this.cv);
this.qn();
}
else {
this.yt(this.xc, this.cv);
}
if (this.db != null) {
this.db.qo(this);
}
break;
case AnnotationLayer.$$p[13]:
if (this.db != null) {
this.db.o8();
}
break;
case AnnotationLayer.$$p[9]:
this.zv = this.zu;
this.qq(this.zu);
break;
case "ShouldRenderAsOverlay":
if (this.db != null) {
this.cv.al(this.db);
this.cv.ag(this.db);
}
break;
case AnnotationLayer.$$p[8]:
case AnnotationLayer.$$p[14]:
case "DashArray":
case AnnotationLayer.$$p[10]:
case AnnotationLayer.$$p[17]:
case AnnotationLayer.$$p[12]:
case AnnotationLayer.$$p[19]:
case AnnotationLayer.$$p[11]:
case AnnotationLayer.$$p[18]:
this.yy();
break;
case AnnotationLayer.$$p[0]:
case AnnotationLayer.$$p[4]:
case AnnotationLayer.$$p[1]:
case AnnotationLayer.$$p[5]:
case AnnotationLayer.$$p[3]:
case AnnotationLayer.$$p[7]:
case AnnotationLayer.$$p[2]:
case AnnotationLayer.$$p[6]:
this.rq(true);
break;
}
}
yx(a) {
for (let b of fromEnum(a)) {
if (!(b == this)) {
b.renderRequested = delegateRemove(b.renderRequested, runOn(this, this.yv));
}
}
this.rq(true);
}
yw(a) {
for (let b of fromEnum(a)) {
b.renderRequested = delegateRemove(b.renderRequested, runOn(this, this.yl));
}
this.rq(true);
}
ys(a) {
for (let b of fromEnum(a)) {
if (!(b == this)) {
b.renderRequested = delegateCombine(b.renderRequested, runOn(this, this.yv));
}
}
this.rq(true);
}
yr(a) {
for (let b of fromEnum(a)) {
b.renderRequested = delegateCombine(b.renderRequested, runOn(this, this.yl));
}
this.rq(true);
}
xf(a) {
if (a == null) {
return false;
}
return true;
}
yl(a, b) {
if (this.xf(a)) {
this.yn(a, b.animate);
}
}
xg(a) {
if (a == null) {
return false;
}
if (a.es) {
return false;
}
return true;
}
yv(a, b) {
if (this.xg(a)) {
this.yo(a, b.animate);
}
}
yn(a, b) {
}
yo(a, b) {
}
yu(a, b) {
this.yp(b);
}
yk(a, b) {
this.ym(b);
}
zj() {
if (this.u8 != null) {
return this.u8;
}
return this.ve;
}
zk() {
if (this.vc != null) {
return this.vc;
}
return this.vu;
}
ym(a) {
if (a.oldItems != null) {
for (let b of fromEn(a.oldItems)) {
b.renderRequested = delegateRemove(b.renderRequested, runOn(this, this.yl));
}
}
if (a.newItems != null) {
for (let c of fromEn(a.newItems)) {
c.renderRequested = delegateCombine(c.renderRequested, runOn(this, this.yl));
}
}
this.rq(true);
}
yp(a) {
if (a.oldItems != null) {
for (let b of fromEn(a.oldItems)) {
b.renderRequested = delegateRemove(b.renderRequested, runOn(this, this.yv));
}
}
if (a.newItems != null) {
for (let c of fromEn(a.newItems)) {
c.renderRequested = delegateCombine(c.renderRequested, runOn(this, this.yv));
}
}
this.rq(true);
}
sq(a, b) {
this.rq(false);
}
sp(a, b) {
this.rq(true);
}
rr(a) {
super.rr(a);
if (this.d5(this.cv)) {
return;
}
if (this.ge(a) && !this.gq) {
let b = this.xb;
if (this.d3()) {
if (this.dc.g) {
this.dc.t();
}
this.xb = this.xc;
this.xc = b;
}
else {
this.xb = this.xa;
this.xa = b;
}
this.yq(this.xa, this.cv);
this.r6();
}
else {
if (!this.gq) {
this.yq(this.xa, this.cv);
}
this.yt(this.xa, this.cv);
}
}
get_es() {
return true;
}
yq(a, b) {
}
yt(a, b) {
this.qw();
this.w9.b4();
}
yj(a) {
let b = { $type: Point_$type, x: this.zt.x, y: this.zt.y };
if (a.isVertical) {
if (isNaN_(this.zt.y)) {
return new Tuple$2(Boolean_$type, Point_$type, false, b);
}
if (isNaN_(this.zt.x)) {
b.x = 0;
return new Tuple$2(Boolean_$type, Point_$type, true, b);
}
}
else {
if (isNaN_(this.zt.x)) {
return new Tuple$2(Boolean_$type, Point_$type, false, b);
}
if (isNaN_(this.zt.y)) {
b.y = 0;
return new Tuple$2(Boolean_$type, Point_$type, true, b);
}
}
return new Tuple$2(Boolean_$type, Point_$type, true, b);
}
qq(a) {
super.qq(a);
if (isNaN_(this.zv.x) && isNaN_(this.zv.y)) {
if (isNaN_(a.x) && isNaN_(a.y)) {
this.w9.b3();
return;
}
else {
this.w9.b5();
this.zt = a;
}
}
else {
this.w9.b5();
this.zt = this.zv;
}
this.rq(true);
}
hd(a, b, c) {
let d = super.hd(a, b, c);
if (this.db == null) {
return false;
}
if (!this.cv.t()) {
d = false;
return d;
}
return d;
}
xu() {
if (isNaN_(this.xx)) {
switch (this.wx) {
case 1: return this.xo();
case 2: return this.xr();
case 4: return this.xq();
}
}
return this.xx;
}
xt() {
if (isNaN_(this.xw)) {
return this.xm;
}
return this.xw;
}
xv() {
if (isNaN_(this.xy)) {
return this.xm;
}
return this.xy;
}
w4() {
switch (this.w0) {
case 0: return this.w1();
}
return this.w0;
}
w5() {
switch (this.w7) {
case 0: return this.wx;
}
return this.w7;
}
w6() {
switch (this.w8) {
case 0: return this.wx;
}
return this.w8;
}
zp() {
if (this.zr == null) {
if (this.v1 == null) {
return this.zn();
}
return this.v1;
}
return this.zr;
}
zq() {
if (this.zs == null) {
if (this.v1 == null) {
return this.zo();
}
return this.v1;
}
return this.zs;
}
w1() {
return 0;
}
w2() {
return this.w1();
}
w3() {
return this.w1();
}
xo() {
return NaN;
}
xr() {
return NaN;
}
xq() {
return NaN;
}
xp() {
return NaN;
}
xs() {
return NaN;
}
zn() {
return null;
}
zo() {
return null;
}
yy() {
this.wx = this.w4();
this.xm = this.xu();
this.wy = this.w5();
this.xl = this.xt();
this.wz = this.w6();
this.xn = this.xv();
this.zl = this.zp();
this.zm = this.zq();
}
get_g9() {
return this.xi;
}
get xi() {
return this.xd;
}
set xi(a) {
let b = this.xd;
this.xd = a;
this.raisePropertyChanged("ShouldRenderAsOverlay", b, this.xd);
}
}
AnnotationLayer.$t = markType(AnnotationLayer, 'AnnotationLayer', Series.$);
AnnotationLayer.$$p = markDep(DependencyProperty, PropertyMetadata, AnnotationLayer, 'raisePropertyChanged', ['ActualAppearanceMode:wx:yz', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'ActualHorizontalAppearanceMode:wy:y0', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'ActualHorizontalDashArray:zl:y1', [DoubleCollection.$], 'ActualHorizontalShiftAmount:xl:y2', [1, NaN], 'ActualShiftAmount:xm:y3', [1, NaN], 'ActualVerticalAppearanceMode:wz:y4', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'ActualVerticalDashArray:zm:y5', [DoubleCollection.$], 'ActualVerticalShiftAmount:xn:y6', [1, NaN], 'AppearanceMode:w0:y7', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'CursorPosition:zu:y8', [Point_$type, { $type: Point_$type, x: NaN, y: NaN }], 'HorizontalAppearanceMode:w7:y9', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'HorizontalDashArray:zr:za', [DoubleCollection.$], 'HorizontalShiftAmount:xw:zb', [1, NaN], 'IsDefaultCrosshairDisabled:xe:zc', [0, true], 'ShiftAmount:xx:zd', [1, NaN], 'UseIndex:xj:ze', [0, false], 'UseLegend:xk:zf', [0, false], 'VerticalAppearanceMode:w8:zg', [AnnotationAppearanceMode_$type, enumGetBox(AnnotationAppearanceMode_$type, 0)], 'VerticalDashArray:zs:zh', [DoubleCollection.$], 'VerticalShiftAmount:xy:zi', [1, NaN]]);
return AnnotationLayer;
})();
/**
* @hidden
*/
export let AnnotationLayerView = /*@__PURE__*/ (() => {
class AnnotationLayerView extends SeriesView {
constructor(a) {
super(a);
this.b0 = null;
this.b1 = false;
this.b2 = -1;
this.b0 = a;
}
b6() {
if (this.b1) {
this.b1 = false;
this.b2 = -1;
this.b0.zt = { $type: Point_$type, x: NaN, y: NaN };
this.b0.rq(true);
}
}
b3() {
this.b1 = true;
if (this.e.jy != null) {
this.e.jy.setTimeout(runOn(this, this.b6), 300);
}
else {
this.b2 = window.setTimeout(runOn(this, this.b6), 300);
}
}
b5() {
if (this.b1 == true) {
this.b1 = false;
if (this.b2 != -1) {
window.clearTimeout(this.b2);
this.b2 = -1;
}
}
}
b4() {
this.as();
}
}
AnnotationLayerView.$t = markType(AnnotationLayerView, 'AnnotationLayerView', SeriesView.$);
return AnnotationLayerView;
})();