igniteui-react-charts
Version:
Ignite UI React charting components for building rich data visualizations using TypeScript APIs.
1,417 lines • 85.4 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-react-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-react-core";
import { IFastItemColumn$1_$type } from "igniteui-react-core";
import { Series } from "./Series";
import { Rect } from "igniteui-react-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-react-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-react-core";
import { DependencyProperty } from "igniteui-react-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "igniteui-react-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-react-core";
import { List$1 } from "igniteui-react-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { Dictionary$2 } from "igniteui-react-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-react-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-react-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-react-core";
import { stringIsNullOrEmpty } from "igniteui-react-core";
import { dateToStringFormat } from "igniteui-react-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-react-core";
import { Color } from "igniteui-react-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.xh == null) {
this.b = 0;
return;
}
var e = (this.a.cf.xh != null) ? this.a.cf.xh.df : false;
var f = new ScalerParams(0, b, c, e, d);
var g = this.a.cf.wu(this.a);
var h = typeCast(ISortingAxis_$type, this.a.cf.xh);
if (h == null || h.i$b == null) {
var i = Math.floor(this.a.cf.xh.fw(g.left, f));
var j = Math.ceil(this.a.cf.xh.fw(g.right, f));
if (this.a.cf.xh.df) {
j = Math.ceil(this.a.cf.xh.fw(g.left, f));
i = Math.floor(this.a.cf.xh.fw(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.x8 = null;
_this.x6 = null;
_this.x7 = null;
_this.x5 = null;
_this.x9 = null;
_this.yi = false;
_this.assigningCategoryStyle = null;
_this.xq = null;
_this.ys = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
_this.yt = new Dictionary$2(String_$type, String_$type, 0);
_this.yh = false;
_this.x4 = null;
_this.xl = null;
_this.xn = null;
_this.xj = null;
_this.xt = null;
_this.typical = null;
_this.typicalBasedOn = null;
_this.yg = false;
_this.y5 = null;
_this.y3 = null;
_this.y4 = null;
_this.y2 = null;
_this.y6 = null;
_this.xm = null;
_this.xi = null;
_this.xo = 0;
_this.xz = null;
_this.x1 = null;
_this.xq = new CategorySeriesRenderManager();
_this.yi = false;
_this.xt = new CategoryTransitionSourceFramePreparer();
_this.xm = new CategoryFrame(3);
_this.ab = FinancialSeries.$;
_this.xp = 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.aak));
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.aai));
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.aaj));
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.aah));
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.aal));
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.r9));
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.r9));
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.r9));
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.r9));
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.aak = function (a, b) {
if (this.zu != null) {
b.value = this.zu;
return;
}
b.value = this.z7;
};
FinancialSeries.prototype.aai = function (a, b) {
if (this.zq != null) {
b.value = this.zq;
return;
}
b.value = this.zy;
};
FinancialSeries.prototype.aaj = function (a, b) {
if (this.zs != null) {
b.value = this.zs;
return;
}
b.value = this.z3;
};
FinancialSeries.prototype.aah = function (a, b) {
if (this.zo != null) {
b.value = this.zo;
return;
}
b.value = this.zl;
};
FinancialSeries.prototype.aal = function (a, b) {
if (this.zw != null) {
b.value = this.zw;
return;
}
b.value = this.aab;
};
FinancialSeries.prototype.kz = function () {
if (this.d4()) {
return this.bo.xn;
}
else {
return this.bo.xj;
}
};
FinancialSeries.prototype.q8 = function (a) {
_super.prototype.q8.call(this, a);
this.xy = a;
};
FinancialSeries.prototype.get_e8 = function () {
return true;
};
FinancialSeries.prototype.ai = function () {
return [this.xh, this.x0];
};
FinancialSeries.prototype.ku = function (a, b) {
var c = this.ni(b);
if (c == FinancialSeries.$$p[11]) {
return this.kv(a, b, this.z7);
}
if (c == FinancialSeries.$$p[1]) {
return this.kv(a, b, this.zy);
}
if (c == FinancialSeries.$$p[9]) {
return this.kv(a, b, this.z3);
}
if (c == FinancialSeries.$$p[0]) {
return this.kv(a, b, this.zl);
}
if (c == FinancialSeries.$$p[13]) {
return this.kv(a, b, this.aab);
}
if (c == FinancialSeries.$$p[5]) {
return this.kv(a, b, this.zu);
}
if (c == FinancialSeries.$$p[3]) {
return this.kv(a, b, this.zq);
}
if (c == FinancialSeries.$$p[4]) {
return this.kv(a, b, this.zs);
}
if (c == FinancialSeries.$$p[2]) {
return this.kv(a, b, this.zo);
}
if (c == FinancialSeries.$$p[6]) {
return this.kv(a, b, this.zw);
}
return _super.prototype.ku.call(this, a, b);
};
FinancialSeries.prototype.mi = function (a) {
var b = this.ni(a);
if (b == FinancialSeries.$$p[11]) {
return this.z7;
}
if (b == FinancialSeries.$$p[1]) {
return this.zy;
}
if (b == FinancialSeries.$$p[9]) {
return this.z3;
}
if (b == FinancialSeries.$$p[0]) {
return this.zl;
}
if (b == FinancialSeries.$$p[13]) {
return this.aab;
}
if (b == FinancialSeries.$$p[5]) {
return this.zu;
}
if (b == FinancialSeries.$$p[3]) {
return this.zq;
}
if (b == FinancialSeries.$$p[4]) {
return this.zs;
}
if (b == FinancialSeries.$$p[2]) {
return this.zo;
}
if (b == FinancialSeries.$$p[6]) {
return this.zw;
}
return _super.prototype.mi.call(this, a);
};
FinancialSeries.prototype.zh = function () {
return 2;
};
FinancialSeries.prototype.zf = function () {
return 4;
};
FinancialSeries.prototype.aj = function (a) {
var b = this.an(this.xh, this.xj.h, this.ze(this.cw), this.zg(this.cw), this.ws(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.zh();
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.xh, this.xj.h, this.ze(this.cw), this.zg(this.cw), this.ws(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.v7 = function () {
return this.aa7;
};
FinancialSeries.prototype.v8 = function () {
return this.aa7;
};
FinancialSeries.prototype.o8 = function () {
_super.prototype.o8.call(this);
this.xh = null;
this.x0 = null;
};
FinancialSeries.prototype.get_em = function () {
return true;
};
FinancialSeries.prototype.get_f6 = function () {
return this.x0 != null && this.x0.df;
};
Object.defineProperty(FinancialSeries.prototype, "yd", {
get: function () {
return this.x8;
},
set: function (a) {
if (this.x8 != a) {
var b = this.x8;
this.x8 = a;
this.raisePropertyChanged("OpenColumn", b, this.x8);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialSeries.prototype, "yb", {
get: function () {
return this.x6;
},
set: function (a) {
if (this.x6 != a) {
var b = this.x6;
this.x6 = a;
this.raisePropertyChanged("HighColumn", b, this.x6);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialSeries.prototype, "yc", {
get: function () {
return this.x7;
},
set: function (a) {
if (this.x7 != a) {
var b = this.x7;
this.x7 = a;
this.raisePropertyChanged("LowColumn", b, this.x7);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialSeries.prototype, "ya", {
get: function () {
return this.x5;
},
set: function (a) {
if (this.x5 != a) {
var b = this.x5;
this.x5 = a;
this.raisePropertyChanged("CloseColumn", b, this.x5);
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(FinancialSeries.prototype, "yf", {
get: function () {
return this.x9;
},
set: function (a) {
if (this.x9 != a) {
var b = this.x9;
this.x9 = a;
this.raisePropertyChanged("VolumeColumn", b, this.x9);
}
},
enumerable: false,
configurable: true
});
FinancialSeries.prototype.gc = function () {
return this.highlightedItemsSource != null || (this.zu != null && this.zq != null && this.zs != null && this.zo != null);
};
FinancialSeries.prototype.yp = function () {
return (this.assigningCategoryStyle != null && this.yi) || this.by != 1 || this.cq != 1 || this.cp != 1;
};
FinancialSeries.prototype.aao = function (a) {
if (this.assigningCategoryStyle != null && this.yi) {
this.assigningCategoryStyle(this, a);
}
};
FinancialSeries.prototype.aam = function (a, b, c, d, e, f, g) {
var h = this.by != 1;
var i = this.cq != 1;
var j = this.cp != 1;
this.xq.a3(this.xq.b, d.dm, a, b, c, d, e, f, false, g);
this.xq.ab(this.ic);
var k = this.xq.ay;
var l = null;
var m = null;
var n = null;
var o = this.dp;
if (h && this.dc != null) {
l = this.dc.d0.getHighlightingInfo(this, o, k.z, k.y, false);
k.c = l;
}
if (i && this.dc != null) {
m = this.dc.d1.getHighlightingInfo(this, o, k.z, k.y, false);
if (m == null && this.bo != null) {
m = this.dc.d1.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, false);
}
k.d = m;
}
if (j && this.dc != null) {
n = this.dc.dz.getHighlightingInfo(this, o, k.z, k.y, false);
k.b = n;
}
k.h = f;
this.aao(k);
this.xq.z(this, l, m, n, f, h, i, j, b < 0);
};
FinancialSeries.prototype.y7 = function (a) {
return this.iv(a, this.xh);
};
FinancialSeries.prototype.ke = function (a, b) {
return this.kf(a, b, this.xh, runOn(this, this.y7), new FinancialValueList(this.yd, this.yb, this.yc, this.ya, this.yf));
};
FinancialSeries.prototype.kc = function (a, b) {
return this.kd(a, b, this.xh, runOn(this, this.y7), new FinancialValueList(this.yd, this.yb, this.yc, this.ya, this.yf));
};
FinancialSeries.prototype.ir = function (a, b, c, d, e) {
if (c == null) {
return Number.POSITIVE_INFINITY;
}
var f = this.xh.o5;
return this.is(a, b, this.xh, d, e, f, runOn(this, this.y7));
};
FinancialSeries.prototype.getOffsetValue = function () {
return this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
};
FinancialSeries.prototype.getCategoryWidth = function () {
return this.xh.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
};
FinancialSeries.prototype.wn = function (a, b, c) {
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, null, null, null);
};
FinancialSeries.prototype.i8 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y8(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(new FinancialValueList(this.yd, this.yb, this.yc, this.ya, this.yf), a, this.xh, f, e, runOn(this, this.y7), b, c);
};
FinancialSeries.prototype.i4 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y8(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.yb, a, this.xh, f, e, runOn(this, this.y7), b, c);
};
FinancialSeries.prototype.i6 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y8(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.yc, a, this.xh, f, e, runOn(this, this.y7), b, c);
};
FinancialSeries.prototype.y9 = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y8(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.ya, a, this.xh, f, e, runOn(this, this.y7), b, c);
};
FinancialSeries.prototype.za = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y8(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.yd, a, this.xh, f, e, runOn(this, this.y7), b, c);
};
FinancialSeries.prototype.zb = function (a, b, c) {
var d = this.getEffectiveViewport1(this.cw);
var e = this.y8(this.cw.ca, this.cw.b9, d);
var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xh.df, d);
return this.ja(this.yf, a, this.xh, f, e, runOn(this, this.y7), b, c);
};
FinancialSeries.prototype.wj = function (a, b, c) {
var _this = this;
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.i4), function (d, e) { return _this.kf(d, e, _this.xh, runOn(_this, _this.y7), _this.yb); }, function (d, e) { return _this.kd(d, e, _this.xh, runOn(_this, _this.y7), _this.yb); });
};
FinancialSeries.prototype.wl = function (a, b, c) {
var _this = this;
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.i6), function (d, e) { return _this.kf(d, e, _this.xh, runOn(_this, _this.y7), _this.yc); }, function (d, e) { return _this.kd(d, e, _this.xh, runOn(_this, _this.y7), _this.yc); });
};
FinancialSeries.prototype.aa9 = function (a, b, c) {
var _this = this;
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.za), function (d, e) { return _this.kf(d, e, _this.xh, runOn(_this, _this.y7), _this.yd); }, function (d, e) { return _this.kd(d, e, _this.xh, runOn(_this, _this.y7), _this.yd); });
};
FinancialSeries.prototype.aa8 = function (a, b, c) {
var _this = this;
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.y9), function (d, e) { return _this.kf(d, e, _this.xh, runOn(_this, _this.y7), _this.ya); }, function (d, e) { return _this.kd(d, e, _this.xh, runOn(_this, _this.y7), _this.ya); });
};
FinancialSeries.prototype.aba = function (a, b, c) {
var _this = this;
return this.wp(a, b, c, this.y8(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.x0, this.xh, runOn(this, this.zb), function (d, e) { return _this.kf(d, e, _this.xh, runOn(_this, _this.y7), _this.yf); }, function (d, e) { return _this.kd(d, e, _this.xh, runOn(_this, _this.y7), _this.yf); });
};
FinancialSeries.prototype.qh = function () {
_super.prototype.qh.call(this);
if (this.xh != null) {
this.xh.k3(false);
}
if (this.x0 != null) {
this.x0.k3(false);
}
};
FinancialSeries.prototype.s0 = function (a, b) {
this.xy.cd.e(this.ie);
this.rz(false);
};
FinancialSeries.prototype.sz = function (a, b) {
if (this.g2 && this.ju < 0.05) {
this.g3 = true;
this.g6 = false;
this.gl = false;
}
this.xy.cd.e(this.ie);
this.rz(false);
};
FinancialSeries.prototype.ye = function (a, b, c) {
var d = this.dl(b);
this.ys.addItem(d, b);
this.yt.addItem(b, c);
return d;
};
FinancialSeries.prototype.aag = function (a, b) {
if (b == null) {
return;
}
a.deregisterColumn(b);
var c = this.ys.item(b);
this.yt.removeItem(c);
this.ys.removeItem(b);
};
FinancialSeries.prototype.rh = function (a, b, c, d) {
_super.prototype.rh.call(this, a, b, c, d);
switch (b) {
case "SyncLink":
if (this.c4 != null && this.dc != null) {
this.xy.cd.e(this.ie);
this.rz(false);
}
break;
case "SeriesViewer":
if (c != null && d == null) {
if (this.xh != null) {
this.xh.cq(this);
}
if (this.x0 != null) {
this.x0.cq(this);
}
}
if (c == null && d != null) {
if (this.xh != null) {
this.xh.du(this);
}
if (this.x0 != null) {
this.x0.du(this);
}
}
this.xy.cd.e(this.ie);
this.rz(false);
break;
case "FastItemsSource":
this.yh = true;
if (typeCast(IFastItemsSource_$type, c) != null) {
this.aag(typeCast(IFastItemsSource_$type, c), this.yd);
this.aag(typeCast(IFastItemsSource_$type, c), this.yb);
this.aag(typeCast(IFastItemsSource_$type, c), this.yc);
this.aag(typeCast(IFastItemsSource_$type, c), this.ya);
this.aag(typeCast(IFastItemsSource_$type, c), this.yf);
this.yd = null;
this.yb = null;
this.yc = null;
this.ya = null;
this.yf = null;
}
if (typeCast(IFastItemsSource_$type, d) != null) {
if (stringIsNullOrEmpty(this.z7) == false) {
this.yd = this.ye(typeCast(IFastItemsSource_$type, d), this.z7, "OpenColumn");
}
if (stringIsNullOrEmpty(this.zy) == false) {
this.yb = this.ye(typeCast(IFastItemsSource_$type, d), this.zy, "HighColumn");
}
if (stringIsNullOrEmpty(this.z3) == false) {
this.yc = this.ye(typeCast(IFastItemsSource_$type, d), this.z3, "LowColumn");
}
if (stringIsNullOrEmpty(this.zl) == false) {
this.ya = this.ye(typeCast(IFastItemsSource_$type, d), this.zl, "CloseColumn");
}
if (stringIsNullOrEmpty(this.aab) == false) {
this.yf = this.ye(typeCast(IFastItemsSource_$type, d), this.aab, "VolumeColumn");
}
}
this.yh = false;
if (this.x0 != null && !this.x0.d2()) {
this.xy.cd.e(this.ie);
this.rz(this.gh && c != null);
}
break;
case FinancialSeries.$$p[11]:
if (this.dp != null) {
this.aag(this.dp, this.yd);
this.yd = this.ye(this.dp, this.z7, "OpenColumn");
}
break;
case "OpenColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[1]:
if (this.dp != null) {
this.aag(this.dp, this.yb);
this.yb = this.ye(this.dp, this.zy, "HighColumn");
}
break;
case "HighColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[9]:
if (this.dp != null) {
this.aag(this.dp, this.yc);
this.yc = this.ye(this.dp, this.z3, "LowColumn");
}
break;
case "LowColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[0]:
if (this.dp != null) {
this.aag(this.dp, this.ya);
this.ya = this.ye(this.dp, this.zl, "CloseColumn");
}
break;
case "CloseColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
this.aaq();
break;
case FinancialSeries.$$p[13]:
if (this.dp != null) {
this.aag(this.dp, this.yf);
this.yf = this.ye(this.dp, this.aab, "VolumeColumn");
}
break;
case "VolumeColumn":
if (this.x0 != null && !this.x0.d2() && !this.yh) {
this.xy.cd.e(this.ie);
this.rz(this.gh && this.d9);
}
break;
case FinancialSeries.$$p[14]:
if (c != null) {
c.cq(this);
}
if (d != null) {
d.du(this);
}
this.xy.cd.e(this.ie);
this.rz(false);
this.qs();
this.xz = typeCast(ITimeRangeSelectorAxis_$type, this.xh);
break;
case FinancialSeries.$$p[15]:
if (c != null) {
c.cq(this);
}
if (d != null) {
d.du(this);
}
this.xy.cd.e(this.ie);
if (this.x0 != null) {
this.x0.d2();
}
{
this.rz(false);
}
this.qs();
break;
case "TransitionProgress":
this.xn.c(this.ju, this.xl, this.xj);
if (this.d7(this.cw)) {
return;
}
if (this.ju == 1) {
this.xj.y();
this.aap(this.xj, this.xy);
if (this.g2) {
this.g2 = false;
this.pc();
this.dd.r = truncate(this.jc());
this.dd.b = this.de;
}
if (this.g5) {
this.g5 = false;
this.pc();
this.dd.r = truncate(this.jc());
this.dd.b = this.de;
this.q7();
}
this.qv();
}
else {
this.aap(this.xn, this.xy);
}
if (this.dc != null) {
this.dc.r0(this);
}
break;
case FinancialSeries.$$p[10]:
this.rz(false);
break;
case "IsCustomCategoryStyleAllowed":
this.yi = this.yl();
this.rz(false);
break;
case "CategoryMode":
if (this.xh != null) {
this.xh.pw(true);
}
break;
}
};
FinancialSeries.prototype.yk = function (a) {
if (typeCast(NumericYAxis.$, a) !== null) {
return true;
}
return false;
};
FinancialSeries.prototype.yj = function (a) {
if (typeCast(CategoryXAxis.$, a) !== null || a.dc) {
return true;
}
return false;
};
FinancialSeries.prototype.xa = 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.dm;
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.ze = function (a) {
return a.cd.b;
};
FinancialSeries.prototype.zg = function (a) {
return a.cd.c;
};
FinancialSeries.prototype.w9 = function (a, b) {
return this.xa(a, b, this.x0);
};
FinancialSeries.prototype.get_ff = function () {
return true;
};
FinancialSeries.prototype.o9 = function () {
_super.prototype.o9.call(this);
this.x4 = null;
};
FinancialSeries.prototype.dh = function (a, b, c) {
if (this.ef && this.f0(this.by) && !c) {
var d = this.x3(a, b, this.x4);
this.x4 = d;
return d;
}
else {
var e = this.x2(a, b, this.x4);
this.x4 = e;
return e;
}
};
FinancialSeries.prototype.zi = function (a) {
var b = this.xk();
var c = this.cw.b9;
var d = this.cw.ca;
var e = this.xh;
var f = 0;
if (e.dq) {
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.x3 = function (a, b, c) {
if (this.dp == null) {
return null;
}
var d = this.dp.count;
var e = this.xy.cd.c;
var f = this.xy.cd.d;
var g = this.xy.cd.b;
var h = this.xh;
var i = -1;
var j = -1;
if (h.dm) {
var k = this.xk();
var l = this.zi(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.j7(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.x2 = 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.yl = function () {
return this.yn;
};
FinancialSeries.prototype.it = function (a) {
var b = this.cw.ca;
var c = this.cw.b9;
var d = -1;
if (!b.isEmpty && !c.isEmpty && this.xh != null) {
var e = this.getEffectiveViewport1(this.cw);
var f = new ScalerParams(0, b, c, this.xh.df, e);
var g = this.wu(this.cw);
var h = this.xh.fw(g.left, f);
var i = this.xh.fw(g.right, f);
var j = (a.x - b.left) / b.width;
var k = h + (j * (i - h));
if (this.xh.categoryMode != 0) {
k -= 0.5;
}
d = k;
}
return d;
};
FinancialSeries.prototype.j7 = function (a) {
return truncate(Math.round(this.it(a)));
};
FinancialSeries.prototype.get_ft = function () {
return typeCast(ISortingAxis_$type, this.xh) !== null;
};
FinancialSeries.prototype.a0 = function () {
return this.xh;
};
FinancialSeries.prototype.j9 = 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.xh.df, d);
var g = typeCast(ISortingAxis_$type, this.xh);
var h = this.wu(this.cw);
var i = h.left;
var j = h.right;
var k = this.wi(a).x;
var l = this.xh.fw(k, f);
var m = this.xh.fw(i, f);
var n = this.xh.fw(j, f);
l = Math.max(m, Math.min(n, l));
var o = g.i$f(l);
return o;
};
FinancialSeries.prototype.kr = function (a) {
var b = 0;
if (typeCast(ISortingAxis_$type, this.xh) !== null) {
b = this.j9(a);
if (b == -1) {
return null;
}
}
else {
b = this.j7(a);
}
return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
};
FinancialSeries.prototype.xk = function () {
var a = this.xj;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
a = this.xn;
}
return a;
};
FinancialSeries.prototype.y8 = function (a, b, c) {
if (this.xh == null) {
return 0;
}
return this.xh.ov(a, b, c, this.index);
};
FinancialSeries.prototype.go = function () {
return this.yo;
};
FinancialSeries.prototype.xr = function () {
return 11;
};
FinancialSeries.prototype.c5 = function () {
return 3;
};
FinancialSeries.prototype.c8 = function () {
return 3;
};
FinancialSeries.prototype.aap = function (a, b) {
this.q4();
this.wt = a.ad;
b.a6();
};
FinancialSeries.prototype.aan = 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.xh == null || this.x0 == null || e.cd.b < 1 || this.xh.b0 == null || this.x0.b0 == null || this.x0.pr == this.x0.pq || this.xh.itemsSource == null || this.xh.o5 < 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.zc = 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.x0 != null) {
var f = new ScalerParams(0, c, d, this.x0.df, e);
f.b = this.i0();
b = this.x0.ft(this.x0.p5, f);
}
return b;
};
FinancialSeries.prototype.pc = function () {
_super.prototype.pc.call(this);
this.xl.y();
this.xj.y();
this.xn.y();
};
FinancialSeries.prototype.r0 = function (a) {
var _this = this;
_super.prototype.r0.call(this, a);
this.xy.cd.e(this.ie);
if (this.d7(this.cw)) {
return;
}
if (this.gs) {
if (this.d4()) {
this.aap(this.xn, this.xy);
}
else {
this.aap(this.xj, this.xy);
}
return;
}
if (this.gg(a)) {
var b = this.xl;
if (this.d4()) {
if (this.dd.g) {
this.dd.t();
}
this.xl = this.xn;
this.xn = b;
}
else {
this.xl = this.xj;
this.xj = b;
}
this.aan(this.xj, this.xy);
var c = false;
if (this.g4) {
this.dd.w();
this.dd.r = truncate(this.jd());
this.dd.b = this.df != null ? this.df : this.de;
if (this.g5) {
var d = this.xn;
this.xn = this.xl;
this.xl = d;
c = true;
}
this.xt.x(this, this.xl, this.xj, this.isVertical, this.xh, this.x0, this.xs, this.xr(), this.c6, this.c5(), function () { return _this.zc(_this.xy); }, this.xy.b9);
if (this.g5) {
var e = this.xn;
this.xn = this.xl;
this.xl = e;
}
this.g5 = false;
}
if (this.g7) {
this.dd.w();
this.dd.r = truncate(this.je());
this.dd.b = this.dg != null ? this.dg : this.de;
if (this.g2) {
var f = this.xn;
this.xn = this.xl;
this.xl = f;
c = true;
}
this.xt.x(this, this.xl, this.xj, this.isVertical, this.xh, this.x0, this.xs, this.xr(), this.c6, this.c5(), function () { return _this.zc(_this.xy); }, this.xy.b9);
var g = this.xj;
this.xj = this.xl;
this.xl = g;
if (this.g2) {
var h = this.xn;
this.xn = this.xl;
this.xl = h;
}
this.g2 = false;
}
this.eb = false;
if (!c) {
this.o7();
}
this.sg();
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.aan(this.xj, this.xy);
this.aap(this.xj, this.xy);
}
};
FinancialSeries.prototype.gp = function () {
return true;
};
FinancialSeries.prototype.yq = 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.yb == null) {
return false;
}
break;
case "LowColumn":
if (this.yc == null) {
return false;
}
break;
case "OpenColumn":
if (this.yd == null) {
return false;
}
break;
case "CloseColumn":
if (this.ya == null) {
return false;
}
break;
case "VolumeColumn":
if (this.yf == 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, "yr", {
get: function () {
return this.xh != null && typeCast(ISortingAxis_$type, this.xh) !== null;
},
enumerable: false,
configurable: true
});
FinancialSeries.prototype.ym = function () {
return this.typical != null;
};
FinancialSeries.prototype.aaf = function (a) {
thi