UNPKG

igniteui-webcomponents-charts

Version:

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

2,385 lines 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-webcomponents-core";
import { IBucketizer_$type } from "./IBucketizer";
import { ArgumentNullException } from "igniteui-webcomponents-core";
import { IFastItemColumn$1_$type } from "igniteui-webcomponents-core";
import { Series } from "./Series";
import { Rect } from "igniteui-webcomponents-core";
import { ScalerParams } from "./ScalerParams";
import { ISortingAxis_$type } from "./ISortingAxis";
import { SeriesView } from "./SeriesView";
import { truncate, intDivide, isInfinity, isNaN_ } from "igniteui-webcomponents-core";
import { IHasCategoryAxis_$type } from "./IHasCategoryAxis";
import { IHasCategoryModePreference_$type } from "./IHasCategoryModePreference";
import { Brush } from "igniteui-webcomponents-core";
import { DependencyProperty } from "igniteui-webcomponents-core";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { NumericYAxis } from "./NumericYAxis";
import { HighlightingInfo } from "igniteui-webcomponents-core";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { CategoryTransitionSourceFramePreparer } from "./CategoryTransitionSourceFramePreparer";
import { CategoryFrame } from "./CategoryFrame";
import { CategoryMode_$type } from "./CategoryMode";
import { ITimeRangeSelectorAxis_$type } from "./ITimeRangeSelectorAxis";
import { FastReflectionHelper } from "igniteui-webcomponents-core";
import { List$1 } from "igniteui-webcomponents-core";
import { SeriesLayerPropertyOverlay } from "./SeriesLayerPropertyOverlay";
import { Dictionary$2 } from "igniteui-webcomponents-core";
import { CategorySeriesRenderManager } from "./CategorySeriesRenderManager";
import { IFastItemsSource_$type } from "igniteui-webcomponents-core";
import { FinancialValueList } from "./FinancialValueList";
import { CategoryXAxis } from "./CategoryXAxis";
import { SafeSortedReadOnlyDoubleCollection } from "./SafeSortedReadOnlyDoubleCollection";
import { SafeReadOnlyDoubleCollection } from "./SafeReadOnlyDoubleCollection";
import { SafeEnumerable } from "./SafeEnumerable";
import { CalculatedColumn } from "./CalculatedColumn";
import { TrendCalculators } from "igniteui-webcomponents-core";
import { ColumnSupportingCalculation } from "./ColumnSupportingCalculation";
import { IDateTimeAxis_$type } from "./IDateTimeAxis";
import { PropertyMetadata } from "igniteui-webcomponents-core";
import { stringIsNullOrEmpty } from "igniteui-webcomponents-core";
import { dateToStringFormat } from "igniteui-webcomponents-core";
import { SupportingCalculation$1 } from "./SupportingCalculation$1";
import { SRProvider } from "igniteui-webcomponents-core";
import { Color } from "igniteui-webcomponents-core";
/**
 * @hidden
 */
export 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));
/**
 * @hidden
 */
