UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

1,418 lines (1,417 loc) 85.4 kB
/* 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.b6.id; return { p0: a, p1: b, p2: c, p3: d }; }; FinancialBucketCalculator.prototype.e = function (a) { var b = this.a.b2; var c = this.a.b1; var d = this.a.b1; if (this.a.b6 != null) { d = this.a.b6.getEffectiveViewport1(this.a); } if (b.isEmpty || c.isEmpty || this.a.b6.w8 == null) { this.b = 0; return; } var e = (this.a.b6.w8 != null) ? this.a.b6.w8.ch : false; var f = new ScalerParams(0, b, c, e, d); var g = this.a.b6.wl(this.a); var h = typeCast(ISortingAxis_$type, this.a.b6.w8); if (h == null || h.i$b == null) { var i = Math.floor(this.a.b6.w8.eo(g.left, f)); var j = Math.ceil(this.a.b6.w8.eo(g.right, f)); if (this.a.b6.w8.ch) { j = Math.ceil(this.a.b6.w8.eo(g.left, f)); i = Math.floor(this.a.b6.w8.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.xz = null; _this.xx = null; _this.xy = null; _this.xw = null; _this.x0 = null; _this.x9 = false; _this.assigningCategoryStyle = null; _this.xh = null; _this.yj = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0); _this.yk = new Dictionary$2(String_$type, String_$type, 0); _this.x8 = false; _this.xv = null; _this.xc = null; _this.xe = null; _this.xa = null; _this.xk = null; _this.typical = null; _this.typicalBasedOn = null; _this.x7 = false; _this.yw = null; _this.yu = null; _this.yv = null; _this.yt = null; _this.yx = null; _this.xd = null; _this.w9 = null; _this.xf = 0; _this.xq = null; _this.xs = null; _this.xh = new CategorySeriesRenderManager(); _this.x9 = false; _this.xk = new CategoryTransitionSourceFramePreparer(); _this.xd = new CategoryFrame(3); _this.ab = FinancialSeries.$; _this.xg = 0; return _this; } FinancialSeries.prototype.ht = function () { var a = _super.prototype.ht.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.aab)); 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.z9)); 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.aaa)); 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.z8)); 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.aac)); 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.r2)); 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.r2)); 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.r2)); 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.r2)); 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.aab = function (a, b) { if (this.zl != null) { b.value = this.zl; return; } b.value = this.zy; }; FinancialSeries.prototype.z9 = function (a, b) { if (this.zh != null) { b.value = this.zh; return; } b.value = this.zp; }; FinancialSeries.prototype.aaa = function (a, b) { if (this.zj != null) { b.value = this.zj; return; } b.value = this.zu; }; FinancialSeries.prototype.z8 = function (a, b) { if (this.zf != null) { b.value = this.zf; return; } b.value = this.zc; }; FinancialSeries.prototype.aac = function (a, b) { if (this.zn != null) { b.value = this.zn; return; } b.value = this.z2; }; FinancialSeries.prototype.kv = function () { if (this.d4()) { return this.bo.xe; } else { return this.bo.xa; } }; FinancialSeries.prototype.q1 = function (a) { _super.prototype.q1.call(this, a); this.xp = a; }; FinancialSeries.prototype.get_e7 = function () { return true; }; FinancialSeries.prototype.ai = function () { return [this.w8, this.xr]; }; FinancialSeries.prototype.kq = function (a, b) { var c = this.nd(b); if (c == FinancialSeries.$$p[11]) { return this.kr(a, b, this.zy); } if (c == FinancialSeries.$$p[1]) { return this.kr(a, b, this.zp); } if (c == FinancialSeries.$$p[9]) { return this.kr(a, b, this.zu); } if (c == FinancialSeries.$$p[0]) { return this.kr(a, b, this.zc); } if (c == FinancialSeries.$$p[13]) { return this.kr(a, b, this.z2); } if (c == FinancialSeries.$$p[5]) { return this.kr(a, b, this.zl); } if (c == FinancialSeries.$$p[3]) { return this.kr(a, b, this.zh); } if (c == FinancialSeries.$$p[4]) { return this.kr(a, b, this.zj); } if (c == FinancialSeries.$$p[2]) { return this.kr(a, b, this.zf); } if (c == FinancialSeries.$$p[6]) { return this.kr(a, b, this.zn); } return _super.prototype.kq.call(this, a, b); }; FinancialSeries.prototype.md = function (a) { var b = this.nd(a); if (b == FinancialSeries.$$p[11]) { return this.zy; } if (b == FinancialSeries.$$p[1]) { return this.zp; } if (b == FinancialSeries.$$p[9]) { return this.zu; } if (b == FinancialSeries.$$p[0]) { return this.zc; } if (b == FinancialSeries.$$p[13]) { return this.z2; } if (b == FinancialSeries.$$p[5]) { return this.zl; } if (b == FinancialSeries.$$p[3]) { return this.zh; } if (b == FinancialSeries.$$p[4]) { return this.zj; } if (b == FinancialSeries.$$p[2]) { return this.zf; } if (b == FinancialSeries.$$p[6]) { return this.zn; } return _super.prototype.md.call(this, a); }; FinancialSeries.prototype.y8 = function () { return 2; }; FinancialSeries.prototype.y6 = function () { return 4; }; FinancialSeries.prototype.aj = function (a) { var b = this.an(this.w8, this.xa.h, this.y5(this.cw), this.y7(this.cw), this.wj(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.y8(); 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.w8, this.xa.h, this.y5(this.cw), this.y7(this.cw), this.wj(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.vy = function () { return this.aay; }; FinancialSeries.prototype.vz = function () { return this.aay; }; FinancialSeries.prototype.o2 = function () { _super.prototype.o2.call(this); this.w8 = null; this.xr = null; }; FinancialSeries.prototype.get_el = function () { return true; }; FinancialSeries.prototype.get_f5 = function () { return this.xr != null && this.xr.ch; }; 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("OpenColumn", b, this.xz); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialSeries.prototype, "x2", { get: function () { return this.xx; }, set: function (a) { if (this.xx != a) { var b = this.xx; this.xx = a; this.raisePropertyChanged("HighColumn", b, this.xx); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialSeries.prototype, "x3", { get: function () { return this.xy; }, set: function (a) { if (this.xy != a) { var b = this.xy; this.xy = a; this.raisePropertyChanged("LowColumn", b, this.xy); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialSeries.prototype, "x1", { get: function () { return this.xw; }, set: function (a) { if (this.xw != a) { var b = this.xw; this.xw = a; this.raisePropertyChanged("CloseColumn", b, this.xw); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialSeries.prototype, "x6", { get: function () { return this.x0; }, set: function (a) { if (this.x0 != a) { var b = this.x0; this.x0 = a; this.raisePropertyChanged("VolumeColumn", b, this.x0); } }, enumerable: false, configurable: true }); FinancialSeries.prototype.gb = function () { return this.highlightedItemsSource != null || (this.zl != null && this.zh != null && this.zj != null && this.zf != null); }; FinancialSeries.prototype.yg = function () { return (this.assigningCategoryStyle != null && this.x9) || this.by != 1 || this.cq != 1 || this.cp != 1; }; FinancialSeries.prototype.aaf = function (a) { if (this.assigningCategoryStyle != null && this.x9) { this.assigningCategoryStyle(this, a); } }; FinancialSeries.prototype.aad = function (a, b, c, d, e, f, g) { var h = this.by != 1; var i = this.cq != 1; var j = this.cp != 1; this.xh.a3(this.xh.b, d.cn, a, b, c, d, e, f, false, g); this.xh.ab(this.ib); var k = this.xh.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.aaf(k); this.xh.z(this, l, m, n, f, h, i, j, b < 0); }; FinancialSeries.prototype.yy = function (a) { return this.it(a, this.w8); }; FinancialSeries.prototype.ka = function (a, b) { return this.kb(a, b, this.w8, runOn(this, this.yy), new FinancialValueList(this.x4, this.x2, this.x3, this.x1, this.x6)); }; FinancialSeries.prototype.j8 = function (a, b) { return this.j9(a, b, this.w8, runOn(this, this.yy), new FinancialValueList(this.x4, this.x2, this.x3, this.x1, this.x6)); }; FinancialSeries.prototype.ip = function (a, b, c, d, e) { if (c == null) { return Number.POSITIVE_INFINITY; } var f = this.w8.lj; return this.iq(a, b, this.w8, d, e, f, runOn(this, this.yy)); }; FinancialSeries.prototype.getOffsetValue = function () { return this.yz(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)); }; FinancialSeries.prototype.getCategoryWidth = function () { return this.w8.getCategorySize(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)); }; FinancialSeries.prototype.we = function (a, b, c) { return this.wg(a, b, c, this.yz(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)), this.xr, this.w8, null, null, null); }; FinancialSeries.prototype.i5 = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.yz(this.cw.b2, this.cw.b1, d); var f = new ScalerParams(0, this.cw.b2, this.cw.b1, this.w8.ch, d); return this.i7(new FinancialValueList(this.x4, this.x2, this.x3, this.x1, this.x6), a, this.w8, f, e, runOn(this, this.yy), b, c); }; FinancialSeries.prototype.i1 = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.yz(this.cw.b2, this.cw.b1, d); var f = new ScalerParams(0, this.cw.b2, this.cw.b1, this.w8.ch, d); return this.i7(this.x2, a, this.w8, f, e, runOn(this, this.yy), b, c); }; FinancialSeries.prototype.i3 = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.yz(this.cw.b2, this.cw.b1, d); var f = new ScalerParams(0, this.cw.b2, this.cw.b1, this.w8.ch, d); return this.i7(this.x3, a, this.w8, f, e, runOn(this, this.yy), b, c); }; FinancialSeries.prototype.y0 = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.yz(this.cw.b2, this.cw.b1, d); var f = new ScalerParams(0, this.cw.b2, this.cw.b1, this.w8.ch, d); return this.i7(this.x1, a, this.w8, f, e, runOn(this, this.yy), b, c); }; FinancialSeries.prototype.y1 = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.yz(this.cw.b2, this.cw.b1, d); var f = new ScalerParams(0, this.cw.b2, this.cw.b1, this.w8.ch, d); return this.i7(this.x4, a, this.w8, f, e, runOn(this, this.yy), b, c); }; FinancialSeries.prototype.y2 = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.yz(this.cw.b2, this.cw.b1, d); var f = new ScalerParams(0, this.cw.b2, this.cw.b1, this.w8.ch, d); return this.i7(this.x6, a, this.w8, f, e, runOn(this, this.yy), b, c); }; FinancialSeries.prototype.wa = function (a, b, c) { var _this = this; return this.wg(a, b, c, this.yz(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)), this.xr, this.w8, runOn(this, this.i1), function (d, e) { return _this.kb(d, e, _this.w8, runOn(_this, _this.yy), _this.x2); }, function (d, e) { return _this.j9(d, e, _this.w8, runOn(_this, _this.yy), _this.x2); }); }; FinancialSeries.prototype.wc = function (a, b, c) { var _this = this; return this.wg(a, b, c, this.yz(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)), this.xr, this.w8, runOn(this, this.i3), function (d, e) { return _this.kb(d, e, _this.w8, runOn(_this, _this.yy), _this.x3); }, function (d, e) { return _this.j9(d, e, _this.w8, runOn(_this, _this.yy), _this.x3); }); }; FinancialSeries.prototype.aa0 = function (a, b, c) { var _this = this; return this.wg(a, b, c, this.yz(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)), this.xr, this.w8, runOn(this, this.y1), function (d, e) { return _this.kb(d, e, _this.w8, runOn(_this, _this.yy), _this.x4); }, function (d, e) { return _this.j9(d, e, _this.w8, runOn(_this, _this.yy), _this.x4); }); }; FinancialSeries.prototype.aaz = function (a, b, c) { var _this = this; return this.wg(a, b, c, this.yz(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)), this.xr, this.w8, runOn(this, this.y0), function (d, e) { return _this.kb(d, e, _this.w8, runOn(_this, _this.yy), _this.x1); }, function (d, e) { return _this.j9(d, e, _this.w8, runOn(_this, _this.yy), _this.x1); }); }; FinancialSeries.prototype.aa1 = function (a, b, c) { var _this = this; return this.wg(a, b, c, this.yz(this.cw.b2, this.cw.b1, this.getEffectiveViewport1(this.cw)), this.xr, this.w8, runOn(this, this.y2), function (d, e) { return _this.kb(d, e, _this.w8, runOn(_this, _this.yy), _this.x6); }, function (d, e) { return _this.j9(d, e, _this.w8, runOn(_this, _this.yy), _this.x6); }); }; FinancialSeries.prototype.qb = function () { _super.prototype.qb.call(this); if (this.w8 != null) { this.w8.ib(false); } if (this.xr != null) { this.xr.ib(false); } }; FinancialSeries.prototype.st = function (a, b) { this.xp.b4.e(this.id); this.rs(false); }; FinancialSeries.prototype.ss = function (a, b) { if (this.g1 && this.jq < 0.05) { this.g2 = true; this.g5 = false; this.gk = false; } this.xp.b4.e(this.id); this.rs(false); }; FinancialSeries.prototype.x5 = function (a, b, c) { var d = this.dl(b); this.yj.addItem(d, b); this.yk.addItem(b, c); return d; }; FinancialSeries.prototype.z7 = function (a, b) { if (b == null) { return; } a.deregisterColumn(b); var c = this.yj.item(b); this.yk.removeItem(c); this.yj.removeItem(b); }; FinancialSeries.prototype.ra = function (a, b, c, d) { _super.prototype.ra.call(this, a, b, c, d); switch (b) { case "SyncLink": if (this.c4 != null && this.dc != null) { this.xp.b4.e(this.id); this.rs(false); } break; case "SeriesViewer": if (c != null && d == null) { if (this.w8 != null) { this.w8.b0(this); } if (this.xr != null) { this.xr.b0(this); } } if (c == null && d != null) { if (this.w8 != null) { this.w8.ct(this); } if (this.xr != null) { this.xr.ct(this); } } this.xp.b4.e(this.id); this.rs(false); break; case "FastItemsSource": this.x8 = true; if (typeCast(IFastItemsSource_$type, c) != null) { this.z7(typeCast(IFastItemsSource_$type, c), this.x4); this.z7(typeCast(IFastItemsSource_$type, c), this.x2); this.z7(typeCast(IFastItemsSource_$type, c), this.x3); this.z7(typeCast(IFastItemsSource_$type, c), this.x1); this.z7(typeCast(IFastItemsSource_$type, c), this.x6); this.x4 = null; this.x2 = null; this.x3 = null; this.x1 = null; this.x6 = null; } if (typeCast(IFastItemsSource_$type, d) != null) { if (stringIsNullOrEmpty(this.zy) == false) { this.x4 = this.x5(typeCast(IFastItemsSource_$type, d), this.zy, "OpenColumn"); } if (stringIsNullOrEmpty(this.zp) == false) { this.x2 = this.x5(typeCast(IFastItemsSource_$type, d), this.zp, "HighColumn"); } if (stringIsNullOrEmpty(this.zu) == false) { this.x3 = this.x5(typeCast(IFastItemsSource_$type, d), this.zu, "LowColumn"); } if (stringIsNullOrEmpty(this.zc) == false) { this.x1 = this.x5(typeCast(IFastItemsSource_$type, d), this.zc, "CloseColumn"); } if (stringIsNullOrEmpty(this.z2) == false) { this.x6 = this.x5(typeCast(IFastItemsSource_$type, d), this.z2, "VolumeColumn"); } } this.x8 = false; if (this.xr != null && !this.xr.c1()) { this.xp.b4.e(this.id); this.rs(this.gg && c != null); } break; case FinancialSeries.$$p[11]: if (this.dp != null) { this.z7(this.dp, this.x4); this.x4 = this.x5(this.dp, this.zy, "OpenColumn"); } break; case "OpenColumn": if (this.xr != null && !this.xr.c1() && !this.x8) { this.xp.b4.e(this.id); this.rs(this.gg && this.d8); } break; case FinancialSeries.$$p[1]: if (this.dp != null) { this.z7(this.dp, this.x2); this.x2 = this.x5(this.dp, this.zp, "HighColumn"); } break; case "HighColumn": if (this.xr != null && !this.xr.c1() && !this.x8) { this.xp.b4.e(this.id); this.rs(this.gg && this.d8); } break; case FinancialSeries.$$p[9]: if (this.dp != null) { this.z7(this.dp, this.x3); this.x3 = this.x5(this.dp, this.zu, "LowColumn"); } break; case "LowColumn": if (this.xr != null && !this.xr.c1() && !this.x8) { this.xp.b4.e(this.id); this.rs(this.gg && this.d8); } break; case FinancialSeries.$$p[0]: if (this.dp != null) { this.z7(this.dp, this.x1); this.x1 = this.x5(this.dp, this.zc, "CloseColumn"); } break; case "CloseColumn": if (this.xr != null && !this.xr.c1() && !this.x8) { this.xp.b4.e(this.id); this.rs(this.gg && this.d8); } this.aah(); break; case FinancialSeries.$$p[13]: if (this.dp != null) { this.z7(this.dp, this.x6); this.x6 = this.x5(this.dp, this.z2, "VolumeColumn"); } break; case "VolumeColumn": if (this.xr != null && !this.xr.c1() && !this.x8) { this.xp.b4.e(this.id); this.rs(this.gg && this.d8); } break; case FinancialSeries.$$p[14]: if (c != null) { c.b0(this); } if (d != null) { d.ct(this); } this.xp.b4.e(this.id); this.rs(false); this.ql(); this.xq = typeCast(ITimeRangeSelectorAxis_$type, this.w8); break; case FinancialSeries.$$p[15]: if (c != null) { c.b0(this); } if (d != null) { d.ct(this); } this.xp.b4.e(this.id); if (this.xr != null) { this.xr.c1(); } { this.rs(false); } this.ql(); break; case "TransitionProgress": this.xe.c(this.jq, this.xc, this.xa); if (this.d6(this.cw)) { return; } if (this.jq == 1) { this.xa.y(); this.aag(this.xa, this.xp); if (this.g1) { this.g1 = false; this.o6(); this.dd.r = truncate(this.i9()); this.dd.b = this.de; } if (this.g4) { this.g4 = false; this.o6(); this.dd.r = truncate(this.i9()); this.dd.b = this.de; this.q0(); } this.qo(); } else { this.aag(this.xe, this.xp); } if (this.dc != null) { this.dc.qp(this); } break; case FinancialSeries.$$p[10]: this.rs(false); break; case "IsCustomCategoryStyleAllowed": this.x9 = this.yc(); this.rs(false); break; case "CategoryMode": if (this.w8 != null) { this.w8.ma(true); } break; } }; FinancialSeries.prototype.yb = function (a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; }; FinancialSeries.prototype.ya = function (a) { if (typeCast(CategoryXAxis.$, a) !== null || a.ce) { return true; } return false; }; FinancialSeries.prototype.w1 = 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.y5 = function (a) { return a.b4.b; }; FinancialSeries.prototype.y7 = function (a) { return a.b4.c; }; FinancialSeries.prototype.w0 = function (a, b) { return this.w1(a, b, this.xr); }; FinancialSeries.prototype.get_fe = function () { return true; }; FinancialSeries.prototype.o3 = function () { _super.prototype.o3.call(this); this.xv = null; }; FinancialSeries.prototype.dh = function (a, b, c) { if (this.ee && this.fz(this.by) && !c) { var d = this.xu(a, b, this.xv); this.xv = d; return d; } else { var e = this.xt(a, b, this.xv); this.xv = e; return e; } }; FinancialSeries.prototype.y9 = function (a) { var b = this.xb(); var c = this.cw.b1; var d = this.cw.b2; var e = this.w8; 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.xu = function (a, b, c) { if (this.dp == null) { return null; } var d = this.dp.count; var e = this.xp.b4.c; var f = this.xp.b4.d; var g = this.xp.b4.b; var h = this.w8; var i = -1; var j = -1; if (h.cn) { var k = this.xb(); var l = this.y9(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.j3(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.xt = 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.yc = function () { return this.ye; }; FinancialSeries.prototype.ir = function (a) { var b = this.cw.b2; var c = this.cw.b1; var d = -1; if (!b.isEmpty && !c.isEmpty && this.w8 != null) { var e = this.getEffectiveViewport1(this.cw); var f = new ScalerParams(0, b, c, this.w8.ch, e); var g = this.wl(this.cw); var h = this.w8.eo(g.left, f); var i = this.w8.eo(g.right, f); var j = (a.x - b.left) / b.width; var k = h + (j * (i - h)); if (this.w8.categoryMode != 0) { k -= 0.5; } d = k; } return d; }; FinancialSeries.prototype.j3 = function (a) { return truncate(Math.round(this.ir(a))); }; FinancialSeries.prototype.get_fs = function () { return typeCast(ISortingAxis_$type, this.w8) !== null; }; FinancialSeries.prototype.a0 = function () { return this.w8; }; FinancialSeries.prototype.j5 = function (a) { var b = this.cw.b2; var c = this.cw.b1; 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.w8.ch, d); var g = typeCast(ISortingAxis_$type, this.w8); var h = this.wl(this.cw); var i = h.left; var j = h.right; var k = this.v9(a).x; var l = this.w8.eo(k, f); var m = this.w8.eo(i, f); var n = this.w8.eo(j, f); l = Math.max(m, Math.min(n, l)); var o = g.i$f(l); return o; }; FinancialSeries.prototype.kn = function (a) { var b = 0; if (typeCast(ISortingAxis_$type, this.w8) !== null) { b = this.j5(a); if (b == -1) { return null; } } else { b = this.j3(a); } return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; }; FinancialSeries.prototype.xb = function () { var a = this.xa; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.xe; } return a; }; FinancialSeries.prototype.yz = function (a, b, c) { if (this.w8 == null) { return 0; } return this.w8.k9(a, b, c, this.index); }; FinancialSeries.prototype.gn = function () { return this.yf; }; FinancialSeries.prototype.xi = function () { return 11; }; FinancialSeries.prototype.c5 = function () { return 3; }; FinancialSeries.prototype.c8 = function () { return 3; }; FinancialSeries.prototype.aag = function (a, b) { this.qx(); this.wk = a.ad; b.az(); }; FinancialSeries.prototype.aae = function (a, b) { a.x(); }; FinancialSeries.prototype.he = function (a, b, c) { var d = _super.prototype.he.call(this, a, b, c); var e = c; if (this.dp == null || this.dp.count == 0 || !c.p() || b.isEmpty || a.isEmpty || this.w8 == null || this.xr == null || e.b4.b < 1 || this.w8.bi == null || this.xr.bi == null || this.xr.l4 == this.xr.l3 || this.w8.itemsSource == null || this.w8.lj < 1) { e.b4.b = 0; d = false; } return d; }; FinancialSeries.prototype.getViewInfo = function (a, b) { b = this.cw.b2; a = this.cw.b1; return { p0: a, p1: b }; }; FinancialSeries.prototype.y3 = function (a) { var b = 0; var c = a.b2; var d = a.b1; var e = this.getEffectiveViewport1(this.cw); if (!c.isEmpty && !d.isEmpty && this.xr != null) { var f = new ScalerParams(0, c, d, this.xr.ch, e); f.b = this.iy(); b = this.xr.el(this.xr.me, f); } return b; }; FinancialSeries.prototype.o6 = function () { _super.prototype.o6.call(this); this.xc.y(); this.xa.y(); this.xe.y(); }; FinancialSeries.prototype.rt = function (a) { var _this = this; _super.prototype.rt.call(this, a); this.xp.b4.e(this.id); if (this.d6(this.cw)) { return; } if (this.gr) { if (this.d4()) { this.aag(this.xe, this.xp); } else { this.aag(this.xa, this.xp); } return; } if (this.gf(a)) { var b = this.xc; if (this.d4()) { if (this.dd.g) { this.dd.t(); } this.xc = this.xe; this.xe = b; } else { this.xc = this.xa; this.xa = b; } this.aae(this.xa, this.xp); var c = false; if (this.g3) { this.dd.w(); this.dd.r = truncate(this.ja()); this.dd.b = this.df != null ? this.df : this.de; if (this.g4) { var d = this.xe; this.xe = this.xc; this.xc = d; c = true; } this.xk.x(this, this.xc, this.xa, this.isVertical, this.w8, this.xr, this.xj, this.xi(), this.c6, this.c5(), function () { return _this.y3(_this.xp); }, this.xp.b1); if (this.g4) { var e = this.xe; this.xe = this.xc; this.xc = e; } this.g4 = false; } if (this.g6) { this.dd.w(); this.dd.r = truncate(this.jb()); this.dd.b = this.dg != null ? this.dg : this.de; if (this.g1) { var f = this.xe; this.xe = this.xc; this.xc = f; c = true; } this.xk.x(this, this.xc, this.xa, this.isVertical, this.w8, this.xr, this.xj, this.xi(), this.c6, this.c5(), function () { return _this.y3(_this.xp); }, this.xp.b1); var g = this.xa; this.xa = this.xc; this.xc = g; if (this.g1) { var h = this.xe; this.xe = this.xc; this.xc = h; } this.g1 = false; } this.ea = false; if (!c) { this.o1(); } this.r9(); if (this.g3) { this.g2 = false; this.g5 = false; this.gk = false; this.g1 = true; } if (this.g6) { this.g5 = false; this.g4 = true; } } else { this.aae(this.xa, this.xp); this.aag(this.xa, this.xp); } }; FinancialSeries.prototype.go = function () { return true; }; FinancialSeries.prototype.yh = 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.x2 == null) { return false; } break; case "LowColumn": if (this.x3 == null) { return false; } break; case "OpenColumn": if (this.x4 == null) { return false; } break; case "CloseColumn": if (this.x1 == null) { return false; } break; case "VolumeColumn": if (this.x6 == 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, "yi", { get: function () { return this.w8 != null && typeCast(ISortingAxis_$type, this.w8) !== null; }, enumerable: false, configurable: true }); FinancialSeries.prototype.yd = function () { return this.typical != null; }; FinancialSeries.prototype.z6 = function (a) { this.typical(this, a);