UNPKG

igniteui-react-charts

Version:

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

1,417 lines 85.5 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, __read, __spreadArray, __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.il; 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.xs == null) { this.b = 0; return; } var e = (this.a.cf.xs != null) ? this.a.cf.xs.dn : false; var f = new ScalerParams(0, b, c, e, d); var g = this.a.cf.w5(this.a); var h = typeCast(ISortingAxis_$type, this.a.cf.xs); if (h == null || h.i$b == null) { var i = Math.floor(this.a.cf.xs.ga(g.left, f)); var j = Math.ceil(this.a.cf.xs.ga(g.right, f)); if (this.a.cf.xs.dn) { j = Math.ceil(this.a.cf.xs.ga(g.left, f)); i = Math.floor(this.a.cf.xs.ga(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.yj = null; _this.yh = null; _this.yi = null; _this.yg = null; _this.yk = null; _this.yt = false; _this.assigningCategoryStyle = null; _this.x1 = null; _this.y3 = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0); _this.y4 = new Dictionary$2(String_$type, String_$type, 0); _this.ys = false; _this.yf = null; _this.xw = null; _this.xy = null; _this.xu = null; _this.x4 = null; _this.typical = null; _this.typicalBasedOn = null; _this.yr = false; _this.zg = null; _this.ze = null; _this.zf = null; _this.zd = null; _this.zh = null; _this.xx = null; _this.xt = null; _this.xz = 0; _this.ya = null; _this.yc = null; _this.x1 = new CategorySeriesRenderManager(); _this.yt = false; _this.x4 = new CategoryTransitionSourceFramePreparer(); _this.xx = new CategoryFrame(3); _this.ab = FinancialSeries.$; _this.x0 = 0; return _this; } FinancialSeries.prototype.h0 = function () { var a = _super.prototype.h0.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.aav)); 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.aat)); 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.aau)); 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.aas)); 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.aaw)); 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.sj)); 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.sj)); 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.sj)); 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.sj)); 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.aav = function (a, b) { if (this.z5 != null) { b.value = this.z5; return; } b.value = this.aai; }; FinancialSeries.prototype.aat = function (a, b) { if (this.z1 != null) { b.value = this.z1; return; } b.value = this.z9; }; FinancialSeries.prototype.aau = function (a, b) { if (this.z3 != null) { b.value = this.z3; return; } b.value = this.aae; }; FinancialSeries.prototype.aas = function (a, b) { if (this.zz != null) { b.value = this.zz; return; } b.value = this.zw; }; FinancialSeries.prototype.aaw = function (a, b) { if (this.z7 != null) { b.value = this.z7; return; } b.value = this.aam; }; FinancialSeries.prototype.k5 = function () { if (this.d4()) { return this.bo.xy; } else { return this.bo.xu; } }; FinancialSeries.prototype.ri = function (a) { _super.prototype.ri.call(this, a); this.x9 = a; }; FinancialSeries.prototype.get_fa = function () { return true; }; FinancialSeries.prototype.ai = function () { return [this.xs, this.yb]; }; FinancialSeries.prototype.k0 = function (a, b) { var c = this.np(b); if (c == FinancialSeries.$$p[11]) { return this.k1(a, b, this.aai); } if (c == FinancialSeries.$$p[1]) { return this.k1(a, b, this.z9); } if (c == FinancialSeries.$$p[9]) { return this.k1(a, b, this.aae); } if (c == FinancialSeries.$$p[0]) { return this.k1(a, b, this.zw); } if (c == FinancialSeries.$$p[13]) { return this.k1(a, b, this.aam); } if (c == FinancialSeries.$$p[5]) { return this.k1(a, b, this.z5); } if (c == FinancialSeries.$$p[3]) { return this.k1(a, b, this.z1); } if (c == FinancialSeries.$$p[4]) { return this.k1(a, b, this.z3); } if (c == FinancialSeries.$$p[2]) { return this.k1(a, b, this.zz); } if (c == FinancialSeries.$$p[6]) { return this.k1(a, b, this.z7); } return _super.prototype.k0.call(this, a, b); }; FinancialSeries.prototype.mp = function (a) { var b = this.np(a); if (b == FinancialSeries.$$p[11]) { return this.aai; } if (b == FinancialSeries.$$p[1]) { return this.z9; } if (b == FinancialSeries.$$p[9]) { return this.aae; } if (b == FinancialSeries.$$p[0]) { return this.zw; } if (b == FinancialSeries.$$p[13]) { return this.aam; } if (b == FinancialSeries.$$p[5]) { return this.z5; } if (b == FinancialSeries.$$p[3]) { return this.z1; } if (b == FinancialSeries.$$p[4]) { return this.z3; } if (b == FinancialSeries.$$p[2]) { return this.zz; } if (b == FinancialSeries.$$p[6]) { return this.z7; } return _super.prototype.mp.call(this, a); }; FinancialSeries.prototype.zs = function () { return 2; }; FinancialSeries.prototype.zq = function () { return 4; }; FinancialSeries.prototype.aj = function (a) { var b = this.an(this.xs, this.xu.k, this.zp(this.cw), this.zr(this.cw), this.w3(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.zs(); 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.xs, this.xu.k, this.zp(this.cw), this.zr(this.cw), this.w3(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.wh = function () { return this.abi; }; FinancialSeries.prototype.wi = function () { return this.abi; }; FinancialSeries.prototype.pg = function () { _super.prototype.pg.call(this); this.xs = null; this.yb = null; }; FinancialSeries.prototype.get_em = function () { return true; }; FinancialSeries.prototype.get_gc = function () { return this.yb != null && this.yb.dn; }; Object.defineProperty(FinancialSeries.prototype, "yo", { get: function () { return this.yj; }, set: function (a) { if (this.yj != a) { var b = this.yj; this.yj = a; this.raisePropertyChanged("OpenColumn", b, this.yj); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialSeries.prototype, "ym", { get: function () { return this.yh; }, set: function (a) { if (this.yh != a) { var b = this.yh; this.yh = a; this.raisePropertyChanged("HighColumn", b, this.yh); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialSeries.prototype, "yn", { get: function () { return this.yi; }, set: function (a) { if (this.yi != a) { var b = this.yi; this.yi = a; this.raisePropertyChanged("LowColumn", b, this.yi); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialSeries.prototype, "yl", { get: function () { return this.yg; }, set: function (a) { if (this.yg != a) { var b = this.yg; this.yg = a; this.raisePropertyChanged("CloseColumn", b, this.yg); } }, enumerable: false, configurable: true }); Object.defineProperty(FinancialSeries.prototype, "yq", { get: function () { return this.yk; }, set: function (a) { if (this.yk != a) { var b = this.yk; this.yk = a; this.raisePropertyChanged("VolumeColumn", b, this.yk); } }, enumerable: false, configurable: true }); FinancialSeries.prototype.gi = function () { return this.highlightedItemsSource != null || (this.z5 != null && this.z1 != null && this.z3 != null && this.zz != null); }; FinancialSeries.prototype.y0 = function () { return (this.assigningCategoryStyle != null && this.yt) || this.by != 1 || this.cq != 1 || this.cp != 1; }; FinancialSeries.prototype.aaz = function (a) { if (this.assigningCategoryStyle != null && this.yt) { this.assigningCategoryStyle(this, a); } }; FinancialSeries.prototype.aax = function (a, b, c, d, e, f, g) { var h = this.by != 1; var i = this.cq != 1; var j = this.cp != 1; this.x1.a3(this.x1.b, d.dw, a, b, c, d, e, f, false, g); this.x1.ab(this.ij); var k = this.x1.ay; var l = null; var m = null; var n = null; var o = this.dp; if (h && this.dc != null) { l = this.dc.d7.getHighlightingInfo(this, o, k.z, k.y, false); k.c = l; } if (i && this.dc != null) { m = this.dc.d8.getHighlightingInfo(this, o, k.z, k.y, false); if (m == null && this.bo != null) { m = this.dc.d8.getHighlightingInfo(this.bo, this.bo.dp, k.z, k.y, false); } k.d = m; } if (j && this.dc != null) { n = this.dc.d6.getHighlightingInfo(this, o, k.z, k.y, false); k.b = n; } k.h = f; this.aaz(k); this.x1.z(this, l, m, n, f, h, i, j, b < 0); }; FinancialSeries.prototype.zi = function (a) { return this.i1(a, this.xs); }; FinancialSeries.prototype.kk = function (a, b) { return this.kl(a, b, this.xs, runOn(this, this.zi), new FinancialValueList(this.yo, this.ym, this.yn, this.yl, this.yq)); }; FinancialSeries.prototype.ki = function (a, b) { return this.kj(a, b, this.xs, runOn(this, this.zi), new FinancialValueList(this.yo, this.ym, this.yn, this.yl, this.yq)); }; FinancialSeries.prototype.ix = function (a, b, c, d, e) { if (c == null) { return Number.POSITIVE_INFINITY; } var f = this.xs.qc; return this.iy(a, b, this.xs, d, e, f, runOn(this, this.zi)); }; FinancialSeries.prototype.getOffsetValue = function () { return this.zj(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); }; FinancialSeries.prototype.getCategoryWidth = function () { return this.xs.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)); }; FinancialSeries.prototype.wx = function (a, b, c) { return this.wz(a, b, c, this.zj(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yb, this.xs, null, null, null); }; FinancialSeries.prototype.je = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.zj(this.cw.ca, this.cw.b9, d); var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xs.dn, d); return this.jg(new FinancialValueList(this.yo, this.ym, this.yn, this.yl, this.yq), a, this.xs, f, e, runOn(this, this.zi), b, c); }; FinancialSeries.prototype.ja = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.zj(this.cw.ca, this.cw.b9, d); var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xs.dn, d); return this.jg(this.ym, a, this.xs, f, e, runOn(this, this.zi), b, c); }; FinancialSeries.prototype.jc = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.zj(this.cw.ca, this.cw.b9, d); var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xs.dn, d); return this.jg(this.yn, a, this.xs, f, e, runOn(this, this.zi), b, c); }; FinancialSeries.prototype.zk = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.zj(this.cw.ca, this.cw.b9, d); var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xs.dn, d); return this.jg(this.yl, a, this.xs, f, e, runOn(this, this.zi), b, c); }; FinancialSeries.prototype.zl = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.zj(this.cw.ca, this.cw.b9, d); var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xs.dn, d); return this.jg(this.yo, a, this.xs, f, e, runOn(this, this.zi), b, c); }; FinancialSeries.prototype.zm = function (a, b, c) { var d = this.getEffectiveViewport1(this.cw); var e = this.zj(this.cw.ca, this.cw.b9, d); var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xs.dn, d); return this.jg(this.yq, a, this.xs, f, e, runOn(this, this.zi), b, c); }; FinancialSeries.prototype.wt = function (a, b, c) { var _this = this; return this.wz(a, b, c, this.zj(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yb, this.xs, runOn(this, this.ja), function (d, e) { return _this.kl(d, e, _this.xs, runOn(_this, _this.zi), _this.ym); }, function (d, e) { return _this.kj(d, e, _this.xs, runOn(_this, _this.zi), _this.ym); }); }; FinancialSeries.prototype.wv = function (a, b, c) { var _this = this; return this.wz(a, b, c, this.zj(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yb, this.xs, runOn(this, this.jc), function (d, e) { return _this.kl(d, e, _this.xs, runOn(_this, _this.zi), _this.yn); }, function (d, e) { return _this.kj(d, e, _this.xs, runOn(_this, _this.zi), _this.yn); }); }; FinancialSeries.prototype.abk = function (a, b, c) { var _this = this; return this.wz(a, b, c, this.zj(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yb, this.xs, runOn(this, this.zl), function (d, e) { return _this.kl(d, e, _this.xs, runOn(_this, _this.zi), _this.yo); }, function (d, e) { return _this.kj(d, e, _this.xs, runOn(_this, _this.zi), _this.yo); }); }; FinancialSeries.prototype.abj = function (a, b, c) { var _this = this; return this.wz(a, b, c, this.zj(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yb, this.xs, runOn(this, this.zk), function (d, e) { return _this.kl(d, e, _this.xs, runOn(_this, _this.zi), _this.yl); }, function (d, e) { return _this.kj(d, e, _this.xs, runOn(_this, _this.zi), _this.yl); }); }; FinancialSeries.prototype.abl = function (a, b, c) { var _this = this; return this.wz(a, b, c, this.zj(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.yb, this.xs, runOn(this, this.zm), function (d, e) { return _this.kl(d, e, _this.xs, runOn(_this, _this.zi), _this.yq); }, function (d, e) { return _this.kj(d, e, _this.xs, runOn(_this, _this.zi), _this.yq); }); }; FinancialSeries.prototype.qq = function () { _super.prototype.qq.call(this); if (this.xs != null) { this.xs.l0(false); } if (this.yb != null) { this.yb.l0(false); } }; FinancialSeries.prototype.ta = function (a, b) { this.x9.cd.e(this.il); this.r9(false); }; FinancialSeries.prototype.s9 = function (a, b) { if (this.g8 && this.j0 < 0.05) { this.g9 = true; this.hc = false; this.gr = false; } this.x9.cd.e(this.il); this.r9(false); }; FinancialSeries.prototype.yp = function (a, b, c) { var d = this.dl(b); this.y3.addItem(d, b); this.y4.addItem(b, c); return d; }; FinancialSeries.prototype.aar = function (a, b) { if (b == null) { return; } a.deregisterColumn(b); var c = this.y3.item(b); this.y4.removeItem(c); this.y3.removeItem(b); }; FinancialSeries.prototype.rr = function (a, b, c, d) { _super.prototype.rr.call(this, a, b, c, d); switch (b) { case "SyncLink": if (this.c4 != null && this.dc != null) { this.x9.cd.e(this.il); this.r9(false); } break; case "SeriesViewer": if (c != null && d == null) { if (this.xs != null) { this.xs.cx(this); } if (this.yb != null) { this.yb.cx(this); } } if (c == null && d != null) { if (this.xs != null) { this.xs.d4(this); } if (this.yb != null) { this.yb.d4(this); } } this.x9.cd.e(this.il); this.r9(false); break; case "FastItemsSource": this.ys = true; if (typeCast(IFastItemsSource_$type, c) != null) { this.aar(typeCast(IFastItemsSource_$type, c), this.yo); this.aar(typeCast(IFastItemsSource_$type, c), this.ym); this.aar(typeCast(IFastItemsSource_$type, c), this.yn); this.aar(typeCast(IFastItemsSource_$type, c), this.yl); this.aar(typeCast(IFastItemsSource_$type, c), this.yq); this.yo = null; this.ym = null; this.yn = null; this.yl = null; this.yq = null; } if (typeCast(IFastItemsSource_$type, d) != null) { if (stringIsNullOrEmpty(this.aai) == false) { this.yo = this.yp(typeCast(IFastItemsSource_$type, d), this.aai, "OpenColumn"); } if (stringIsNullOrEmpty(this.z9) == false) { this.ym = this.yp(typeCast(IFastItemsSource_$type, d), this.z9, "HighColumn"); } if (stringIsNullOrEmpty(this.aae) == false) { this.yn = this.yp(typeCast(IFastItemsSource_$type, d), this.aae, "LowColumn"); } if (stringIsNullOrEmpty(this.zw) == false) { this.yl = this.yp(typeCast(IFastItemsSource_$type, d), this.zw, "CloseColumn"); } if (stringIsNullOrEmpty(this.aam) == false) { this.yq = this.yp(typeCast(IFastItemsSource_$type, d), this.aam, "VolumeColumn"); } } this.ys = false; if (this.yb != null && !this.yb.ee()) { this.x9.cd.e(this.il); this.r9(this.gn && c != null); } break; case FinancialSeries.$$p[11]: if (this.dp != null) { this.aar(this.dp, this.yo); this.yo = this.yp(this.dp, this.aai, "OpenColumn"); } break; case "OpenColumn": if (this.yb != null && !this.yb.ee() && !this.ys) { this.x9.cd.e(this.il); this.r9(this.gn && this.d9); } break; case FinancialSeries.$$p[1]: if (this.dp != null) { this.aar(this.dp, this.ym); this.ym = this.yp(this.dp, this.z9, "HighColumn"); } break; case "HighColumn": if (this.yb != null && !this.yb.ee() && !this.ys) { this.x9.cd.e(this.il); this.r9(this.gn && this.d9); } break; case FinancialSeries.$$p[9]: if (this.dp != null) { this.aar(this.dp, this.yn); this.yn = this.yp(this.dp, this.aae, "LowColumn"); } break; case "LowColumn": if (this.yb != null && !this.yb.ee() && !this.ys) { this.x9.cd.e(this.il); this.r9(this.gn && this.d9); } break; case FinancialSeries.$$p[0]: if (this.dp != null) { this.aar(this.dp, this.yl); this.yl = this.yp(this.dp, this.zw, "CloseColumn"); } break; case "CloseColumn": if (this.yb != null && !this.yb.ee() && !this.ys) { this.x9.cd.e(this.il); this.r9(this.gn && this.d9); } this.aa1(); break; case FinancialSeries.$$p[13]: if (this.dp != null) { this.aar(this.dp, this.yq); this.yq = this.yp(this.dp, this.aam, "VolumeColumn"); } break; case "VolumeColumn": if (this.yb != null && !this.yb.ee() && !this.ys) { this.x9.cd.e(this.il); this.r9(this.gn && this.d9); } break; case FinancialSeries.$$p[14]: if (c != null) { c.cx(this); } if (d != null) { d.d4(this); } this.x9.cd.e(this.il); this.r9(false); this.q1(); this.ya = typeCast(ITimeRangeSelectorAxis_$type, this.xs); break; case FinancialSeries.$$p[15]: if (c != null) { c.cx(this); } if (d != null) { d.d4(this); } this.x9.cd.e(this.il); if (this.yb != null) { this.yb.ee(); } { this.r9(false); } this.q1(); break; case "TransitionProgress": this.xy.d(this.j0, this.xw, this.xu); if (this.d7(this.cw)) { return; } if (this.j0 == 1) { this.xu.ab(); this.aa0(this.xu, this.x9); if (this.g8) { this.g8 = false; this.pk(); this.dd.r = truncate(this.ji()); this.dd.b = this.de; } if (this.hb) { this.hb = false; this.pk(); this.dd.r = truncate(this.ji()); this.dd.b = this.de; this.rh(); } this.q4(); } else { this.aa0(this.xy, this.x9); } if (this.dc != null) { this.dc.su(this); } break; case FinancialSeries.$$p[10]: this.r9(false); break; case "IsCustomCategoryStyleAllowed": this.yt = this.yw(); this.r9(false); break; case "CategoryMode": if (this.xs != null) { this.xs.q3(true); } break; } }; FinancialSeries.prototype.yv = function (a) { if (typeCast(NumericYAxis.$, a) !== null) { return true; } return false; }; FinancialSeries.prototype.yu = function (a) { if (typeCast(CategoryXAxis.$, a) !== null || a.dj) { return true; } return false; }; FinancialSeries.prototype.xl = 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.dw; 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.zp = function (a) { return a.cd.b; }; FinancialSeries.prototype.zr = function (a) { return a.cd.c; }; FinancialSeries.prototype.xk = function (a, b) { return this.xl(a, b, this.yb); }; FinancialSeries.prototype.get_fh = function () { return true; }; FinancialSeries.prototype.ph = function () { _super.prototype.ph.call(this); this.yf = null; }; FinancialSeries.prototype.dh = function (a, b, c) { if (this.ef && this.f3(this.by) && !c) { var d = this.ye(a, b, this.yf); this.yf = d; return d; } else { var e = this.yd(a, b, this.yf); this.yf = e; return e; } }; FinancialSeries.prototype.zt = function (a) { var b = this.xv(); var c = this.cw.b9; var d = this.cw.ca; var e = this.xs; var f = 0; if (e.dz) { 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.k.count; var j = 0; for (j = 0; j < i; j++) { var k = b.k._inner[j]; var l = null; if (j < i - 1) { l = b.k._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.ye = function (a, b, c) { if (this.dp == null) { return null; } var d = this.dp.count; var e = this.x9.cd.c; var f = this.x9.cd.d; var g = this.x9.cd.b; if (g == 0) { return null; } var h = this.xs; var i = -1; var j = -1; if (h.dw) { var k = this.xv(); var l = this.zt(b); if (k.r != null && l >= 0 && l < k.r.count) { l = truncate(Math.round(k.r._inner[l])); } i = l; j = l; } else { var m = this.kd(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.yd = 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.yw = function () { return this.yy; }; FinancialSeries.prototype.iz = function (a) { var b = this.cw.ca; var c = this.cw.b9; var d = -1; if (!b.isEmpty && !c.isEmpty && this.xs != null) { var e = this.getEffectiveViewport1(this.cw); var f = new ScalerParams(0, b, c, this.xs.dn, e); var g = this.w5(this.cw); var h = this.xs.ga(g.left, f); var i = this.xs.ga(g.right, f); var j = (a.x - b.left) / b.width; var k = h + (j * (i - h)); if (this.xs.categoryMode != 0) { k -= 0.5; } d = k; } return d; }; FinancialSeries.prototype.kd = function (a) { return truncate(Math.round(this.iz(a))); }; FinancialSeries.prototype.get_fw = function () { return typeCast(ISortingAxis_$type, this.xs) !== null; }; FinancialSeries.prototype.a0 = function () { return this.xs; }; FinancialSeries.prototype.kf = 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.xs.dn, d); var g = typeCast(ISortingAxis_$type, this.xs); var h = this.w5(this.cw); var i = h.left; var j = h.right; var k = this.ws(a).x; var l = this.xs.ga(k, f); var m = this.xs.ga(i, f); var n = this.xs.ga(j, f); l = Math.max(m, Math.min(n, l)); var o = g.i$f(l); return o; }; FinancialSeries.prototype.kx = function (a) { var b = 0; if (typeCast(ISortingAxis_$type, this.xs) !== null) { b = this.kf(a); if (b == -1) { return null; } } else { b = this.kd(a); } return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null; }; FinancialSeries.prototype.xv = function () { var a = this.xu; if (this.d4()) { if (this.dd.g) { this.dd.t(); } a = this.xy; } return a; }; FinancialSeries.prototype.zj = function (a, b, c) { if (this.xs == null) { return 0; } return this.xs.p2(a, b, c, this.index); }; FinancialSeries.prototype.gu = function () { return this.yz; }; FinancialSeries.prototype.x2 = function () { return 11; }; FinancialSeries.prototype.c5 = function () { return 3; }; FinancialSeries.prototype.c8 = function () { return 3; }; FinancialSeries.prototype.aa0 = function (a, b) { this.re(); this.w4 = a.ag; b.a6(); }; FinancialSeries.prototype.aay = function (a, b) { a.aa(); }; FinancialSeries.prototype.hl = function (a, b, c) { var d = _super.prototype.hl.call(this, a, b, c); var e = c; if (this.dp == null || this.dp.count == 0 || !c.r() || b.isEmpty || a.isEmpty || this.xs == null || this.yb == null || e.cd.b < 1 || this.xs.b7 == null || this.yb.b7 == null || this.yb.qy == this.yb.qx || this.xs.itemsSource == null || this.xs.qc < 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.zn = 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.yb != null) { var f = new ScalerParams(0, c, d, this.yb.dn, e); f.b = this.i6(); b = this.yb.f7(this.yb.rd, f); } return b; }; FinancialSeries.prototype.pk = function () { _super.prototype.pk.call(this); this.xw.ab(); this.xu.ab(); this.xy.ab(); }; FinancialSeries.prototype.sa = function (a) { var _this = this; _super.prototype.sa.call(this, a); this.x9.cd.e(this.il); if (this.d7(this.cw)) { return; } if (this.gy) { if (this.d4()) { this.aa0(this.xy, this.x9); } else { this.aa0(this.xu, this.x9); } return; } if (this.gm(a)) { var b = this.xw; if (this.d4()) { if (this.dd.g) { this.dd.t(); } this.xw = this.xy; this.xy = b; } else { this.xw = this.xu; this.xu = b; } this.aay(this.xu, this.x9); var c = false; if (this.ha) { this.dd.w(); this.dd.r = truncate(this.jj()); this.dd.b = this.df != null ? this.df : this.de; if (this.hb) { var d = this.xy; this.xy = this.xw; this.xw = d; c = true; } this.x4.x(this, this.xw, this.xu, this.isVertical, this.xs, this.yb, this.x3, this.x2(), this.c6, this.c5(), function () { return _this.zn(_this.x9); }, this.x9.b9); if (this.hb) { var e = this.xy; this.xy = this.xw; this.xw = e; } this.hb = false; } if (this.hd) { this.dd.w(); this.dd.r = truncate(this.jk()); this.dd.b = this.dg != null ? this.dg : this.de; if (this.g8) { var f = this.xy; this.xy = this.xw; this.xw = f; c = true; } this.x4.x(this, this.xw, this.xu, this.isVertical, this.xs, this.yb, this.x3, this.x2(), this.c6, this.c5(), function () { return _this.zn(_this.x9); }, this.x9.b9); var g = this.xu; this.xu = this.xw; this.xw = g; if (this.g8) { var h = this.xy; this.xy = this.xw; this.xw = h; } this.g8 = false; } this.eb = false; if (!c) { this.pf(); } this.sq(); if (this.ha) { this.g9 = false; this.hc = false; this.gr = false; this.g8 = true; } if (this.hd) { this.hc = false; this.hb = true; } } else { this.aay(this.xu, this.x9); this.aa0(this.xu, this.x9); } }; FinancialSeries.prototype.gv = function () { return true; }; FinancialSeries.prototype.y1 = 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.ym == null) { return false; } break; case "LowColumn": if (this.yn == null) { return false; } break; case "OpenColumn": if (this.yo == null) { return false; } break; case "CloseColumn": if (this.yl == null) { return false; } break; case "VolumeColumn": if (this.yq == 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, "y2", { get: function () { return this.xs != null && typeCast(ISortingAxis_$type, this.xs) !== null; }, enumerable: false, configurable: true }); FinancialSeries.prototype.yx = function () { r