export 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.ik;
        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.xr == null) {
            this.b = 0;
            return;
        }
        var e = (this.a.cf.xr != null) ? this.a.cf.xr.dn : false;
        var f = new ScalerParams(0, b, c, e, d);
        var g = this.a.cf.w4(this.a);
        var h = typeCast(ISortingAxis_$type, this.a.cf.xr);
        if (h == null || h.i$b == null) {
            var i = Math.floor(this.a.cf.xr.f9(g.left, f));
            var j = Math.ceil(this.a.cf.xr.f9(g.right, f));
            if (this.a.cf.xr.dn) {
                j = Math.ceil(this.a.cf.xr.f9(g.left, f));
                i = Math.floor(this.a.cf.xr.f9(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));
/**
 * @hidden
 */
export var FinancialSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialSeries, _super);
    function FinancialSeries() {
        var _this = _super.call(this) || this;
        _this.yi = null;
        _this.yg = null;
        _this.yh = null;
        _this.yf = null;
        _this.yj = null;
        _this.ys = false;
        _this.assigningCategoryStyle = null;
        _this.x0 = null;
        _this.y2 = new Dictionary$2(IFastItemColumn$1_$type.specialize(Number_$type), String_$type, 0);
        _this.y3 = new Dictionary$2(String_$type, String_$type, 0);
        _this.yr = false;
        _this.ye = null;
        _this.xv = null;
        _this.xx = null;
        _this.xt = null;
        _this.x3 = null;
        _this.typical = null;
        _this.typicalBasedOn = null;
        _this.yq = false;
        _this.zf = null;
        _this.zd = null;
        _this.ze = null;
        _this.zc = null;
        _this.zg = null;
        _this.xw = null;
        _this.xs = null;
        _this.xy = 0;
        _this.x9 = null;
        _this.yb = null;
        _this.x0 = new CategorySeriesRenderManager();
        _this.ys = false;
        _this.x3 = new CategoryTransitionSourceFramePreparer();
        _this.xw = new CategoryFrame(3);
        _this.ab = FinancialSeries.$;
        _this.xz = 0;
        return _this;
    }
    FinancialSeries.prototype.hz = function () {
        var a = _super.prototype.hz.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.aau));
            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.aas));
            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.aat));
            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.aar));
            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.aav));
            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.si));
            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.si));
            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.si));
            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.si));
            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.aau = function (a, b) {
        if (this.z4 != null) {
            b.value = this.z4;
            return;
        }
        b.value = this.aah;
    };
    FinancialSeries.prototype.aas = function (a, b) {
        if (this.z0 != null) {
            b.value = this.z0;
            return;
        }
        b.value = this.z8;
    };
    FinancialSeries.prototype.aat = function (a, b) {
        if (this.z2 != null) {
            b.value = this.z2;
            return;
        }
        b.value = this.aad;
    };
    FinancialSeries.prototype.aar = function (a, b) {
        if (this.zy != null) {
            b.value = this.zy;
            return;
        }
        b.value = this.zv;
    };
    FinancialSeries.prototype.aav = function (a, b) {
        if (this.z6 != null) {
            b.value = this.z6;
            return;
        }
        b.value = this.aal;
    };
    FinancialSeries.prototype.k4 = function () {
        if (this.d4()) {
            return this.bo.xx;
        }
        else {
            return this.bo.xt;
        }
    };
    FinancialSeries.prototype.rh = function (a) {
        _super.prototype.rh.call(this, a);
        this.x8 = a;
    };
    FinancialSeries.prototype.get_fa = function () {
        return true;
    };
    FinancialSeries.prototype.ai = function () {
        return [this.xr, this.ya];
    };
    FinancialSeries.prototype.kz = function (a, b) {
        var c = this.no(b);
        if (c == FinancialSeries.$$p[11]) {
            return this.k0(a, b, this.aah);
        }
        if (c == FinancialSeries.$$p[1]) {
            return this.k0(a, b, this.z8);
        }
        if (c == FinancialSeries.$$p[9]) {
            return this.k0(a, b, this.aad);
        }
        if (c == FinancialSeries.$$p[0]) {
            return this.k0(a, b, this.zv);
        }
        if (c == FinancialSeries.$$p[13]) {
            return this.k0(a, b, this.aal);
        }
        if (c == FinancialSeries.$$p[5]) {
            return this.k0(a, b, this.z4);
        }
        if (c == FinancialSeries.$$p[3]) {
            return this.k0(a, b, this.z0);
        }
        if (c == FinancialSeries.$$p[4]) {
            return this.k0(a, b, this.z2);
        }
        if (c == FinancialSeries.$$p[2]) {
            return this.k0(a, b, this.zy);
        }
        if (c == FinancialSeries.$$p[6]) {
            return this.k0(a, b, this.z6);
        }
        return _super.prototype.kz.call(this, a, b);
    };
    FinancialSeries.prototype.mo = function (a) {
        var b = this.no(a);
        if (b == FinancialSeries.$$p[11]) {
            return this.aah;
        }
        if (b == FinancialSeries.$$p[1]) {
            return this.z8;
        }
        if (b == FinancialSeries.$$p[9]) {
            return this.aad;
        }
        if (b == FinancialSeries.$$p[0]) {
            return this.zv;
        }
        if (b == FinancialSeries.$$p[13]) {
            return this.aal;
        }
        if (b == FinancialSeries.$$p[5]) {
            return this.z4;
        }
        if (b == FinancialSeries.$$p[3]) {
            return this.z0;
        }
        if (b == FinancialSeries.$$p[4]) {
            return this.z2;
        }
        if (b == FinancialSeries.$$p[2]) {
            return this.zy;
        }
        if (b == FinancialSeries.$$p[6]) {
            return this.z6;
        }
        return _super.prototype.mo.call(this, a);
    };
    FinancialSeries.prototype.zr = function () {
        return 2;
    };
    FinancialSeries.prototype.zp = function () {
        return 4;
    };
    FinancialSeries.prototype.aj = function (a) {
        var b = this.an(this.xr, this.xt.k, this.zo(this.cw), this.zq(this.cw), this.w2(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.zr();
        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.xr, this.xt.k, this.zo(this.cw), this.zq(this.cw), this.w2(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.wg = function () {
        return this.abh;
    };
    FinancialSeries.prototype.wh = function () {
        return this.abh;
    };
    FinancialSeries.prototype.pf = function () {
        _super.prototype.pf.call(this);
        this.xr = null;
        this.ya = null;
    };
    FinancialSeries.prototype.get_em = function () {
        return true;
    };
    FinancialSeries.prototype.get_gb = function () {
        return this.ya != null && this.ya.dn;
    };
    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("OpenColumn", 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("HighColumn", b, this.yg);
            }
        },
        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("LowColumn", b, this.yh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "yk", {
        get: function () {
            return this.yf;
        },
        set: function (a) {
            if (this.yf != a) {
                var b = this.yf;
                this.yf = a;
                this.raisePropertyChanged("CloseColumn", b, this.yf);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialSeries.prototype, "yp", {
        get: function () {
            return this.yj;
        },
        set: function (a) {
            if (this.yj != a) {
                var b = this.yj;
                this.yj = a;
                this.raisePropertyChanged("VolumeColumn", b, this.yj);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.gh = function () {
        return this.highlightedItemsSource != null || (this.z4 != null && this.z0 != null && this.z2 != null && this.zy != null);
    };
    FinancialSeries.prototype.yz = function () {
        return (this.assigningCategoryStyle != null && this.ys) || this.by != 1 || this.cq != 1 || this.cp != 1;
    };
    FinancialSeries.prototype.aay = function (a) {
        if (this.assigningCategoryStyle != null && this.ys) {
            this.assigningCategoryStyle(this, a);
        }
    };
    FinancialSeries.prototype.aaw = function (a, b, c, d, e, f, g) {
        var h = this.by != 1;
        var i = this.cq != 1;
        var j = this.cp != 1;
        this.x0.a3(this.x0.b, d.dv, a, b, c, d, e, f, false, g);
        this.x0.ab(this.ii);
        var k = this.x0.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.aay(k);
        this.x0.z(this, l, m, n, f, h, i, j, b < 0);
    };
    FinancialSeries.prototype.zh = function (a) {
        return this.i0(a, this.xr);
    };
    FinancialSeries.prototype.kj = function (a, b) {
        return this.kk(a, b, this.xr, runOn(this, this.zh), new FinancialValueList(this.yn, this.yl, this.ym, this.yk, this.yp));
    };
    FinancialSeries.prototype.kh = function (a, b) {
        return this.ki(a, b, this.xr, runOn(this, this.zh), new FinancialValueList(this.yn, this.yl, this.ym, this.yk, this.yp));
    };
    FinancialSeries.prototype.iw = function (a, b, c, d, e) {
        if (c == null) {
            return Number.POSITIVE_INFINITY;
        }
        var f = this.xr.qa;
        return this.ix(a, b, this.xr, d, e, f, runOn(this, this.zh));
    };
    FinancialSeries.prototype.getOffsetValue = function () {
        return this.zi(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
    };
    FinancialSeries.prototype.getCategoryWidth = function () {
        return this.xr.getCategorySize(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw));
    };
    FinancialSeries.prototype.ww = function (a, b, c) {
        return this.wy(a, b, c, this.zi(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ya, this.xr, null, null, null);
    };
    FinancialSeries.prototype.jd = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cw);
        var e = this.zi(this.cw.ca, this.cw.b9, d);
        var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xr.dn, d);
        return this.jf(new FinancialValueList(this.yn, this.yl, this.ym, this.yk, this.yp), a, this.xr, f, e, runOn(this, this.zh), b, c);
    };
    FinancialSeries.prototype.i9 = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cw);
        var e = this.zi(this.cw.ca, this.cw.b9, d);
        var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xr.dn, d);
        return this.jf(this.yl, a, this.xr, f, e, runOn(this, this.zh), b, c);
    };
    FinancialSeries.prototype.jb = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cw);
        var e = this.zi(this.cw.ca, this.cw.b9, d);
        var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xr.dn, d);
        return this.jf(this.ym, a, this.xr, f, e, runOn(this, this.zh), b, c);
    };
    FinancialSeries.prototype.zj = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cw);
        var e = this.zi(this.cw.ca, this.cw.b9, d);
        var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xr.dn, d);
        return this.jf(this.yk, a, this.xr, f, e, runOn(this, this.zh), b, c);
    };
    FinancialSeries.prototype.zk = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cw);
        var e = this.zi(this.cw.ca, this.cw.b9, d);
        var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xr.dn, d);
        return this.jf(this.yn, a, this.xr, f, e, runOn(this, this.zh), b, c);
    };
    FinancialSeries.prototype.zl = function (a, b, c) {
        var d = this.getEffectiveViewport1(this.cw);
        var e = this.zi(this.cw.ca, this.cw.b9, d);
        var f = new ScalerParams(0, this.cw.ca, this.cw.b9, this.xr.dn, d);
        return this.jf(this.yp, a, this.xr, f, e, runOn(this, this.zh), b, c);
    };
    FinancialSeries.prototype.ws = function (a, b, c) {
        var _this = this;
        return this.wy(a, b, c, this.zi(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ya, this.xr, runOn(this, this.i9), function (d, e) { return _this.kk(d, e, _this.xr, runOn(_this, _this.zh), _this.yl); }, function (d, e) { return _this.ki(d, e, _this.xr, runOn(_this, _this.zh), _this.yl); });
    };
    FinancialSeries.prototype.wu = function (a, b, c) {
        var _this = this;
        return this.wy(a, b, c, this.zi(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ya, this.xr, runOn(this, this.jb), function (d, e) { return _this.kk(d, e, _this.xr, runOn(_this, _this.zh), _this.ym); }, function (d, e) { return _this.ki(d, e, _this.xr, runOn(_this, _this.zh), _this.ym); });
    };
    FinancialSeries.prototype.abj = function (a, b, c) {
        var _this = this;
        return this.wy(a, b, c, this.zi(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ya, this.xr, runOn(this, this.zk), function (d, e) { return _this.kk(d, e, _this.xr, runOn(_this, _this.zh), _this.yn); }, function (d, e) { return _this.ki(d, e, _this.xr, runOn(_this, _this.zh), _this.yn); });
    };
    FinancialSeries.prototype.abi = function (a, b, c) {
        var _this = this;
        return this.wy(a, b, c, this.zi(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ya, this.xr, runOn(this, this.zj), function (d, e) { return _this.kk(d, e, _this.xr, runOn(_this, _this.zh), _this.yk); }, function (d, e) { return _this.ki(d, e, _this.xr, runOn(_this, _this.zh), _this.yk); });
    };
    FinancialSeries.prototype.abk = function (a, b, c) {
        var _this = this;
        return this.wy(a, b, c, this.zi(this.cw.ca, this.cw.b9, this.getEffectiveViewport1(this.cw)), this.ya, this.xr, runOn(this, this.zl), function (d, e) { return _this.kk(d, e, _this.xr, runOn(_this, _this.zh), _this.yp); }, function (d, e) { return _this.ki(d, e, _this.xr, runOn(_this, _this.zh), _this.yp); });
    };
    FinancialSeries.prototype.qp = function () {
        _super.prototype.qp.call(this);
        if (this.xr != null) {
            this.xr.ly(false);
        }
        if (this.ya != null) {
            this.ya.ly(false);
        }
    };
    FinancialSeries.prototype.s9 = function (a, b) {
        this.x8.cd.e(this.ik);
        this.r8(false);
    };
    FinancialSeries.prototype.s8 = function (a, b) {
        if (this.g7 && this.jz < 0.05) {
            this.g8 = true;
            this.hb = false;
            this.gq = false;
        }
        this.x8.cd.e(this.ik);
        this.r8(false);
    };
    FinancialSeries.prototype.yo = function (a, b, c) {
        var d = this.dl(b);
        this.y2.addItem(d, b);
        this.y3.addItem(b, c);
        return d;
    };
    FinancialSeries.prototype.aaq = function (a, b) {
        if (b == null) {
            return;
        }
        a.deregisterColumn(b);
        var c = this.y2.item(b);
        this.y3.removeItem(c);
        this.y2.removeItem(b);
    };
    FinancialSeries.prototype.rq = function (a, b, c, d) {
        _super.prototype.rq.call(this, a, b, c, d);
        switch (b) {
            case "SyncLink":
                if (this.c4 != null && this.dc != null) {
                    this.x8.cd.e(this.ik);
                    this.r8(false);
                }
                break;
            case "SeriesViewer":
                if (c != null && d == null) {
                    if (this.xr != null) {
                        this.xr.cx(this);
                    }
                    if (this.ya != null) {
                        this.ya.cx(this);
                    }
                }
                if (c == null && d != null) {
                    if (this.xr != null) {
                        this.xr.d3(this);
                    }
                    if (this.ya != null) {
                        this.ya.d3(this);
                    }
                }
                this.x8.cd.e(this.ik);
                this.r8(false);
                break;
            case "FastItemsSource":
                this.yr = true;
                if (typeCast(IFastItemsSource_$type, c) != null) {
                    this.aaq(typeCast(IFastItemsSource_$type, c), this.yn);
                    this.aaq(typeCast(IFastItemsSource_$type, c), this.yl);
                    this.aaq(typeCast(IFastItemsSource_$type, c), this.ym);
                    this.aaq(typeCast(IFastItemsSource_$type, c), this.yk);
                    this.aaq(typeCast(IFastItemsSource_$type, c), this.yp);
                    this.yn = null;
                    this.yl = null;
                    this.ym = null;
                    this.yk = null;
                    this.yp = null;
                }
                if (typeCast(IFastItemsSource_$type, d) != null) {
                    if (stringIsNullOrEmpty(this.aah) == false) {
                        this.yn = this.yo(typeCast(IFastItemsSource_$type, d), this.aah, "OpenColumn");
                    }
                    if (stringIsNullOrEmpty(this.z8) == false) {
                        this.yl = this.yo(typeCast(IFastItemsSource_$type, d), this.z8, "HighColumn");
                    }
                    if (stringIsNullOrEmpty(this.aad) == false) {
                        this.ym = this.yo(typeCast(IFastItemsSource_$type, d), this.aad, "LowColumn");
                    }
                    if (stringIsNullOrEmpty(this.zv) == false) {
                        this.yk = this.yo(typeCast(IFastItemsSource_$type, d), this.zv, "CloseColumn");
                    }
                    if (stringIsNullOrEmpty(this.aal) == false) {
                        this.yp = this.yo(typeCast(IFastItemsSource_$type, d), this.aal, "VolumeColumn");
                    }
                }
                this.yr = false;
                if (this.ya != null && !this.ya.ed()) {
                    this.x8.cd.e(this.ik);
                    this.r8(this.gm && c != null);
                }
                break;
            case FinancialSeries.$$p[11]:
                if (this.dp != null) {
                    this.aaq(this.dp, this.yn);
                    this.yn = this.yo(this.dp, this.aah, "OpenColumn");
                }
                break;
            case "OpenColumn":
                if (this.ya != null && !this.ya.ed() && !this.yr) {
                    this.x8.cd.e(this.ik);
                    this.r8(this.gm && this.d9);
                }
                break;
            case FinancialSeries.$$p[1]:
                if (this.dp != null) {
                    this.aaq(this.dp, this.yl);
                    this.yl = this.yo(this.dp, this.z8, "HighColumn");
                }
                break;
            case "HighColumn":
                if (this.ya != null && !this.ya.ed() && !this.yr) {
                    this.x8.cd.e(this.ik);
                    this.r8(this.gm && this.d9);
                }
                break;
            case FinancialSeries.$$p[9]:
                if (this.dp != null) {
                    this.aaq(this.dp, this.ym);
                    this.ym = this.yo(this.dp, this.aad, "LowColumn");
                }
                break;
            case "LowColumn":
                if (this.ya != null && !this.ya.ed() && !this.yr) {
                    this.x8.cd.e(this.ik);
                    this.r8(this.gm && this.d9);
                }
                break;
            case FinancialSeries.$$p[0]:
                if (this.dp != null) {
                    this.aaq(this.dp, this.yk);
                    this.yk = this.yo(this.dp, this.zv, "CloseColumn");
                }
                break;
            case "CloseColumn":
                if (this.ya != null && !this.ya.ed() && !this.yr) {
                    this.x8.cd.e(this.ik);
                    this.r8(this.gm && this.d9);
                }
                this.aa0();
                break;
            case FinancialSeries.$$p[13]:
                if (this.dp != null) {
                    this.aaq(this.dp, this.yp);
                    this.yp = this.yo(this.dp, this.aal, "VolumeColumn");
                }
                break;
            case "VolumeColumn":
                if (this.ya != null && !this.ya.ed() && !this.yr) {
                    this.x8.cd.e(this.ik);
                    this.r8(this.gm && this.d9);
                }
                break;
            case FinancialSeries.$$p[14]:
                if (c != null) {
                    c.cx(this);
                }
                if (d != null) {
                    d.d3(this);
                }
                this.x8.cd.e(this.ik);
                this.r8(false);
                this.q0();
                this.x9 = typeCast(ITimeRangeSelectorAxis_$type, this.xr);
                break;
            case FinancialSeries.$$p[15]:
                if (c != null) {
                    c.cx(this);
                }
                if (d != null) {
                    d.d3(this);
                }
                this.x8.cd.e(this.ik);
                if (this.ya != null) {
                    this.ya.ed();
                }
                {
                    this.r8(false);
                }
                this.q0();
                break;
            case "TransitionProgress":
                this.xx.d(this.jz, this.xv, this.xt);
                if (this.d7(this.cw)) {
                    return;
                }
                if (this.jz == 1) {
                    this.xt.ab();
                    this.aaz(this.xt, this.x8);
                    if (this.g7) {
                        this.g7 = false;
                        this.pj();
                        this.dd.r = truncate(this.jh());
                        this.dd.b = this.de;
                    }
                    if (this.ha) {
                        this.ha = false;
                        this.pj();
                        this.dd.r = truncate(this.jh());
                        this.dd.b = this.de;
                        this.rg();
                    }
                    this.q3();
                }
                else {
                    this.aaz(this.xx, this.x8);
                }
                if (this.dc != null) {
                    this.dc.st(this);
                }
                break;
            case FinancialSeries.$$p[10]:
                this.r8(false);
                break;
            case "IsCustomCategoryStyleAllowed":
                this.ys = this.yv();
                this.r8(false);
                break;
            case "CategoryMode":
                if (this.xr != null) {
                    this.xr.q1(true);
                }
                break;
        }
    };
    FinancialSeries.prototype.yu = function (a) {
        if (typeCast(NumericYAxis.$, a) !== null) {
            return true;
        }
        return false;
    };
    FinancialSeries.prototype.yt = function (a) {
        if (typeCast(CategoryXAxis.$, a) !== null || a.dj) {
            return true;
        }
        return false;
    };
    FinancialSeries.prototype.xk = 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.dv;
        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.zo = function (a) {
        return a.cd.b;
    };
    FinancialSeries.prototype.zq = function (a) {
        return a.cd.c;
    };
    FinancialSeries.prototype.xj = function (a, b) {
        return this.xk(a, b, this.ya);
    };
    FinancialSeries.prototype.get_fh = function () {
        return true;
    };
    FinancialSeries.prototype.pg = function () {
        _super.prototype.pg.call(this);
        this.ye = null;
    };
    FinancialSeries.prototype.dh = function (a, b, c) {
        if (this.ef && this.f2(this.by) && !c) {
            var d = this.yd(a, b, this.ye);
            this.ye = d;
            return d;
        }
        else {
            var e = this.yc(a, b, this.ye);
            this.ye = e;
            return e;
        }
    };
    FinancialSeries.prototype.zs = function (a) {
        var b = this.xu();
        var c = this.cw.b9;
        var d = this.cw.ca;
        var e = this.xr;
        var f = 0;
        if (e.dy) {
            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.yd = function (a, b, c) {
        if (this.dp == null) {
            return null;
        }
        var d = this.dp.count;
        var e = this.x8.cd.c;
        var f = this.x8.cd.d;
        var g = this.x8.cd.b;
        var h = this.xr;
        var i = -1;
        var j = -1;
        if (h.dv) {
            var k = this.xu();
            var l = this.zs(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.kc(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.yc = 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.yv = function () {
        return this.yx;
    };
    FinancialSeries.prototype.iy = function (a) {
        var b = this.cw.ca;
        var c = this.cw.b9;
        var d = -1;
        if (!b.isEmpty && !c.isEmpty && this.xr != null) {
            var e = this.getEffectiveViewport1(this.cw);
            var f = new ScalerParams(0, b, c, this.xr.dn, e);
            var g = this.w4(this.cw);
            var h = this.xr.f9(g.left, f);
            var i = this.xr.f9(g.right, f);
            var j = (a.x - b.left) / b.width;
            var k = h + (j * (i - h));
            if (this.xr.categoryMode != 0) {
                k -= 0.5;
            }
            d = k;
        }
        return d;
    };
    FinancialSeries.prototype.kc = function (a) {
        return truncate(Math.round(this.iy(a)));
    };
    FinancialSeries.prototype.get_fv = function () {
        return typeCast(ISortingAxis_$type, this.xr) !== null;
    };
    FinancialSeries.prototype.a0 = function () {
        return this.xr;
    };
    FinancialSeries.prototype.ke = 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.xr.dn, d);
        var g = typeCast(ISortingAxis_$type, this.xr);
        var h = this.w4(this.cw);
        var i = h.left;
        var j = h.right;
        var k = this.wr(a).x;
        var l = this.xr.f9(k, f);
        var m = this.xr.f9(i, f);
        var n = this.xr.f9(j, f);
        l = Math.max(m, Math.min(n, l));
        var o = g.i$f(l);
        return o;
    };
    FinancialSeries.prototype.kw = function (a) {
        var b = 0;
        if (typeCast(ISortingAxis_$type, this.xr) !== null) {
            b = this.ke(a);
            if (b == -1) {
                return null;
            }
        }
        else {
            b = this.kc(a);
        }
        return b >= 0 && this.dp != null && b < this.dp.count ? this.dp.item(b) : null;
    };
    FinancialSeries.prototype.xu = function () {
        var a = this.xt;
        if (this.d4()) {
            if (this.dd.g) {
                this.dd.t();
            }
            a = this.xx;
        }
        return a;
    };
    FinancialSeries.prototype.zi = function (a, b, c) {
        if (this.xr == null) {
            return 0;
        }
        return this.xr.p0(a, b, c, this.index);
    };
    FinancialSeries.prototype.gt = function () {
        return this.yy;
    };
    FinancialSeries.prototype.x1 = function () {
        return 11;
    };
    FinancialSeries.prototype.c5 = function () {
        return 3;
    };
    FinancialSeries.prototype.c8 = function () {
        return 3;
    };
    FinancialSeries.prototype.aaz = function (a, b) {
        this.rd();
        this.w3 = a.ag;
        b.a6();
    };
    FinancialSeries.prototype.aax = function (a, b) {
        a.aa();
    };
    FinancialSeries.prototype.hk = function (a, b, c) {
        var d = _super.prototype.hk.call(this, a, b, c);
        var e = c;
        if (this.dp == null || this.dp.count == 0 || !c.r() || b.isEmpty || a.isEmpty || this.xr == null || this.ya == null || e.cd.b < 1 || this.xr.b7 == null || this.ya.b7 == null || this.ya.qw == this.ya.qv || this.xr.itemsSource == null || this.xr.qa < 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.zm = 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.ya != null) {
            var f = new ScalerParams(0, c, d, this.ya.dn, e);
            f.b = this.i5();
            b = this.ya.f6(this.ya.rb, f);
        }
        return b;
    };
    FinancialSeries.prototype.pj = function () {
        _super.prototype.pj.call(this);
        this.xv.ab();
        this.xt.ab();
        this.xx.ab();
    };
    FinancialSeries.prototype.r9 = function (a) {
        var _this = this;
        _super.prototype.r9.call(this, a);
        this.x8.cd.e(this.ik);
        if (this.d7(this.cw)) {
            return;
        }
        if (this.gx) {
            if (this.d4()) {
                this.aaz(this.xx, this.x8);
            }
            else {
                this.aaz(this.xt, this.x8);
            }
            return;
        }
        if (this.gl(a)) {
            var b = this.xv;
            if (this.d4()) {
                if (this.dd.g) {
                    this.dd.t();
                }
                this.xv = this.xx;
                this.xx = b;
            }
            else {
                this.xv = this.xt;
                this.xt = b;
            }
            this.aax(this.xt, this.x8);
            var c = false;
            if (this.g9) {
                this.dd.w();
                this.dd.r = truncate(this.ji());
                this.dd.b = this.df != null ? this.df : this.de;
                if (this.ha) {
                    var d = this.xx;
                    this.xx = this.xv;
                    this.xv = d;
                    c = true;
                }
                this.x3.x(this, this.xv, this.xt, this.isVertical, this.xr, this.ya, this.x2, this.x1(), this.c6, this.c5(), function () { return _this.zm(_this.x8); }, this.x8.b9);
                if (this.ha) {
                    var e = this.xx;
                    this.xx = this.xv;
                    this.xv = e;
                }
                this.ha = false;
            }
            if (this.hc) {
                this.dd.w();
                this.dd.r = truncate(this.jj());
                this.dd.b = this.dg != null ? this.dg : this.de;
                if (this.g7) {
                    var f = this.xx;
                    this.xx = this.xv;
                    this.xv = f;
                    c = true;
                }
                this.x3.x(this, this.xv, this.xt, this.isVertical, this.xr, this.ya, this.x2, this.x1(), this.c6, this.c5(), function () { return _this.zm(_this.x8); }, this.x8.b9);
                var g = this.xt;
                this.xt = this.xv;
                this.xv = g;
                if (this.g7) {
                    var h = this.xx;
                    this.xx = this.xv;
                    this.xv = h;
                }
                this.g7 = false;
            }
            this.eb = false;
            if (!c) {
                this.pe();
            }
            this.sp();
            if (this.g9) {
                this.g8 = false;
                this.hb = false;
                this.gq = false;
                this.g7 = true;
            }
            if (this.hc) {
                this.hb = false;
                this.ha = true;
            }
        }
        else {
            this.aax(this.xt, this.x8);
            this.aaz(this.xt, this.x8);
        }
    };
    FinancialSeries.prototype.gu = function () {
        return true;
    };
    FinancialSeries.prototype.y0 = 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.yl == null) {
                            return false;
                        }
                        break;
                    case "LowColumn":
                        if (this.ym == null) {
                            return false;
                        }
                        break;
                    case "OpenColumn":
                        if (this.yn == null) {
                            return false;
                        }
                        break;
                    case "CloseColumn":
                        if (this.yk == null) {
                            return false;
                        }
                        break;
                    case "VolumeColumn":
                        if (this.yp == 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, "y1", {
        get: function () {
            return this.xr != null && typeCast(ISortingAxis_$type, this.xr) !== null;
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.yw = function () {
        return this.typical != null;
    };
    FinancialSeries.prototype.aap = function (a) {
        this.typical(this, a);
    };
    Object.defineProperty(FinancialSeries.prototype, "y9", {
        get: function () {
            return this.y6();
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype._y6 = function () {
        var a, b, _a, _b, c, e_2_1, d, e, f, g, h;
        var e_2, _c;
        return __generator(this, function (_d) {
            switch (_d.label) {
                case 0:
                    a = false;
                    if (!this.yw())
                        return [3 /*break*/, 8];
                    b = this.x4(0, this.dp.count);
                    this.aap(new FinancialEventArgs(0, this.dp.count, b, this.x5(b), this));
                    if (!(b.typicalColumn != null))
                        return [3 /*break*/, 8];
                    a = true;
                    _d.label = 1;
                case 1:
                    _d.trys.push([1, 6, 7, 8]);
                    _a = __values(fromEnum(b.typicalColumn)), _b = _a.next();
                    _d.label = 2;
                case 2:
                    if (!!_b.done)
                        return [3 /*break*/, 5];
                    c = _b.value;
                    return [4 /*yield*/, c];
                case 3:
                    _d.sent();
                    _d.label = 4;
                case 4:
                    _b = _a.next();
                    return [3 /*break*/, 2];
                case 5: return [3 /*break*/, 8];
                case 6:
                    e_2_1 = _d.sent();
                    e_2 = { error: e_2_1 };
                    return [3 /*break*/, 8];
                case 7:
                    try {
                        if (_b && !_b.done && (_c = _a.return))
                            _c.call(_a);
                    }
                    finally {
                        if (e_2)
                            throw e_2.error;
                    }
                    return [7 /*endfinally*/];
                case 8:
                    if (!!a)
                        return [3 /*break*/, 17];
                    if (!(this.y1 && this.xr.i$b != null))
                        return [3 /*break*/, 13];
                    d = this.dp.count;
                    e = this.xr.i$b;
                    f = 0;
                    _d.label = 9;
                case 9:
                    if (!(f < d))
                        return [3 /*break*/, 12];
                    return [4 /*yield*/, (this.yl.item(e.item(f)) + this.ym.item(e.item(f)) + this.yk.item(e.item(f))) / 3];
                case 10:
                    _d.sent();
                    _d.label = 11;
                case 11:
                    ++f;
                    return [3 /*break*/, 9];
                case 12: return [3 /*break*/, 17];
                case 13:
                    g = this.dp.count;
                    h = 0;
                    _d.label = 14;
                case 14:
                    if (!(h < g))
                        return [3 /*break*/, 17];
                    return [4 /*yield*/, (this.yl.item(h) + this.ym.item(h) + this.yk.item(h)) / 3];
                case 15:
                    _d.sent();
                    _d.label = 16;
                case 16:
                    ++h;
                    return [3 /*break*/, 14];
                case 17: return [2 /*return*/];
            }
        });
    };
    FinancialSeries.prototype.y6 = function () {
        var _this = this;
        return toEnum(function () { return _this._y6(); });
    };
    Object.defineProperty(FinancialSeries.prototype, "y8", {
        get: function () {
            return this.y5();
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype._y5 = function () {
        var a, b, c, d, e;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (!(this.y1 && this.xr.i$b != null))
                        return [3 /*break*/, 7];
                    a = this.yl.count;
                    b = this.xr.i$b;
                    if (!(a > 0))
                        return [3 /*break*/, 2];
                    return [4 /*yield*/, this.zn(this.yl.item(b.item(0)) - this.ym.item(b.item(0)))];
                case 1:
                    _a.sent();
                    _a.label = 2;
                case 2:
                    c = 1;
                    _a.label = 3;
                case 3:
                    if (!(c < a))
                        return [3 /*break*/, 6];
                    return [4 /*yield*/, Math.max(this.zn(this.yl.item(b.item(c)) - this.ym.item(b.item(c))), Math.max(this.zn(Math.abs(this.yl.item(b.item(c)) - this.yk.item(b.item(c - 1)))), this.zn(Math.abs(this.ym.item(b.item(c)) - this.yk.item(b.item(c - 1))))))];
                case 4:
                    _a.sent();
                    _a.label = 5;
                case 5:
                    ++c;
                    return [3 /*break*/, 3];
                case 6: return [3 /*break*/, 13];
                case 7:
                    d = this.yl.count;
                    if (!(d > 0))
                        return [3 /*break*/, 9];
                    return [4 /*yield*/, this.zn(this.yl.item(0) - this.ym.item(0))];
                case 8:
                    _a.sent();
                    _a.label = 9;
                case 9:
                    e = 1;
                    _a.label = 10;
                case 10:
                    if (!(e < d))
                        return [3 /*break*/, 13];
                    return [4 /*yield*/, Math.max(this.zn(this.yl.item(e) - this.ym.item(e)), Math.max(this.zn(Math.abs(this.yl.item(e) - this.yk.item(e - 1))), this.zn(Math.abs(this.ym.item(e) - this.yk.item(e - 1)))))];
                case 11:
                    _a.sent();
                    _a.label = 12;
                case 12:
                    ++e;
                    return [3 /*break*/, 10];
                case 13: return [2 /*return*/];
            }
        });
    };
    FinancialSeries.prototype.y5 = function () {
        var _this = this;
        return toEnum(function () { return _this._y5(); });
    };
    Object.defineProperty(FinancialSeries.prototype, "y7", {
        get: function () {
            return this.y4();
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype._y4 = function () {
        var a, b, c, d, e;
        return __generator(this, function (_a) {
            switch (_a.label) {
                case 0:
                    if (!(this.y1 && this.xr.i$b != null))
                        return [3 /*break*/, 7];
                    a = this.ym.count;
                    b = this.xr.i$b;
                    if (!(a > 0))
                        return [3 /*break*/, 2];
                    return [4 /*yield*/, this.zn(this.ym.item(b.item(0)))];
                case 1:
                    _a.sent();
                    _a.label = 2;
                case 2:
                    c = 1;
                    _a.label = 3;
                case 3:
                    if (!(c < a))
                        return [3 /*break*/, 6];
                    return [4 /*yield*/, Math.min(this.zn(this.ym.item(b.item(c))), this.zn(this.yk.item(b.item(c - 1))))];
                case 4:
                    _a.sent();
                    _a.label = 5;
                case 5:
                    c++;
                    return [3 /*break*/, 3];
                case 6: return [3 /*break*/, 13];
                case 7:
                    d = this.ym.count;
                    if (!(d > 0))
                        return [3 /*break*/, 9];
                    return [4 /*yield*/, this.zn(this.ym.item(0))];
                case 8:
                    _a.sent();
                    _a.label = 9;
                case 9:
                    e = 1;
                    _a.label = 10;
                case 10:
                    if (!(e < d))
                        return [3 /*break*/, 13];
                    return [4 /*yield*/, Math.min(this.zn(this.ym.item(e)), this.zn(this.yk.item(e - 1)))];
                case 11:
                    _a.sent();
                    _a.label = 12;
                case 12:
                    e++;
                    return [3 /*break*/, 10];
                case 13: return [2 /*return*/];
            }
        });
    };
    FinancialSeries.prototype.y4 = function () {
        var _this = this;
        return toEnum(function () { return _this._y4(); });
    };
    FinancialSeries.prototype.zb = function (a) {
        if (a == null) {
            return null;
        }
        if (this.y1 && this.xr.i$b != null) {
            return new SafeSortedReadOnlyDoubleCollection(0, a, this.xr.i$b);
        }
        return new SafeReadOnlyDoubleCollection(0, a);
    };
    FinancialSeries.prototype.za = function () {
        var a = new List$1(String_$type, 0);
        a.add("HighColumn");
        a.add("LowColumn");
        a.add("CloseColumn");
        if (this.typicalBasedOn != null && this.dp != null && !this.yq) {
            this.yq = true;
            var b = this.x4(0, this.dp.count);
            this.yq = false;
            var c = new FinancialEventArgs(0, this.dp.count, b, this.x5(b), this);
            this.typicalBasedOn(this, c);
            if (c.basedOn != null && c.basedOn.count > 0) {
                return c.basedOn;
            }
        }
        return a;
    };
    FinancialSeries.prototype.getOpenColumnAsArray = function () {
        if (this.yn == null) {
            return null;
        }
        if (this.xr != null && typeCast(ISortingAxis_$type, this.xr) !== null) {
            if (this.zf != null) {
                return this.zf.asArray();
            }
            var a = new List$1(Number_$type, 2, this.yn.count);
            var b = this.xr.i$b;
            var c = this.yn.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.zf = a;
            return this.zf.asArray();
        }
        else {
            return this.yn.asArray();
        }
    };
    FinancialSeries.prototype.getHighColumnAsArray = function () {
        if (this.yl == null) {
            return null;
        }
        if (this.xr != null && typeCast(ISortingAxis_$type, this.xr) !== null) {
            if (this.zd != null) {
                return this.zd.asArray();
            }
            var a = new List$1(Number_$type, 2, this.yl.count);
            var b = this.xr.i$b;
            var c = this.yl.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.zd = a;
            return this.zd.asArray();
        }
        else {
            return this.yl.asArray();
        }
    };
    FinancialSeries.prototype.getLowColumnAsArray = function () {
        if (this.ym == null) {
            return null;
        }
        if (this.xr != null && typeCast(ISortingAxis_$type, this.xr) !== null) {
            if (this.ze != null) {
                return this.ze.asArray();
            }
            var a = new List$1(Number_$type, 2, this.ym.count);
            var b = this.xr.i$b;
            var c = this.ym.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.ze = a;
            return this.ze.asArray();
        }
        else {
            return this.ym.asArray();
        }
    };
    FinancialSeries.prototype.getCloseColumnAsArray = function () {
        if (this.yk == null) {
            return null;
        }
        if (this.xr != null && typeCast(ISortingAxis_$type, this.xr) !== null) {
            if (this.zc != null) {
                return this.zc.asArray();
            }
            var a = new List$1(Number_$type, 2, this.yk.count);
            var b = this.xr.i$b;
            var c = this.yk.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.zc = a;
            return this.zc.asArray();
        }
        else {
            return this.yk.asArray();
        }
    };
    FinancialSeries.prototype.getVolumeColumnAsArray = function () {
        if (this.yp == null) {
            return null;
        }
        if (this.xr != null && typeCast(ISortingAxis_$type, this.xr) !== null) {
            if (this.zg != null) {
                return this.zg.asArray();
            }
            var a = new List$1(Number_$type, 2, this.yp.count);
            var b = this.xr.i$b;
            var c = this.yp.asArray();
            for (var d = 0; d < b.count; d++) {
                a.add(c[b._inner[d]]);
            }
            this.zg = a;
            return this.zg.asArray();
        }
        else {
            return this.yp.asArray();
        }
    };
    FinancialSeries.prototype.po = function (a, b, c, d) {
        _super.prototype.po.call(this, a, b, c, d);
        if (this.xr == null || !(typeCast(ISortingAxis_$type, this.xr) !== null)) {
            return;
        }
        var e = this.xr.i$b;
        switch (a) {
            case 1:
                for (var f = b; f < c; f++) {
                    var g = e._inner[f];
                    if (this.zf != null) {
                        this.zf.insert(f, this.yn.item(g));
                    }
                    if (this.zd != null) {
                        this.zd.insert(f, this.yl.item(g));
                    }
                    if (this.ze != null) {
                        this.ze.insert(f, this.ym.item(g));
                    }
                    if (this.zc != null) {
                        this.zc.insert(f, this.yk.item(g));
                    }
                    if (this.zg != null) {
                        this.zg.insert(f, this.yp.item(g));
                    }
                }
                break;
            case 0:
                if (this.zf != null) {
                    this.zf.v(b, c);
                }
                if (this.zd != null) {
                    this.zd.v(b, c);
                }
                if (this.ze != null) {
                    this.ze.v(b, c);
                }
                if (this.zc != null) {
                    this.zc.v(b, c);
                }
                if (this.zg != null) {
                    this.zg.v(b, c);
                }
                break;
            case 4:
                if (this.zf != null) {
                    this.zf = new List$1(Number_$type, 0);
                }
                if (this.zd != null) {
                    this.zd = new List$1(Number_$type, 0);
                }
                if (this.ze != null) {
                    this.ze = new List$1(Number_$type, 0);
                }
                if (this.zc != null) {
                    this.zc = new List$1(Number_$type, 0);
                }
                if (this.zg != null) {
                    this.zg = new List$1(Number_$type, 0);
                }
                break;
            case 3:
            case 2:
                for (var h = b; h < c; h++) {
                    var i = e._inner[h];
                    if (this.zf != null) {
                        this.zf._inner[h] = this.yn.item(i);
                    }
                    if (this.zd != null) {
                        this.zd._inner[h] = this.yl.item(i);
                    }
                    if (this.ze != null) {
                        this.ze._inner[h] = this.ym.item(i);
                    }
                    if (this.zc != null) {
                        this.zc._inner[h] = this.yk.item(i);
                    }
                    if (this.zg != null) {
                        this.zg._inner[h] = this.yp.item(i);
                    }
                }
                break;
        }
        this.aa0();
        this.s5();
    };
    FinancialSeries.prototype.x4 = function (a, b) {
        var _this = this;
        var c = this.zb(this.yn);
        var d = this.zb(this.yk);
        var e = this.zb(this.yl);
        var f = this.zb(this.ym);
        var g = this.zb(this.yp);
        var h = ((function () {
            var $ret = new FinancialCalculationDataSource();
            $ret.typicalColumn = new CalculatedColumn(1, new SafeEnumerable(_this.y9), _this.za());
            $ret.trueRange = new CalculatedColumn(1, new SafeEnumerable(_this.y8), ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("HighColumn");
                $ret.add("LowColumn");
                $ret.add("CloseColumn");
                return $ret;
            })()));
            $ret.trueLow = new CalculatedColumn(1, new SafeEnumerable(_this.y7), ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("LowColumn");
                $ret.add("CloseColumn");
                return $ret;
            })()));
            $ret.openColumn = c;
            $ret.closeColumn = d;
            $ret.highColumn = e;
            $ret.lowColumn = f;
            $ret.volumeColumn = g;
            $ret.calculateFrom = a;
            $ret.calculateCount = b;
            $ret.minimumValue = NaN;
            $ret.maximumValue = NaN;
            $ret.count = _this.dp != null ? _this.dp.count : 0;
            return $ret;
        })());
        return h;
    };
    FinancialSeries.prototype.zn = function (a) {
        if (isInfinity(a) || isNaN_(a)) {
            return 0;
        }
        return a;
    };
    FinancialSeries.prototype.x5 = function (a) {
        var _this = this;
        return ((function () {
            var $ret = new FinancialCalculationSupportingCalculations();
            $ret.a = new ColumnSupportingCalculation(1, TrendCalculators.b, new List$1(String_$type, 0));
            $ret.c = new ColumnSupportingCalculation(1, TrendCalculators.e, new List$1(String_$type, 0));
            $ret.d = new ColumnSupportingCalculation(1, TrendCalculators.f, new List$1(String_$type, 0));
            $ret.b = new ColumnSupportingCalculation(1, TrendCalculators.d, new List$1(String_$type, 0));
            $ret.h = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.volumeColumn, b.shortPeriod); }, ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.f = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.volumeColumn, b.longPeriod); }, ((function () {
                var $ret = new List$1(String_$type, 0);
                $ret.add("VolumeColumn");
                return $ret;
            })()));
            $ret.g = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.typicalColumn, b.shortPeriod); }, a.typicalColumn.basedOn);
            $ret.e = new DataSourceSupportingCalculation(1, function (b) { return TrendCalculators.b(b.typicalColumn, b.longPeriod); }, a.typicalColumn.basedOn);
            $ret.k = Series.hw;
            $ret.j = Series.hv;
            $ret.i = runOn(_this, _this.zn);
            return $ret;
        })());
    };
    Object.defineProperty(FinancialSeries.prototype, "categoryAxis", {
        get: function () {
            return this.xr;
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.sa = function (a, b) {
        _super.prototype.sa.call(this, a, b);
        if (!this.g6) {
            this.cw.be(b);
            return;
        }
        var c = typeCast(FinancialSeriesView.$, this.cv);
        this.cw.be(b);
        c.cd.e(this.ik);
        if (this.d7(this.cv)) {
            return;
        }
        this.sb();
        this.g6 = false;
    };
    FinancialSeries.prototype.sb = function () {
        _super.prototype.sb.call(this);
        var a = typeCast(FinancialSeriesView.$, this.cv);
        if (!this.gy) {
            this.aax(this.xw, a);
        }
        this.gy = false;
        this.aaz(this.xw, a);
    };
    FinancialSeries.prototype.r7 = function (a, b, c, d, e) {
        _super.prototype.r7.call(this, a, b, c, d, e);
        var f = this.ba.a$k.item(d);
        var g = f;
        g.cd.e(this.ik);
        f.bd(c);
        if (this.d7(g)) {
            return;
        }
        if (this.xs == null) {
            this.xs = new CategoryFrame(3);
        }
        this.xs.aa();
        this.aax(this.xs, g);
        this.aaz(this.xs, g);
    };
    FinancialSeries.prototype.aw = function (a) {
        if (this.xr == a) {
            return this.ya;
        }
        if (this.ya == a) {
            return this.xr;
        }
        return null;
    };
    FinancialSeries.prototype.preferredCategoryMode = function (a) {
        var b = typeCast(IDateTimeAxis_$type, this.xr);
        return b != null ? b.preferredCategoryMode(this) : this.xz;
    };
    Object.defineProperty(FinancialSeries.prototype, "xz", {
        get: function () {
            return this.xy;
        },
        set: function (a) {
            var b = this.xz;
            if (a != b) {
                this.xy = a;
                this.raisePropertyChanged("CategoryMode", enumGetBox(CategoryMode_$type, b), enumGetBox(CategoryMode_$type, this.xz));
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialSeries.prototype.get_fp = function () {
        return true;
    };
    FinancialSeries.prototype.sl = function (a, b) {
        _super.prototype.sl.call(this, a, b);
        this.abh = a;
    };
    FinancialSeries.prototype.aa0 = function () {
        this.it = this.yk == null || this.yk.count == 0 ? NaN : this.yk.item(this.yk.count - 1);
    };
    FinancialSeries.prototype.ky = function (a) {
        if (this.x9 != null && a != null) {
            if (this.yb == null || this.yb.propertyName != this.x9.dateTimeMemberPath) {
                this.yb = new FastReflectionHelper(false, this.x9.dateTimeMemberPath);
            }
            var b = this.yb.getPropertyValue(a);
            if (typeCast(Date_$type, b) !== null) {
                return dateToStringFormat(b, this.x9.itemLabelFormat());
            }
        }
        return _super.prototype.ky.call(this, a);
    };
    FinancialSeries.$t = markType(FinancialSeries, 'FinancialSeries', Series.$, [IHasCategoryAxis_$type, IHasCategoryModePreference_$type]);
    FinancialSeries.$$p = markDep(DependencyProperty, PropertyMetadata, FinancialSeries, 'raisePropertyChanged', ['CloseMemberPath:zv:aa1', [2, null], 'HighMemberPath:z8:aa7', [2, null], 'HighlightedCloseMemberPath:zy:aa2', [2, null], 'HighlightedHighMemberPath:z0:aa3', [2, null], 'HighlightedLowMemberPath:z2:aa4', [2, null], 'HighlightedOpenMemberPath:z4:aa5', [2, null], 'HighlightedVolumeMemberPath:z6:aa6', [2, null], 'IsCustomCategoryStyleAllowed:yx:aa8', [0, false], 'IsTransitionInEnabled:yy:aa9', [0, false], 'LowMemberPath:aad:aba', [2, null], 'NegativeBrush:abh:abb', [Brush.$, null], 'OpenMemberPath:aah:abc', [2, null], 'TransitionInMode:x2:abd', [CategoryTransitionInMode_$type, enumGetBox(CategoryTransitionInMode_$type, 0)], 'VolumeMemberPath:aal:abe', [2, null], 'XAxis:xr:abf', [CategoryAxisBase.$, null], 'YAxis:ya:abg', [NumericYAxis.$, null]]);
    return FinancialSeries;
}(Series));
/**
 * @hidden
 */
export var FinancialCalculationSupportingCalculations = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialCalculationSupportingCalculations, _super);
    function FinancialCalculationSupportingCalculations() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.a = null;
        _this.c = null;
        _this.d = null;
        _this.b = null;
        _this.h = null;
        _this.f = null;
        _this.g = null;
        _this.e = null;
        _this.k = null;
        _this.j = null;
        _this.i = null;
        return _this;
    }
    FinancialCalculationSupportingCalculations.$t = markType(FinancialCalculationSupportingCalculations, 'FinancialCalculationSupportingCalculations');
    return FinancialCalculationSupportingCalculations;
}(Base));
/**
 * @hidden
 */
export var DataSourceSupportingCalculation = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(DataSourceSupportingCalculation, _super);
    function DataSourceSupportingCalculation(a) {
        var _rest = [];
        for (var _i = 1; _i < arguments.length; _i++) {
            _rest[_i - 1] = arguments[_i];
        }
        var _this = this;
        a = (a == void 0) ? 0 : a;
        switch (a) {
            case 0:
                {
                    var c = _rest[0];
                    _this = _super.call(this, Delegate_$type, 0, c) || this;
                }
                break;
            case 1:
                {
                    var c = _rest[0];
                    var d = _rest[1];
                    _this = _super.call(this, Delegate_$type, 1, c, d) || this;
                }
                break;
        }
        return _this;
    }
    DataSourceSupportingCalculation.$t = markType(DataSourceSupportingCalculation, 'DataSourceSupportingCalculation', SupportingCalculation$1.$.specialize(Delegate_$type));
    return DataSourceSupportingCalculation;
}(SupportingCalculation$1));
/**
 * @hidden
 */
export var FinancialCalculationDataSource = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialCalculationDataSource, _super);
    function FinancialCalculationDataSource() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this._openColumn = null;
        _this._closeColumn = null;
        _this._highColumn = null;
        _this._lowColumn = null;
        _this._volumeColumn = null;
        _this._indicatorColumn = null;
        _this._typicalColumn = null;
        _this._trueRange = null;
        _this._trueLow = null;
        _this._period = 0;
        _this._shortPeriod = 0;
        _this._longPeriod = 0;
        _this._count = 0;
        _this._calculateFrom = 0;
        _this._calculateCount = 0;
        _this._multiplier = 0;
        _this._minimumValue = 0;
        _this._maximumValue = 0;
        _this._specifiesRange = false;
        _this._series = null;
        return _this;
    }
    Object.defineProperty(FinancialCalculationDataSource.prototype, "openColumn", {
        get: function () {
            return this._openColumn;
        },
        set: function (a) {
            this._openColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "closeColumn", {
        get: function () {
            return this._closeColumn;
        },
        set: function (a) {
            this._closeColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "highColumn", {
        get: function () {
            return this._highColumn;
        },
        set: function (a) {
            this._highColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "lowColumn", {
        get: function () {
            return this._lowColumn;
        },
        set: function (a) {
            this._lowColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "volumeColumn", {
        get: function () {
            return this._volumeColumn;
        },
        set: function (a) {
            this._volumeColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "indicatorColumn", {
        get: function () {
            return this._indicatorColumn;
        },
        set: function (a) {
            this._indicatorColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "typicalColumn", {
        get: function () {
            return this._typicalColumn;
        },
        set: function (a) {
            this._typicalColumn = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "trueRange", {
        get: function () {
            return this._trueRange;
        },
        set: function (a) {
            this._trueRange = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "trueLow", {
        get: function () {
            return this._trueLow;
        },
        set: function (a) {
            this._trueLow = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "period", {
        get: function () {
            return this._period;
        },
        set: function (a) {
            this._period = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "shortPeriod", {
        get: function () {
            return this._shortPeriod;
        },
        set: function (a) {
            this._shortPeriod = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "longPeriod", {
        get: function () {
            return this._longPeriod;
        },
        set: function (a) {
            this._longPeriod = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "count", {
        get: function () {
            return this._count;
        },
        set: function (a) {
            this._count = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "calculateFrom", {
        get: function () {
            return this._calculateFrom;
        },
        set: function (a) {
            this._calculateFrom = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "calculateCount", {
        get: function () {
            return this._calculateCount;
        },
        set: function (a) {
            this._calculateCount = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "multiplier", {
        get: function () {
            return this._multiplier;
        },
        set: function (a) {
            this._multiplier = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "minimumValue", {
        get: function () {
            return this._minimumValue;
        },
        set: function (a) {
            this._minimumValue = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "maximumValue", {
        get: function () {
            return this._maximumValue;
        },
        set: function (a) {
            this._maximumValue = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "specifiesRange", {
        get: function () {
            return this._specifiesRange;
        },
        set: function (a) {
            this._specifiesRange = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialCalculationDataSource.prototype, "series", {
        get: function () {
            return this._series;
        },
        set: function (a) {
            this._series = a;
        },
        enumerable: false,
        configurable: true
    });
    FinancialCalculationDataSource.$t = markType(FinancialCalculationDataSource, 'FinancialCalculationDataSource');
    return FinancialCalculationDataSource;
}(Base));
/**
 * @hidden
 */
export var FinancialSeriesView = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialSeriesView, _super);
    function FinancialSeriesView(a) {
        var _this = _super.call(this, a) || this;
        _this.cf = null;
        _this.cd = null;
        _this.ch = 0;
        _this.ch = -1;
        _this.cf = a;
        _this.cd = _this.ce();
        return _this;
    }
    FinancialSeriesView.prototype.cg = function (a) {
        if (this.ch != a.z) {
            return true;
        }
        return false;
    };
    FinancialSeriesView.prototype.ci = function (a) {
        this.ch = a.z;
    };
    FinancialSeriesView.prototype.a4 = function () {
        _super.prototype.a4.call(this);
        if (!this.t) {
        }
    };
    FinancialSeriesView.prototype.getDefaultTooltipTemplate = function () {
        var a = "<div class='ui-chart-default-tooltip-content'>";
        if (this.cf.xr.dj) {
            a += "<span>${itemLabel}</span><br/>";
        }
        else if (this.cf.xr.hx != null) {
            a += "<span>${item." + this.cf.xr.hx + "}</span><br/>";
        }
        a += "<span class='ui-priority-primary'";
        var b = this.f.ba.a$v(this.f);
        if (!stringIsNullOrEmpty(b)) {
            a += " style='color:" + b + "'";
        }
        var c = new SRProvider(this.ae);
        var d = c.b1("financialSeries_Open");
        var e = c.b1("financialSeries_High");
        var f = c.b1("financialSeries_Low");
        var g = c.b1("financialSeries_Close");
        d = stringIsNullOrEmpty(d) ? "Open" : d;
        e = stringIsNullOrEmpty(e) ? "High" : e;
        f = stringIsNullOrEmpty(f) ? "Low" : f;
        g = stringIsNullOrEmpty(g) ? "Close" : g;
        a += ">" + this.cf.title + "</span><table><tr><td>" + d + ":</td><td>" + "${item." + this.cf.aah + "}</td></tr><tr><td>" + e + ":</td><td>" + "${item." + this.cf.z8 + "}</td></tr><tr><td>" + f + ":</td><td>" + "${item." + this.cf.aad + "}</td></tr><tr><td>" + g + ":</td><td>" + "${item." + this.cf.zv + "}</td></tr>";
        if (!stringIsNullOrEmpty(this.cf.aal)) {
            var h = c.b1("financialSeries_Volume");
            h = stringIsNullOrEmpty(h) ? "Volume" : h;
            a += "<tr><td>" + h + ":</td><td>" + "${item." + this.cf.aal + "}</td></tr>";
        }
        a += "</table></div>";
        return a;
    };
    FinancialSeriesView.prototype.an = function () {
        var a = new Color();
        a.colorString = "rgba(95,95,95,0.5)";
        this.f.wl = a;
        this.f.jv = 5;
        this.f.jw = 2;
        this.f.jx = 2;
    };
    FinancialSeriesView.$t = markType(FinancialSeriesView, 'FinancialSeriesView', SeriesView.$);
    return FinancialSeriesView;
}(SeriesView));