igniteui-webcomponents-charts
Version:
Ignite UI Web Components charting components for building rich data visualizations using TypeScript APIs.
2,392 lines • 85.5 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, __generator, __values } from "tslib";
import { EventArgs, Base, markType, typeCast, runOn, delegateCombine, enumGetBox, Point_$type, String_$type, Number_$type, fromEnum, toEnum, Date_$type, markDep, Delegate_$type } from "igniteui-webcomponents-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-webcomponents-core";
import { IFastItemColumn$1_$type } from "igniteui-webcomponents-core";
import { Series } from "./Series";
import { Rect } from "igniteui-webcomponents-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-webcomponents-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-webcomponents-core";
import { DependencyProperty } from "igniteui-webcomponents-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "igniteui-webcomponents-core";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer";
import { CategoryFrame } from "./CategoryFrame";
import { CategoryMode_$type } from "./CategoryMode";
import { ITimeRangeSelectorAxis_$type } from "./ITimeRangeSelectorAxis";
import { FastReflectionHelper } from "igniteui-webcomponents-core";
import { List$1 } from "igniteui-webcomponents-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { Dictionary$2 } from "igniteui-webcomponents-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-webcomponents-core";
import { FinancialValueList } from "./FinancialValueList";
import { CategoryXAxis } from "./CategoryXAxis";
import { SafeSortedReadOnlyDoubleCollection } from "./SafeSortedReadOnlyDoubleCollection";
import { SafeReadOnlyDoubleCollection } from "./SafeReadOnlyDoubleCollection";
import { SafeEnumerable } from "./SafeEnumerable";
import { CalculatedColumn } from "./CalculatedColumn";
import { TrendCalculators } from "igniteui-webcomponents-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-webcomponents-core";
import { stringIsNullOrEmpty } from "igniteui-webcomponents-core";
import { dateToStringFormat } from "igniteui-webcomponents-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-webcomponents-core";
import { Color } from "igniteui-webcomponents-core";
/**
* @hidden
*/
var FinancialEventArgs = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FinancialEventArgs, _super);
function FinancialEventArgs(a, b, c, d, e) {
var _this = _super.call(this) || this;
_this._position = 0;
_this._count = 0;
_this._dataSource = null;
_this._supportingCalculations = null;
_this._basedOn = null;
_this.position = a;
_this.count = b;
_this.dataSource = c;
_this.supportingCalculations = d;
if (c != null) {
c.series = e;
}
return _this;
}
Object.defineProperty(FinancialEventArgs.prototype, "position", {
get: function () {
return this._position;
},
set: function (a) {
this._position = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialEventArgs.prototype, "count", {
get: function () {
return this._count;
},
set: function (a) {
this._count = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialEventArgs.prototype, "dataSource", {
get: function () {
return this._dataSource;
},
set: function (a) {
this._dataSource = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialEventArgs.prototype, "supportingCalculations", {
get: function () {
return this._supportingCalculations;
},
set: function (a) {
this._supportingCalculations = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialEventArgs.prototype, "basedOn", {
get: function () {
return this._basedOn;
},
set: function (a) {
this._basedOn = a;
},
enumerable: false,
configurable: true
});
FinancialEventArgs.$t = markType(FinancialEventArgs, 'FinancialEventArgs', EventArgs.$);
return FinancialEventArgs;
}(EventArgs));
export { FinancialEventArgs };
/**
* @hidden
*/
var FinancialBucketCalculator = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FinancialBucketCalculator, _super);
function FinancialBucketCalculator(a) {
var _this = _super.call(this) || this;
_this.a = null;
_this.c = 0;
_this.d = 0;
_this.b = 0;
if (a == null) {
throw new ArgumentNullException(0, "view");
}
_this.a = a;
_this.c = -1;
_this.d = _this.d;
_this.b = 0;
return _this;
}
FinancialBucketCalculator.prototype.getBucket = function (a) {
return null;
};
FinancialBucketCalculator.prototype.getBucketWithoutUnknowns = function (a) {
return this.getBucket(a);
};
FinancialBucketCalculator.prototype.getErrorBucket = function (a, b) {
return NaN;
};
FinancialBucketCalculator.prototype.getBucketInfo = function (a, b, c, d) {
a = this.c;
b = this.d;
c = this.b;
d = this.a.cf.ie;
return {
p0: a,
p1: b,
p2: c,
p3: d
};
};
FinancialBucketCalculator.prototype.e = function (a) {
var b = this.a.ca;
var c = this.a.b9;
var d = this.a.b9;
if (this.a.cf != null) {
d = this.a.cf.getEffectiveViewport1(this.a);
}
if (b.isEmpty || c.isEmpty || this.a.cf.xb == null) {
this.b = 0;
return;
}
var e = (this.a.cf.xb != null) ? this.a.cf.xb.ch : false;
var f = new ScalerParams(0, b, c, e, d);
var g = this.a.cf.wo(this.a);
var h = typeCast(ISortingAxis_$type, this.a.cf.xb);
if (h == null || h.i$b == null) {
var i = Math.floor(this.a.cf.xb.eo(g.left, f));
var j = Math.ceil(this.a.cf.xb.eo(g.right, f));
if (this.a.cf.xb.ch) {
j = Math.ceil(this.a.cf.xb.eo(g.left, f));
i = Math.floor(this.a.cf.xb.eo(g.right, f));
}
var k = Math.floor((j - i + 1) * a / g.width);
this.b = truncate(Math.max(1, k));
this.c = truncate(Math.floor(i / this.b));
this.d = truncate(Math.ceil(j / this.b));
}
else {
this.c = h.i$e(b, c, d, g);
this.d = h.i$g(b, c, d, g);
this.b = 1;
}
};
FinancialBucketCalculator.prototype.cacheValues = function () {
};
FinancialBucketCalculator.prototype.unCacheValues = function () {
};
FinancialBucketCalculator.$t = markType(FinancialBucketCalculator, 'FinancialBucketCalculator', Base.$, [IBucketizer_$type]);
return FinancialBucketCalculator;
}(Base));
export { FinancialBucketCalculator };
/**
* @hidden
*/
var FinancialSeries = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FinancialSeries, _super);
function FinancialSeries() {
var _this = _super.call(this) || this;
_this.x2 = null;
_this.x0 = null;
_this.x1 = null;
_this.xz = null;
_this.x3 = null;
_this.yc = false;
_this.assigningCategoryStyle = null;
_this.xk = null;
_this.ym = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
_this.yn = new Dictionary$2(String_$type, String_$type, 0);
_this.yb = false;
_this.xy = null;
_this.xf = null;
_this.xh = null;
_this.xd = null;
_this.xn = null;
_this.typical = null;
_this.typicalBasedOn = null;
_this.ya = false;
_this.yz = null;
_this.yx = null;
_this.yy = null;
_this.yw = null;
_this.y0 = null;
_this.xg = null;
_this.xc = null;
_this.xi = 0;
_this.xt = null;
_this.xv = null;
_this.xk = new CategorySeriesRenderManager();
_this.yc = false;
_this.xn = new CategoryTransitionSourceFramePreparer();
_this.xg = new CategoryFrame(3);
_this.ab = FinancialSeries.$;
_this.xj = 0;
return _this;
}
FinancialSeries.prototype.hu = function () {
var a = _super.prototype.hu.call(this);
{
var b = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "OpenMemberPath";
$ret.p = true;
$ret.y = "HighlightedOpenMemberPath";
$ret.q = true;
return $ret;
})());
b.valueResolving = delegateCombine(b.valueResolving, runOn(this, this.aae));
a.add(b);
}
{
var c = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "HighMemberPath";
$ret.p = true;
$ret.y = "HighlightedHighMemberPath";
$ret.q = true;
return $ret;
})());
c.valueResolving = delegateCombine(c.valueResolving, runOn(this, this.aac));
a.add(c);
}
{
var d = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "LowMemberPath";
$ret.p = true;
$ret.y = "HighlightedLowMemberPath";
$ret.q = true;
return $ret;
})());
d.valueResolving = delegateCombine(d.valueResolving, runOn(this, this.aad));
a.add(d);
}
{
var e = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "CloseMemberPath";
$ret.p = true;
$ret.y = "HighlightedCloseMemberPath";
$ret.q = true;
return $ret;
})());
e.valueResolving = delegateCombine(e.valueResolving, runOn(this, this.aab));
a.add(e);
}
{
var f = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.ad = "VolumeMemberPath";
$ret.p = true;
$ret.y = "HighlightedVolumeMemberPath";
$ret.q = true;
return $ret;
})());
f.valueResolving = delegateCombine(f.valueResolving, runOn(this, this.aaf));
a.add(f);
}
{
var g = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Brush";
$ret.p = true;
$ret.y = "ActualBrush";
$ret.q = true;
return $ret;
})());
g.valueResolving = delegateCombine(g.valueResolving, runOn(this, this.r4));
a.add(g);
}
{
var h = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "Outline";
$ret.p = true;
$ret.y = "ActualOutline";
$ret.q = true;
return $ret;
})());
h.valueResolving = delegateCombine(h.valueResolving, runOn(this, this.r4));
a.add(h);
}
{
var i = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "NegativeBrush";
$ret.p = true;
$ret.q = true;
return $ret;
})());
i.valueResolving = delegateCombine(i.valueResolving, runOn(this, this.r4));
a.add(i);
}
{
var j = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.r = true;
$ret.ad = "NegativeOutline";
$ret.p = true;
$ret.q = true;
return $ret;
})());
j.valueResolving = delegateCombine(j.valueResolving, runOn(this, this.r4));
a.add(j);
}
var k = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.p = true;
$ret.ad = "IsTransitionInEnabled";
$ret.x = true;
$ret.q = true;
return $ret;
})());
a.add(k);
var l = ((function () {
var $ret = new SeriesLayerPropertyOverlay();
$ret.p = true;
$ret.ad = "TransitionInMode";
$ret.x = enumGetBox(CategoryTransitionInMode_$type, 20);
$ret.q = true;
return $ret;
})());
a.add(l);
return a;
};
FinancialSeries.prototype.aae = function (a, b) {
if (this.zo != null) {
b.value = this.zo;
return;
}
b.value = this.z1;
};
FinancialSeries.prototype.aac = function (a, b) {
if (this.zk != null) {
b.value = this.zk;
return;
}
b.value = this.zs;
};
FinancialSeries.prototype.aad = function (a, b) {
if (this.zm != null) {
b.value = this.zm;
return;
}
b.value = this.zx;
};
FinancialSeries.prototype.aab = function (a, b) {
if (this.zi != null) {
b.value = this.zi;
return;
}
b.value = this.zf;
};
FinancialSeries.prototype.aaf = function (a, b) {
if (this.zq != null) {
b.value = this.zq;
return;
}
b.value = this.z5;
};
FinancialSeries.prototype.kw = function () {
if (this.d4()) {
return this.bo.xh;
}
else {
return this.bo.xd;
}
};
FinancialSeries.prototype.q3 = function (a) {
_super.prototype.q3.call(this, a);
this.xs = a;
};
FinancialSeries.prototype.get_e8 = function () {
return true;
};
FinancialSeries.prototype.ai = function () {
return [this.xb, this.xu];
};
FinancialSeries.prototype.kr = function (a, b) {
var c = this.nf(b);
if (c == FinancialSeries.$$p[11]) {
return this.ks(a, b, this.z1);
}
if (c == FinancialSeries.$$p[1]) {
return this.ks(a, b, this.zs);
}
if (c == FinancialSeries.$$p[9]) {
return this.ks(a, b, this.zx);
}
if (c == FinancialSeries.$$p[0]) {
return this.ks(a, b, this.zf);
}
if (c == FinancialSeries.$$p[13]) {
return this.ks(a, b, this.z5);
}
if (c == FinancialSeries.$$p[5]) {
return this.ks(a, b, this.zo);
}
if (c == FinancialSeries.$$p[3]) {
return this.ks(a, b, this.zk);
}
if (c == FinancialSeries.$$p[4]) {
return this.ks(a, b, this.zm);
}
if (c == FinancialSeries.$$p[2]) {
return this.ks(a, b, this.zi);
}
if (c == FinancialSeries.$$p[6]) {
return this.ks(a, b, this.zq);
}
return _super.prototype.kr.call(this, a, b);
};
FinancialSeries.prototype.mf = function (a) {
var b = this.nf(a);
if (b == FinancialSeries.$$p[11]) {
return this.z1;
}
if (b == FinancialSeries.$$p[1]) {
return this.zs;
}
if (b == FinancialSeries.$$p[9]) {
return this.zx;
}
if (b == FinancialSeries.$$p[0]) {
return this.zf;
}
if (b == FinancialSeries.$$p[13]) {
return this.z5;
}
if (b == FinancialSeries.$$p[5]) {
return this.zo;
}
if (b == FinancialSeries.$$p[3]) {
return this.zk;
}
if (b == FinancialSeries.$$p[4]) {
return this.zm;
}
if (b == FinancialSeries.$$p[2]) {
return this.zi;
}
if (b == FinancialSeries.$$p[6]) {
return this.zq;
}
return _super.prototype.mf.call(this, a);
};
FinancialSeries.prototype.zb = function () {
return 2;
};
FinancialSeries.prototype.y9 = function () {
return 4;
};
FinancialSeries.prototype.aj = function (a) {
var b = this.an(this.xb, this.xd.h, this.y8(this.cw), this.za(this.cw), this.wm(a), true);
if (b == null) {
return null;
}
var c = b[0];
var d = b[1];
var e = new Array(1);
var f = new Array(2);
var g = this.zb();
f[0] = { $type: Point_$type, x: c[0], y: c[g] };
f[1] = { $type: Point_$type, x: d[0], y: d[g] };
e[0] = f;
return e;
};
FinancialSeries.prototype.al = function (a) {
var b = this.an(this.xb, this.xd.h, this.y8(this.cw), this.za(this.cw), this.wm(a), true);
if (b == null) {
return null;
}
var c = b[0];
var d = b[1];
var e = new Array(1);
var f = new Array(2);
f[0] = { $type: Point_$type, x: c[0], y: c[1] };
f[1] = { $type: Point_$type, x: d[0], y: d[1] };
e[0] = f;
return e;
};
FinancialSeries.prototype.v1 = function () {
return this.aa1;
};
FinancialSeries.prototype.v2 = function () {
return this.aa1;
};
FinancialSeries.prototype.o4 = function () {
_super.prototype.o4.call(this);
this.xb = null;
this.xu = null;
};
FinancialSeries.prototype.get_em = function () {
return true;
};
FinancialSeries.prototype.get_f6 = function () {
return this.xu != null && this.xu.ch;
};
Object.defineProperty(FinancialSeries.prototype, "x7", {
get: function () {
return this.x2;
},
set: function (a) {
if (this.x2 != a) {
var b = this.x2;
this.x2 = a;
this.raisePropertyChanged("OpenColumn", b, this.x2);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialSeries.prototype, "x5", {
get: function () {
return this.x0;
},
set: function (a) {
if (this.x0 != a) {
var b = this.x0;
this.x0 = a;
this.raisePropertyChanged("HighColumn", b, this.x0);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialSeries.prototype, "x6", {
get: function () {
return this.x1;
},
set: function (a) {
if (this.x1 != a) {
var b = this.x1;
this.x1 = a;
this.raisePropertyChanged("LowColumn", b, this.x1);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialSeries.prototype, "x4", {
get: function () {
return this.xz;
},
set: function (a) {
if (this.xz != a) {
var b = this.xz;
this.xz = a;
this.raisePropertyChanged("CloseColumn", b, this.xz);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialSeries.prototype, "x9", {
get: function () {
return this.x3;
},
set: function (a) {
if (this.x3 != a) {
var b = this.x3;
this.x3 = a;
this.raisePropertyChanged("VolumeColumn", b, this.x3);
}
},
enumerable: false,
configurable: true
});
FinancialSeries.prototype.gc = function () {
return this.highlightedItemsSource != null || (this.zo != null && this.zk != null && this.zm != null && this.zi != null);
};
FinancialSeries.prototype.yj = function () {
return (this.assigningCategoryStyle != null && this.yc) || this.by != 1 || this.cq != 1 || this.cp != 1;
};
FinancialSeries.prototype.aai = function (a) {
if (this.assigningCategoryStyle != null && this.yc) {
this.assigningCategoryStyle(this, a);
}
};
FinancialSeries.prototype.aag = function (a, b, c, d, e, f, g) {
var h = this.by != 1;
var i = this.cq != 1;
var j = this.cp != 1;
this.xk.a3(this.xk.b, d.cn, a, b, c, d, e, f, false, g);
this.xk.ab(this.ic);
var k = this.xk.ay;
var l = null;
var m = null;
var n = null;
var o = this.dp;
if (h && this.dc != null) {
l = this.dc.dk.getHighlightingInfo(this, o, k.z, k.y, false);
k.c = l;
}
if (i && this.dc != null) {
m = this.dc.dl.getHighlightingInfo(this, o, k.z, k.y, false);
if (m == null && this.bo != null) {
m = this.dc.dl.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, false);
}
k.d = m;
}
if (j && this.dc != null) {
n = this.dc.dj.getHighlightingInfo(this, o, k.z, k.y, false);
k.b = n;
}
k.h = f;
this.aai(k);
this.xk.z(this, l, m, n, f, h, i, j, b < 0);
};
FinancialSeries.prototype.y1 = function (a) {
return this.iu(a, this.xb);
};
FinancialSeries.prototype.kb = function (a, b) {
return this.kc(a, b, this.xb, runOn(this, this.y1), new FinancialValueList(this.x7, this.x5, this.x6, this.x4, this.x9));
};
FinancialSeries.prototype.j9 = function (a, b) {
return this.ka(a, b, this.xb, runOn(this, this.y1), new FinancialValueList(this.x7, this.x5, this.x6, this.x4, this.x9));
};
FinancialSeries.prototype.iq = function (a, b, c, d, e) {
if (c == null) {
return Number.POSITIVE_INFINITY;
}
var f = this.xb.lj;
return this.ir(a, b, this.xb, d, e, f, runOn(this, this.y1));
};
FinancialSeries.prototype.getOffsetValue = function () {
return this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
};
FinancialSeries.prototype.getCategoryWidth = function () {
return this.xb.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
};
FinancialSeries.prototype.wh = function (a, b, c) {
return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, null, null, null);
};
FinancialSeries.prototype.i6 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y2(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
return this.i8(new FinancialValueList(this.x7, this.x5, this.x6, this.x4, this.x9), a, this.xb, f, e, runOn(this, this.y1), b, c);
};
FinancialSeries.prototype.i2 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y2(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
return this.i8(this.x5, a, this.xb, f, e, runOn(this, this.y1), b, c);
};
FinancialSeries.prototype.i4 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y2(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
return this.i8(this.x6, a, this.xb, f, e, runOn(this, this.y1), b, c);
};
FinancialSeries.prototype.y3 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y2(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
return this.i8(this.x4, a, this.xb, f, e, runOn(this, this.y1), b, c);
};
FinancialSeries.prototype.y4 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y2(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
return this.i8(this.x7, a, this.xb, f, e, runOn(this, this.y1), b, c);
};
FinancialSeries.prototype.y5 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y2(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xb.ch, d);
return this.i8(this.x9, a, this.xb, f, e, runOn(this, this.y1), b, c);
};
FinancialSeries.prototype.wd = function (a, b, c) {
var _this = this;
return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.i2), function (d, e) { return _this.kc(d, e, _this.xb, runOn(_this, _this.y1), _this.x5); }, function (d, e) { return _this.ka(d, e, _this.xb, runOn(_this, _this.y1), _this.x5); });
};
FinancialSeries.prototype.wf = function (a, b, c) {
var _this = this;
return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.i4), function (d, e) { return _this.kc(d, e, _this.xb, runOn(_this, _this.y1), _this.x6); }, function (d, e) { return _this.ka(d, e, _this.xb, runOn(_this, _this.y1), _this.x6); });
};
FinancialSeries.prototype.aa3 = function (a, b, c) {
var _this = this;
return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.y4), function (d, e) { return _this.kc(d, e, _this.xb, runOn(_this, _this.y1), _this.x7); }, function (d, e) { return _this.ka(d, e, _this.xb, runOn(_this, _this.y1), _this.x7); });
};
FinancialSeries.prototype.aa2 = function (a, b, c) {
var _this = this;
return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.y3), function (d, e) { return _this.kc(d, e, _this.xb, runOn(_this, _this.y1), _this.x4); }, function (d, e) { return _this.ka(d, e, _this.xb, runOn(_this, _this.y1), _this.x4); });
};
FinancialSeries.prototype.aa4 = function (a, b, c) {
var _this = this;
return this.wj(a, b, c, this.y2(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.xu, this.xb, runOn(this, this.y5), function (d, e) { return _this.kc(d, e, _this.xb, runOn(_this, _this.y1), _this.x9); }, function (d, e) { return _this.ka(d, e, _this.xb, runOn(_this, _this.y1), _this.x9); });
};
FinancialSeries.prototype.qd = function () {
_super.prototype.qd.call(this);
if (this.xb != null) {
this.xb.ib(false);
}
if (this.xu != null) {
this.xu.ib(false);
}
};
FinancialSeries.prototype.sv = function (a, b) {
this.xs.cd.e(this.ie);
this.ru(false);
};
FinancialSeries.prototype.su = function (a, b) {
if (this.g2 && this.jr < 0.05) {
this.g3 = true;
this.g6 = false;
this.gl = false;
}
this.xs.cd.e(this.ie);
this.ru(false);
};
FinancialSeries.prototype.x8 = function (a, b, c) {
var d = this.dl(b);
this.ym.addItem(d, b);
this.yn.addItem(b, c);
return d;
};
FinancialSeries.prototype.aaa = function (a, b) {
if (b == null) {
return;
}
a.deregisterColumn(b);
var c = this.ym.item(b);
this.yn.removeItem(c);
this.ym.removeItem(b);
};
FinancialSeries.prototype.rc = function (a, b, c, d) {
_super.prototype.rc.call(this, a, b, c, d);
switch (b) {
case "SyncLink":
if (this.c4 != null && this.dc != null) {
this.xs.cd.e(this.ie);
this.ru(false);
}
break;
case "SeriesViewer":
if (c != null && d == null) {
if (this.xb != null) {
this.xb.b0(this);
}
if (this.xu != null) {
this.xu.b0(this);
}
}
if (c == null && d != null) {
if (this.xb != null) {
this.xb.ct(this);
}
if (this.xu != null) {
this.xu.ct(this);
}
}
this.xs.cd.e(this.ie);
this.ru(false);
break;
case "FastItemsSource":
this.yb = true;
if (typeCast(IFastItemsSource_$type, c) != null) {
this.aaa(typeCast(IFastItemsSource_$type, c), this.x7);
this.aaa(typeCast(IFastItemsSource_$type, c), this.x5);
this.aaa(typeCast(IFastItemsSource_$type, c), this.x6);
this.aaa(typeCast(IFastItemsSource_$type, c), this.x4);
this.aaa(typeCast(IFastItemsSource_$type, c), this.x9);
this.x7 = null;
this.x5 = null;
this.x6 = null;
this.x4 = null;
this.x9 = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
if (stringIsNullOrEmpty(this.z1) == false) {
this.x7 = this.x8(typeCast(IFastItemsSource_$type, d), this.z1, "OpenColumn");
}
if (stringIsNullOrEmpty(this.zs) == false) {
this.x5 = this.x8(typeCast(IFastItemsSource_$type, d), this.zs, "HighColumn");
}
if (stringIsNullOrEmpty(this.zx) == false) {
this.x6 = this.x8(typeCast(IFastItemsSource_$type, d), this.zx, "LowColumn");
}
if (stringIsNullOrEmpty(this.zf) == false) {
this.x4 = this.x8(typeCast(IFastItemsSource_$type, d), this.zf, "CloseColumn");
}
if (stringIsNullOrEmpty(this.z5) == false) {
this.x9 = this.x8(typeCast(IFastItemsSource_$type, d), this.z5, "VolumeColumn");
}
}
this.yb = false;
if (this.xu != null && !this.xu.c1()) {
this.xs.cd.e(this.ie);
this.ru(this.gh && c != null);
}
break;
case FinancialSeries.$$p[11]:
if (this.dp != null) {
this.aaa(this.dp, this.x7);
this.x7 = this.x8(this.dp, this.z1, "OpenColumn");
}
break;
case "OpenColumn":
if (this.xu != null && !this.xu.c1() && !this.yb) {
this.xs.cd.e(this.ie);
this.ru(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[1]:
if (this.dp != null) {
this.aaa(this.dp, this.x5);
this.x5 = this.x8(this.dp, this.zs, "HighColumn");
}
break;
case "HighColumn":
if (this.xu != null && !this.xu.c1() && !this.yb) {
this.xs.cd.e(this.ie);
this.ru(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[9]:
if (this.dp != null) {
this.aaa(this.dp, this.x6);
this.x6 = this.x8(this.dp, this.zx, "LowColumn");
}
break;
case "LowColumn":
if (this.xu != null && !this.xu.c1() && !this.yb) {
this.xs.cd.e(this.ie);
this.ru(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[0]:
if (this.dp != null) {
this.aaa(this.dp, this.x4);
this.x4 = this.x8(this.dp, this.zf, "CloseColumn");
}
break;
case "CloseColumn":
if (this.xu != null && !this.xu.c1() && !this.yb) {
this.xs.cd.e(this.ie);
this.ru(this.gh && this.d9);
}
this.aak();
break;
case FinancialSeries.$$p[13]:
if (this.dp != null) {
this.aaa(this.dp, this.x9);
this.x9 = this.x8(this.dp, this.z5, "VolumeColumn");
}
break;
case "VolumeColumn":
if (this.xu != null && !this.xu.c1() && !this.yb) {
this.xs.cd.e(this.ie);
this.ru(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[14]:
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
this.xs.cd.e(this.ie);
this.ru(false);
this.qn();
this.xt = typeCast(ITimeRangeSelectorAxis_$type, this.xb);
break;
case FinancialSeries.$$p[15]:
if (c != null) {
c.b0(this);
}
if (d != null) {
d.ct(this);
}
this.xs.cd.e(this.ie);
if (this.xu != null) {
this.xu.c1();
}
{
this.ru(false);
}
this.qn();
break;
case "TransitionProgress":
this.xh.c(this.jr, this.xf, this.xd);
if (this.d7(this.cw)) {
return;
}
if (this.jr == 1) {
this.xd.y();
this.aaj(this.xd, this.xs);
if (this.g2) {
this.g2 = false;
this.o8();
this.dd.r = truncate(this.ja());
this.dd.b = this.de;
}
if (this.g5) {
this.g5 = false;
this.o8();
this.dd.r = truncate(this.ja());
this.dd.b = this.de;
this.q2();
}
this.qq();
}
else {
this.aaj(this.xh, this.xs);
}
if (this.dc != null) {
this.dc.qx(this);
}
break;
case FinancialSeries.$$p[10]:
this.ru(false);
break;
case "IsCustomCategoryStyleAllowed":
this.yc = this.yf();
this.ru(false);
break;
case "CategoryMode":
if (this.xb != null) {
this.xb.ma(true);
}
break;
}
};
FinancialSeries.prototype.ye = function (a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
};
FinancialSeries.prototype.yd = function (a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.ce) {
return true;
}
return false;
};
FinancialSeries.prototype.w4 = function (a, b, c) {
if (b < a || a < 0 || a > this.dp.count || b < 0 || b > this.dp.count || c == null) {
return null;
}
var d = new Array((b - a) + 1);
var e = c.cn;
var f = null;
if (e) {
f = c.i$b;
}
for (var g = a; g <= b; g++) {
var h = g;
if (e) {
h = f._inner[h];
}
d[g - a] = this.dp.item(g);
}
return d;
};
FinancialSeries.prototype.y8 = function (a) {
return a.cd.b;
};
FinancialSeries.prototype.za = function (a) {
return a.cd.c;
};
FinancialSeries.prototype.w3 = function (a, b) {
return this.w4(a, b, this.xu);
};
FinancialSeries.prototype.get_ff = function () {
return true;
};
FinancialSeries.prototype.o5 = function () {
_super.prototype.o5.call(this);
this.xy = null;
};
FinancialSeries.prototype.dh = function (a, b, c) {
if (this.ef && this.f0(this.by) && !c) {
var d = this.xx(a, b, this.xy);
this.xy = d;
return d;
}
else {
var e = this.xw(a, b, this.xy);
this.xy = e;
return e;
}
};
FinancialSeries.prototype.zc = function (a) {
var b = this.xe();
var c = this.cw.b9;
var d = this.cw.ca;
var e = this.xb;
var f = 0;
if (e.cp) {
var g = (a.y - d.top) / d.height;
f = g * c.height + c.top;
}
else {
var h = (a.x - d.left) / d.width;
f = h * c.width + c.left;
}
var i = b.h.count;
var j = 0;
for (j = 0; j < i; j++) {
var k = b.h._inner[j];
var l = null;
if (j < i - 1) {
l = b.h._inner[j + 1];
}
if (k[0] <= f && l == null || l[0] >= f) {
if (l != null) {
if (Math.abs(k[0] - f) < Math.abs(l[0] - f)) {
return j;
}
else {
return j + 1;
}
}
else {
return j;
}
}
}
return j;
};
FinancialSeries.prototype.xx = function (a, b, c) {
if (this.dp == null) {
return null;
}
var d = this.dp.count;
var e = this.xs.cd.c;
var f = this.xs.cd.d;
var g = this.xs.cd.b;
var h = this.xb;
var i = -1;
var j = -1;
if (h.cn) {
var k = this.xe();
var l = this.zc(b);
if (k.o != null && l >= 0 && l < k.o.count) {
l = truncate(Math.round(k.o._inner[l]));
}
i = l;
j = l;
}
else {
var m = this.j4(b);
i = truncate(Math.floor((intDivide(m, g)))) * g;
j = i + (g - 1);
}
if (c != null && c.g == i && c.f == j) {
return c;
}
var n = new HighlightingInfo();
n.i = this;
n.g = i;
n.f = j;
return n;
};
FinancialSeries.prototype.xw = function (a, b, c) {
var 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;
};
FinancialSeries.prototype.yf = function () {
return this.yh;
};
FinancialSeries.prototype.is = function (a) {
var b = this.cw.ca;
var c = this.cw.b9;
var d = -1;
if (!b.isEmpty && !c.isEmpty && this.xb != null) {
var e = this.getEffectiveViewport1(this.cw);
var f = new ScalerParams(0, b, c, this.xb.ch, e);
var g = this.wo(this.cw);
var h = this.xb.eo(g.left, f);
var i = this.xb.eo(g.right, f);
var j = (a.x - b.left) / b.width;
var k = h + (j * (i - h));
if (this.xb.categoryMode != 0) {
k -= 0.5;
}
d = k;
}
return d;
};
FinancialSeries.prototype.j4 = function (a) {
return truncate(Math.round(this.is(a)));
};
FinancialSeries.prototype.get_ft = function () {
return typeCast(ISortingAxis_$type, this.xb) !== null;
};
FinancialSeries.prototype.a0 = function () {
return this.xb;
};
FinancialSeries.prototype.j6 = function (a) {
var b = this.cw.ca;
var c = this.cw.b9;
var d = this.getEffectiveViewport1(this.cw);
if (b.isEmpty || c.isEmpty) {
return -1;
}
var e = new Rect(0, 0, 0, 1, 1);
var f = new ScalerParams(0, b, c, this.xb.ch, d);
var g = typeCast(ISortingAxis_$type, this.xb);
var h = this.wo(this.cw);
var i = h.left;
var j = h.right;
var k = this.wc(a).x;
var l = this.xb.eo(k, f);
var m = this.xb.eo(i, f);
var n = this.xb.eo(j, f);
l = Math.max(m, Math.min(n, l));
var o = g.i$f(l);
return o;
};
FinancialSeries.prototype.ko = function (a) {
var b = 0;
if (typeCast(ISortingAxis_$type, this.xb) !== null) {
b = this.j6(a);
if (b == -1) {
return null;
}
}
else {
b = this.j4(a);
}
return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
};
FinancialSeries.prototype.xe = function () {
var a = this.xd;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.xh;
}
return a;
};
FinancialSeries.prototype.y2 = function (a, b, c) {
if (this.xb == null) {
return 0;
}
return this.xb.k9(a, b, c, this.index);
};
FinancialSeries.prototype.go = function () {
return this.yi;
};
FinancialSeries.prototype.xl = function () {
return 11;
};
FinancialSeries.prototype.c5 = function () {
return 3;
};
FinancialSeries.prototype.c8 = function () {
return 3;
};
FinancialSeries.prototype.aaj = function (a, b) {
this.qz();
this.wn = a.ad;
b.a6();
};
FinancialSeries.prototype.aah = function (a, b) {
a.x();
};
FinancialSeries.prototype.hf = function (a, b, c) {
var d = _super.prototype.hf.call(this, a, b, c);
var e = c;
if (this.dp == null || this.dp.count == 0 || !c.r() || b.isEmpty || a.isEmpty || this.xb == null || this.xu == null || e.cd.b < 1 || this.xb.bi == null || this.xu.bi == null || this.xu.l4 == this.xu.l3 || this.xb.itemsSource == null || this.xb.lj < 1) {
e.cd.b = 0;
d = false;
}
return d;
};
FinancialSeries.prototype.getViewInfo = function (a, b) {
b = this.cw.ca;
a = this.cw.b9;
return {
p0: a,
p1: b
};
};
FinancialSeries.prototype.y6 = function (a) {
var b = 0;
var c = a.ca;
var d = a.b9;
var e = this.getEffectiveViewport1(this.cw);
if (!c.isEmpty && !d.isEmpty && this.xu != null) {
var f = new ScalerParams(0, c, d, this.xu.ch, e);
f.b = this.iz();
b = this.xu.el(this.xu.me, f);
}
return b;
};
FinancialSeries.prototype.o8 = function () {
_super.prototype.o8.call(this);
this.xf.y();
this.xd.y();
this.xh.y();
};
FinancialSeries.prototype.rv = function (a) {
var _this = this;
_super.prototype.rv.call(this, a);
this.xs.cd.e(this.ie);
if (this.d7(this.cw)) {
return;
}
if (this.gs) {
if (this.d4()) {
this.aaj(this.xh, this.xs);
}
else {
this.aaj(this.xd, this.xs);
}
return;
}
if (this.gg(a)) {
var b = this.xf;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.xf = this.xh;
this.xh = b;
}
else {
this.xf = this.xd;
this.xd = b;
}
this.aah(this.xd, this.xs);
var c = false;
if (this.g4) {
this.dd.w();
this.dd.r = truncate(this.jb());
this.dd.b = this.df != null ? this.df : this.de;
if (this.g5) {
var d = this.xh;
this.xh = this.xf;
this.xf = d;
c = true;
}
this.xn.x(this, this.xf, this.xd, this.isVertical, this.xb, this.xu, this.xm, this.xl(), this.c6, this.c5(), function () { return _this.y6(_this.xs); }, this.xs.b9);
if (this.g5) {
var e = this.xh;
this.xh = this.xf;
this.xf = e;
}
this.g5 = false;
}
if (this.g7) {
this.dd.w();
this.dd.r = truncate(this.jc());
this.dd.b = this.dg != null ? this.dg : this.de;
if (this.g2) {
var f = this.xh;
this.xh = this.xf;
this.xf = f;
c = true;
}
this.xn.x(this, this.xf, this.xd, this.isVertical, this.xb, this.xu, this.xm, this.xl(), this.c6, this.c5(), function () { return _this.y6(_this.xs); }, this.xs.b9);
var g = this.xd;
this.xd = this.xf;
this.xf = g;
if (this.g2) {
var h = this.xh;
this.xh = this.xf;
this.xf = h;
}
this.g2 = false;
}
this.eb = false;
if (!c) {
this.o3();
}
this.sb();
if (this.g4) {
this.g3 = false;
this.g6 = false;
this.gl = false;
this.g2 = true;
}
if (this.g7) {
this.g6 = false;
this.g5 = true;
}
}
else {
this.aah(this.xd, this.xs);
this.aaj(this.xd, this.xs);
}
};
FinancialSeries.prototype.gp = function () {
return true;
};
FinancialSeries.prototype.yk = function (a) {
var e_1, _a;
try {
for (var _b = __values(fromEnum(a)), _c = _b.next(); !_c.done; _c = _b.next()) {
var b = _c.value;
switch (b) {
case "HighColumn":
if (this.x5 == null) {
return false;
}
break;
case "LowColumn":
if (this.x6 == null) {
return false;
}
break;
case "OpenColumn":
if (this.x7 == null) {
return false;
}
break;
case "CloseColumn":
if (this.x4 == null) {
return false;
}
break;
case "VolumeColumn":
if (this.x9 == null) {
return false;
}
break;
}
}
}
catch (e_1_1) {
e_1 = { error: e_1_1 };
}
finally {
try {
if (_c && !_c.done && (_a = _b.return))
_a.call(_b);
}
finally {
if (e_1)
throw e_1.error;
}
}
return true;
};
Object.defineProperty(FinancialSeries.prototype, "yl", {
get: function () {
return this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null;
},
enumerable: false,
configurable: true
});
FinancialSeries.prototype.yg = function () {
return this.typical != null;
};
FinancialSeries.prototype.z9 = function (a) {
this.typical(this, a);
};
Object.defineProperty(FinancialSeries.prototype, "yt", {
get: function () {
return this.yq();
},
enumerable: false,
configurable: true
});
FinancialSeries.prototype._yq = function () {
var a, b, _a, _b, c, e_2_1, d, e, f, g, h;
var e_2, _c;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
a = false;
if (!this.yg())
return [3 /*break*/, 8];
b = this.xo(0, this.dp.count);
this.z9(new FinancialEventArgs(0, this.dp.count, b, this.xp(b), this));
if (!(b.typicalColumn != null))
return [3 /*break*/, 8];
a = true;
_d.label = 1;
case 1:
_d.trys.push([1, 6, 7, 8]);
_a = __values(fromEnum(b.typicalColumn)), _b = _a.next();
_d.label = 2;
case 2:
if (!!_b.done)
return [3 /*break*/, 5];
c = _b.value;
return [4 /*yield*/, c];
case 3:
_d.sent();
_d.label = 4;
case 4:
_b = _a.next();
return [3 /*break*/, 2];
case 5: return [3 /*break*/, 8];
case 6:
e_2_1 = _d.sent();
e_2 = { error: e_2_1 };
return [3 /*break*/, 8];
case 7:
try {
if (_b && !_b.done && (_c = _a.return))
_c.call(_a);
}
finally {
if (e_2)
throw e_2.error;
}
return [7 /*endfinally*/];
case 8:
if (!!a)
return [3 /*break*/, 17];
if (!(this.yl && this.xb.i$b != null))
return [3 /*break*/, 13];
d = this.dp.count;
e = this.xb.i$b;
f = 0;
_d.label = 9;
case 9:
if (!(f < d))
return [3 /*break*/, 12];
return [4 /*yield*/, (this.x5.item(e.item(f)) + this.x6.item(e.item(f)) + this.x4.item(e.item(f))) / 3];
case 10:
_d.sent();
_d.label = 11;
case 11:
++f;
return [3 /*break*/, 9];
case 12: return [3 /*break*/, 17];
case 13:
g = this.dp.count;
h = 0;
_d.label = 14;
case 14:
if (!(h < g))
return [3 /*break*/, 17];
return [4 /*yield*/, (this.x5.item(h) + this.x6.item(h) + this.x4.item(h)) / 3];
case 15:
_d.sent();
_d.label = 16;
case 16:
++h;
return [3 /*break*/, 14];
case 17: return [2 /*return*/];
}
});
};
FinancialSeries.prototype.yq = function () {
var _this = this;
return toEnum(function () { return _this._yq(); });
};
Object.defineProperty(FinancialSeries.prototype, "ys", {
get: function () {
return this.yp();
},
enumerable: false,
configurable: true
});
FinancialSeries.prototype._yp = function () {
var a, b, c, d, e;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!(this.yl && this.xb.i$b != null))
return [3 /*break*/, 7];
a = this.x5.count;
b = this.xb.i$b;
if (!(a > 0))
return [3 /*break*/, 2];
return [4 /*yield*/, this.y7(this.x5.item(b.item(0)) - this.x6.item(b.item(0)))];
case 1:
_a.sent();
_a.label = 2;
case 2:
c = 1;
_a.label = 3;
case 3:
if (!(c < a))
return [3 /*break*/, 6];
return [4 /*yield*/, Math.max(this.y7(this.x5.item(b.item(c)) - this.x6.item(b.item(c))), Math.max(this.y7(Math.abs(this.x5.item(b.item(c)) - this.x4.item(b.item(c - 1)))), this.y7(Math.abs(this.x6.item(b.item(c)) - this.x4.item(b.item(c - 1))))))];
case 4:
_a.sent();
_a.label = 5;
case 5:
++c;
return [3 /*break*/, 3];
case 6: return [3 /*break*/, 13];
case 7:
d = this.x5.count;
if (!(d > 0))
return [3 /*break*/, 9];
return [4 /*yield*/, this.y7(this.x5.item(0) - this.x6.item(0))];
case 8:
_a.sent();
_a.label = 9;
case 9:
e = 1;
_a.label = 10;
case 10:
if (!(e < d))
return [3 /*break*/, 13];
return [4 /*yield*/, Math.max(this.y7(this.x5.item(e) - this.x6.item(e)), Math.max(this.y7(Math.abs(this.x5.item(e) - this.x4.item(e - 1))), this.y7(Math.abs(this.x6.item(e) - this.x4.item(e - 1)))))];
case 11:
_a.sent();
_a.label = 12;
case 12:
++e;
return [3 /*break*/, 10];
case 13: return [2 /*return*/];
}
});
};
FinancialSeries.prototype.yp = function () {
var _this = this;
return toEnum(function () { return _this._yp(); });
};
Object.defineProperty(FinancialSeries.prototype, "yr", {
get: function () {
return this.yo();
},
enumerable: false,
configurable: true
});
FinancialSeries.prototype._yo = function () {
var a, b, c, d, e;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!(this.yl && this.xb.i$b != null))
return [3 /*break*/, 7];
a = this.x6.count;
b = this.xb.i$b;
if (!(a > 0))
return [3 /*break*/, 2];
return [4 /*yield*/, this.y7(this.x6.item(b.item(0)))];
case 1:
_a.sent();
_a.label = 2;
case 2:
c = 1;
_a.label = 3;
case 3:
if (!(c < a))
return [3 /*break*/, 6];
return [4 /*yield*/, Math.min(this.y7(this.x6.item(b.item(c))), this.y7(this.x4.item(b.item(c - 1))))];
case 4:
_a.sent();
_a.label = 5;
case 5:
c++;
return [3 /*break*/, 3];
case 6: return [3 /*break*/, 13];
case 7:
d = this.x6.count;
if (!(d > 0))
return [3 /*break*/, 9];
return [4 /*yield*/, this.y7(this.x6.item(0))];
case 8:
_a.sent();
_a.label = 9;
case 9:
e = 1;
_a.label = 10;
case 10:
if (!(e < d))
return [3 /*break*/, 13];
return [4 /*yield*/, Math.min(this.y7(this.x6.item(e)), this.y7(this.x4.item(e - 1)))];
case 11:
_a.sent();
_a.label = 12;
case 12:
e++;
return [3 /*break*/, 10];
case 13: return [2 /*return*/];
}
});
};
FinancialSeries.prototype.yo = function () {
var _this = this;
return toEnum(function () { return _this._yo(); });
};
FinancialSeries.prototype.yv = function (a) {
if (a == null) {
return null;
}
if (this.yl && this.xb.i$b != null) {
return new SafeSortedReadOnlyDoubleCollection(0, a, this.xb.i$b);
}
return new SafeReadOnlyDoubleCollection(0, a);
};
FinancialSeries.prototype.yu = function () {
var a = new List$1(String_$type, 0);
a.add("HighColumn");
a.add("LowColumn");
a.add("CloseColumn");
if (this.typicalBasedOn != null && this.dp != null && !this.ya) {
this.ya = true;
var b = this.xo(0, this.dp.count);
this.ya = false;
var c = new FinancialEventArgs(0, this.dp.count, b, this.xp(b), this);
this.typicalBasedOn(this, c);
if (c.basedOn != null && c.basedOn.count > 0) {
return c.basedOn;
}
}
return a;
};
FinancialSeries.prototype.getOpenColumnAsArray = function () {
if (this.x7 == null) {
return null;
}
if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
if (this.yz != null) {
return this.yz.asArray();
}
var a = new List$1(Number_$type, 2, this.x7.count);
var b = this.xb.i$b;
var c = this.x7.asArray();
for (var d = 0; d < b.count; d++) {
a.add(c[b._inner[d]]);
}
this.yz = a;
return this.yz.asArray();
}
else {
return this.x7.asArray();
}
};
FinancialSeries.prototype.getHighColumnAsArray = function () {
if (this.x5 == null) {
return null;
}
if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
if (this.yx != null) {
return this.yx.asArray();
}
var a = new List$1(Number_$type, 2, this.x5.count);
var b = this.xb.i$b;
var c = this.x5.asArray();
for (var d = 0; d < b.count; d++) {
a.add(c[b._inner[d]]);
}
this.yx = a;
return this.yx.asArray();
}
else {
return this.x5.asArray();
}
};
FinancialSeries.prototype.getLowColumnAsArray = function () {
if (this.x6 == null) {
return null;
}
if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
if (this.yy != null) {
return this.yy.asArray();
}
var a = new List$1(Number_$type, 2, this.x6.count);
var b = this.xb.i$b;
var c = this.x6.asArray();
for (var d = 0; d < b.count; d++) {
a.add(c[b._inner[d]]);
}
this.yy = a;
return this.yy.asArray();
}
else {
return this.x6.asArray();
}
};
FinancialSeries.prototype.getCloseColumnAsArray = function () {
if (this.x4 == null) {
return null;
}
if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
if (this.yw != null) {
return this.yw.asArray();
}
var a = new List$1(Number_$type, 2, this.x4.count);
var b = this.xb.i$b;
var c = this.x4.asArray();
for (var d = 0; d < b.count; d++) {
a.add(c[b._inner[d]]);
}
this.yw = a;
return this.yw.asArray();
}
else {
return this.x4.asArray();
}
};
FinancialSeries.prototype.getVolumeColumnAsArray = function () {
if (this.x9 == null) {
return null;
}
if (this.xb != null && typeCast(ISortingAxis_$type, this.xb) !== null) {
if (this.y0 != null) {
return this.y0.asArray();
}
var a = new List$1(Number_$type, 2, this.x9.count);
var b = this.xb.i$b;
var c = this.x9.asArray();
for (var d = 0; d < b.count; d++) {
a.add(c[b._inner[d]]);
}
this.y0 = a;
return this.y0.asArray();
}
else {
return this.x9.asArray();
}
};
FinancialSeries.prototype.pd = function (a, b, c, d) {
_super.prototype.pd.call(this, a, b, c, d);
if (this.xb == null || !(typeCast(ISortingAxis_$type, this.xb) !== null)) {
return;
}
var e = this.xb.i$b;
switch (a) {
case 1:
for (var f = b; f < c; f++) {
var g = e._inner[f];
if (this.yz != null) {
this.yz.insert(f, this.x7.item(g));
}
if (this.yx != null) {
this.yx.insert(f, this.x5.item(g));
}
if (this.yy != null) {
this.yy.insert(f, this.x6.item(g));
}
if (this.yw != null) {
this.yw.insert(f, this.x4.item(g));
}
if (this.y0 != null) {
this.y0.insert(f, this.x9.item(g));
}
}
break;
case 0:
if (this.yz != null) {
this.yz.v(b, c);
}
if (this.yx != null) {
this.yx.v(b, c);
}
if (this.yy != null) {
this.yy.v(b, c);
}
if (this.yw != null) {
this.yw.v(b, c);
}
if (this.y0 != null) {
this.y0.v(b, c);
}
break;
case 4:
if (this.yz != null) {
this.yz = new List$1(Number_$type, 0);
}
if (this.yx != null) {
this.yx = new List$1(Number_$type, 0);
}
if (this.yy != null) {
this.yy = new List$1(Number_$type, 0);
}
if (this.yw != null) {
this.yw = new List$1(Number_$type, 0);
}
if (this.y0 != null) {
this.y0 = new List$1(Number_$type, 0);
}
break;
case 3:
case 2:
for (var h = b; h < c; h++) {
var i = e._inner[h];
if (this.yz != null) {
this.yz._inner[h] = this.x7.item(i);
}
if (this.yx != null) {
this.yx._inner[h] = this.x5.item(i);
}
if (this.yy != null) {
this.yy._inner[h] = this.x6.item(i);
}
if (this.yw != null) {
this.yw._inner[h] = this.x4.item(i);
}
if (this.y0 != null) {
this.y0._inner[h] = this.x9.item(i);
}
}
break;
}
this.aak();
this.sr();
};
FinancialSeries.prototype.xo = function (a, b) {
var _this = this;
var c = this.yv(this.x7);
var d = this.yv(this.x4);
var e = this.yv(this.x5);
var f = this.yv(this.x6);
var g = this.yv(this.x9);
var h = ((function () {
var $ret = new FinancialCalculationDataSource();
$ret.typicalColumn = new CalculatedColumn(1, new SafeEnumerable(_this.yt), _this.yu());
$ret.trueRange = new CalculatedColumn(1, new SafeEnumerable(_this.ys), ((function () {
var $ret = new List$1(String_$type, 0);
$ret.add("HighColumn");
$ret.add("LowColumn");
$ret.add("CloseColumn");
return $ret;
})()));
$ret.trueLow = new CalculatedColumn(1, new SafeEnumerable(_this.yr), ((function () {
var $ret = new List$1(String_$type, 0);
$ret.add("LowColumn");
$ret.add("CloseColumn");
return $ret;
})()));
$ret.openColumn = c;
$ret.closeColumn = d;
$ret.highColumn = e;
$ret.lowColumn = f;
$ret.volumeColumn = g;
$ret.calculateFrom = a;
$ret.calculateCount = b;
$ret.minimumValue = NaN;
$ret.maximumValue = NaN;
$ret.count = _this.dp != null ? _this.dp.count : 0;
return $ret;
})());
return h;
};
FinancialSeries.prototype.y7 = function (a) {
if (isInfinity(a) || isNaN_(a)) {
return 0;
}
return a;
};
FinancialSeries.prototype.xp = function (a) {
var _this = this;
return ((function () {
var $ret = new FinancialCalculationSupportingCalculations();
$ret.a = new ColumnSupportingCalculation(1, TrendCalculators.b, new List$1(String_$type, 0));
$ret.c = new ColumnSupportingCalculation(1, TrendCalculators.e, new List$1(String_$type, 0));
$ret.d = new ColumnSupportingCalculation(1, TrendCalculators.f, new List$1(String_$type, 0));
$ret.b = new ColumnSupportingCalculation(1, TrendCalculators.d, new List$1(String_$type, 0));
$ret.h = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.volumeColumn, b.shortPeriod); }, ((function () {
var $ret = new List$1(String_$type, 0);
$ret.add("VolumeColumn");
return $ret;
})()));
$ret.f = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.volumeColumn, b.longPeriod); }, ((function () {
var $ret = new List$1(String_$type, 0);
$ret.add("VolumeColumn");
return $ret;
})()));
$ret.g = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.typicalColumn, b.shortPeriod); }, a.typicalColumn.basedOn);
$ret.e = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.typicalColumn, b.longPeriod); }, a.typicalColumn.basedOn);
$ret.k = Series.hr;
$ret.j = Series.hq;
$ret.i = runOn(_this, _this.y7);
return $ret;
})());
};
Object.defineProperty(FinancialSeries.prototype, "categoryAxis", {
get: function () {
return this.xb;
},
enumerable: false,
configurable: true
});
FinancialSeries.prototype.rw = function (a, b) {
_super.prototype.rw.call(this, a, b);
if (!this.g1) {
this.cw.be(b);
return;
}
var c = typeCast(FinancialSeriesView.$, this.cv);
this.cw.be(b);
c.cd.e(this.ie);
if (this.d7(this.cv)) {
return;
}
this.rx();
this.g1 = false;
};
FinancialSeries.prototype.rx = function () {
_super.prototype.rx.call(this);
var a = typeCast(FinancialSeriesView.$, this.cv);
if (!this.gt) {
this.aah(this.xg, a);
}
this.gt = false;
this.aaj(this.xg, a);
};
FinancialSeries.prototype.rt = function (a, b, c, d, e) {
_super.prototype.rt.call(this, a, b, c, d, e);
var f = this.ba.a$j.item(d);
var g = f;
g.cd.e(this.ie);
f.bd(c);
if (this.d7(g)) {
return;
}
if (this.xc == null) {
this.xc = new CategoryFrame(3);
}
this.xc.x();
this.aah(this.xc, g);
this.aaj(this.xc, g);
};
FinancialSeries.prototype.aw = function (a) {
if (this.xb == a) {
return this.xu;
}
if (this.xu == a) {
return this.xb;
}
return null;
};
FinancialSeries.prototype.preferredCategoryMode = function (a) {
var b = typeCast(IDateTimeAxis_$type, this.xb);
return b != null ? b.preferredCategoryMode(this) : this.xj;
};
Object.defineProperty(FinancialSeries.prototype, "xj", {
get: function () {
return this.xi;
},
set: function (a) {
var b = this.xj;
if (a != b) {
this.xi = a;
this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.xj));
}
},
enumerable: false,
configurable: true
});
FinancialSeries.prototype.get_fn = function () {
return true;
};
FinancialSeries.prototype.r7 = function (a, b) {
_super.prototype.r7.call(this, a, b);
this.aa1 = a;
};
FinancialSeries.prototype.aak = function () {
this.io = this.x4 == null || this.x4.count == 0 ? NaN : this.x4.item(this.x4.count - 1);
};
FinancialSeries.prototype.kq = function (a) {
if (this.xt != null && a != null) {
if (this.xv == null || this.xv.propertyName != this.xt.dateTimeMemberPath) {
this.xv = new FastReflectionHelper(false, this.xt.dateTimeMemberPath);
}
var b = this.xv.getPropertyValue(a);
if (typeCast(Date_$type, b) !== null) {
return dateToStringFormat(b, this.xt.itemLabelFormat());
}
}
return _super.prototype.kq.call(this, a);
};
FinancialSeries.$t = markType(FinancialSeries, 'FinancialSeries', Series.$, [IHasCategoryAxis_$type, IHasCategoryModePreference_$type]);
FinancialSeries.$$p = markDep(DependencyProperty, PropertyMetadata, FinancialSeries, 'raisePropertyChanged', ['CloseMemberPath:zf:aal', [2, null], 'HighMemberPath:zs:aar', [2, null], 'HighlightedCloseMemberPath:zi:aam', [2, null], 'HighlightedHighMemberPath:zk:aan', [2, null], 'HighlightedLowMemberPath:zm:aao', [2, null], 'HighlightedOpenMemberPath:zo:aap', [2, null], 'HighlightedVolumeMemberPath:zq:aaq', [2, null], 'IsCustomCategoryStyleAllowed:yh:aas', [0, false], 'IsTransitionInEnabled:yi:aat', [0, false], 'LowMemberPath:zx:aau', [2, null], 'NegativeBrush:aa1:aav', [Brush.$, null], 'OpenMemberPath:z1:aaw', [2, null], 'TransitionInMode:xm:aax', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'VolumeMemberPath:z5:aay', [2, null], 'XAxis:xb:aaz', [CategoryAxisBase.$, null], 'YAxis:xu:aa0', [NumericYAxis.$, null]]);
return FinancialSeries;
}(Series));
export { FinancialSeries };
/**
* @hidden
*/
var FinancialCalculationSupportingCalculations = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FinancialCalculationSupportingCalculations, _super);
function FinancialCalculationSupportingCalculations() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.a = null;
_this.c = null;
_this.d = null;
_this.b = null;
_this.h = null;
_this.f = null;
_this.g = null;
_this.e = null;
_this.k = null;
_this.j = null;
_this.i = null;
return _this;
}
FinancialCalculationSupportingCalculations.$t = markType(FinancialCalculationSupportingCalculations, 'FinancialCalculationSupportingCalculations');
return FinancialCalculationSupportingCalculations;
}(Base));
export { FinancialCalculationSupportingCalculations };
/**
* @hidden
*/
var DataSourceSupportingCalculation = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(DataSourceSupportingCalculation, _super);
function DataSourceSupportingCalculation(a) {
var _rest = [];
for (var _i = 1; _i < arguments.length; _i++) {
_rest[_i - 1] = arguments[_i];
}
var _this = this;
a = (a == void 0) ? 0 : a;
switch (a) {
case 0:
{
var c = _rest[0];
_this = _super.call(this, Delegate_$type, 0, c) || this;
}
break;
case 1:
{
var c = _rest[0];
var d = _rest[1];
_this = _super.call(this, Delegate_$type, 1, c, d) || this;
}
break;
}
return _this;
}
DataSourceSupportingCalculation.$t = markType(DataSourceSupportingCalculation, 'DataSourceSupportingCalculation', SupportingCalculation$1.$.specialize(Delegate_$type));
return DataSourceSupportingCalculation;
}(SupportingCalculation$1));
export { DataSourceSupportingCalculation };
/**
* @hidden
*/
var FinancialCalculationDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FinancialCalculationDataSource, _super);
function FinancialCalculationDataSource() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this._openColumn = null;
_this._closeColumn = null;
_this._highColumn = null;
_this._lowColumn = null;
_this._volumeColumn = null;
_this._indicatorColumn = null;
_this._typicalColumn = null;
_this._trueRange = null;
_this._trueLow = null;
_this._period = 0;
_this._shortPeriod = 0;
_this._longPeriod = 0;
_this._count = 0;
_this._calculateFrom = 0;
_this._calculateCount = 0;
_this._multiplier = 0;
_this._minimumValue = 0;
_this._maximumValue = 0;
_this._specifiesRange = false;
_this._series = null;
return _this;
}
Object.defineProperty(FinancialCalculationDataSource.prototype, "openColumn", {
get: function () {
return this._openColumn;
},
set: function (a) {
this._openColumn = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "closeColumn", {
get: function () {
return this._closeColumn;
},
set: function (a) {
this._closeColumn = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "highColumn", {
get: function () {
return this._highColumn;
},
set: function (a) {
this._highColumn = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "lowColumn", {
get: function () {
return this._lowColumn;
},
set: function (a) {
this._lowColumn = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "volumeColumn", {
get: function () {
return this._volumeColumn;
},
set: function (a) {
this._volumeColumn = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "indicatorColumn", {
get: function () {
return this._indicatorColumn;
},
set: function (a) {
this._indicatorColumn = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "typicalColumn", {
get: function () {
return this._typicalColumn;
},
set: function (a) {
this._typicalColumn = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "trueRange", {
get: function () {
return this._trueRange;
},
set: function (a) {
this._trueRange = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "trueLow", {
get: function () {
return this._trueLow;
},
set: function (a) {
this._trueLow = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "period", {
get: function () {
return this._period;
},
set: function (a) {
this._period = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "shortPeriod", {
get: function () {
return this._shortPeriod;
},
set: function (a) {
this._shortPeriod = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "longPeriod", {
get: function () {
return this._longPeriod;
},
set: function (a) {
this._longPeriod = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "count", {
get: function () {
return this._count;
},
set: function (a) {
this._count = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "calculateFrom", {
get: function () {
return this._calculateFrom;
},
set: function (a) {
this._calculateFrom = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "calculateCount", {
get: function () {
return this._calculateCount;
},
set: function (a) {
this._calculateCount = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "multiplier", {
get: function () {
return this._multiplier;
},
set: function (a) {
this._multiplier = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "minimumValue", {
get: function () {
return this._minimumValue;
},
set: function (a) {
this._minimumValue = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "maximumValue", {
get: function () {
return this._maximumValue;
},
set: function (a) {
this._maximumValue = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "specifiesRange", {
get: function () {
return this._specifiesRange;
},
set: function (a) {
this._specifiesRange = a;
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialCalculationDataSource.prototype, "series", {
get: function () {
return this._series;
},
set: function (a) {
this._series = a;
},
enumerable: false,
configurable: true
});
FinancialCalculationDataSource.$t = markType(FinancialCalculationDataSource, 'FinancialCalculationDataSource');
return FinancialCalculationDataSource;
}(Base));
export { FinancialCalculationDataSource };
/**
* @hidden
*/
var FinancialSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
__extends(FinancialSeriesView, _super);
function FinancialSeriesView(a) {
var _this = _super.call(this, a) || this;
_this.cf = null;
_this.cd = null;
_this.ch = 0;
_this.ch = -1;
_this.cf = a;
_this.cd = _this.ce();
return _this;
}
FinancialSeriesView.prototype.cg = function (a) {
if (this.ch != a.w) {
return true;
}
return false;
};
FinancialSeriesView.prototype.ci = function (a) {
this.ch = a.w;
};
FinancialSeriesView.prototype.a4 = function () {
_super.prototype.a4.call(this);
if (!this.t) {
}
};
FinancialSeriesView.prototype.getDefaultTooltipTemplate = function () {
var a = "<div class='ui-chart-default-tooltip-content'>";
if (this.cf.xb.ce) {
a += "<span>${itemLabel}</span><br/>";
}
else if (this.cf.xb.f2 != null) {
a += "<span>${item." + this.cf.xb.f2 + "}</span><br/>";
}
a += "<span class='ui-priority-primary'";
var b = this.f.ba.a$u(this.f);
if (!stringIsNullOrEmpty(b)) {
a += " style='color:" + b + "'";
}
var c = new SRProvider(this.ae);
var d = c.b1("financialSeries_Open");
var e = c.b1("financialSeries_High");
var f = c.b1("financialSeries_Low");
var g = c.b1("financialSeries_Close");
d = stringIsNullOrEmpty(d) ? "Open" : d;
e = stringIsNullOrEmpty(e) ? "High" : e;
f = stringIsNullOrEmpty(f) ? "Low" : f;
g = stringIsNullOrEmpty(g) ? "Close" : g;
a += ">" + this.cf.title + "</span><table><tr><td>" + d + ":</td><td>" + "${item." + this.cf.z1 + "}</td></tr><tr><td>" + e + ":</td><td>" + "${item." + this.cf.zs + "}</td></tr><tr><td>" + f + ":</td><td>" + "${item." + this.cf.zx + "}</td></tr><tr><td>" + g + ":</td><td>" + "${item." + this.cf.zf + "}</td></tr>";
if (!stringIsNullOrEmpty(this.cf.z5)) {
var h = c.b1("financialSeries_Volume");
h = stringIsNullOrEmpty(h) ? "Volume" : h;
a += "<tr><td>" + h + ":</td><td>" + "${item." + this.cf.z5 + "}</td></tr>";
}
a += "</table></div>";
return a;
};
FinancialSeriesView.prototype.an = function () {
var a = new Color();
a.colorString = "rgba(95,95,95,0.5)";
this.f.v6 = a;
this.f.jn = 5;
this.f.jo = 2;
this.f.jp = 2;
};
FinancialSeriesView.$t = markType(FinancialSeriesView, 'FinancialSeriesView', SeriesView.$);
return FinancialSeriesView;
}(SeriesView));
export { FinancialSeriesView };