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.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.dn.getHighlightingInfo(this, o, k.z, k.y, false);
k.c = l;
}
if (i && this.dc != null) {
m = this.dc.dp.getHighlightingInfo(this, o, k.z, k.y, false);
if (m == null && this.bo != null) {
m = this.dc.dp.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, false);
}
k.d = m;
}
if (j && this.dc != null) {
n = this.dc.dm.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.q7(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.typic