UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

4,672 lines • 164 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, __read, __spreadArray, __values } from "tslib";
import { Brush } from "igniteui-angular-core";
import { XYChart } from "./XYChart";
import { IndicatorPane } from "./IndicatorPane";
import { Base, BaseError, EventArgs, runOn, delegateRemove, delegateCombine, fromEnum, typeCast, EnumUtil, Number_$type, String_$type, enumGetBox, markType, TypeRegistrar, fromEn } from "igniteui-angular-core";
import { List$1 } from "igniteui-angular-core";
import { DataSeriesType_$type } from "igniteui-angular-core";
import { IDataSeriesAdapterRule_$type } from "igniteui-angular-core";
import { SimpleFinancialPriceSeriesRule } from "igniteui-angular-core";
import { SubCollectionsRule } from "igniteui-angular-core";
import { XamDataChart } from "./XamDataChart";
import { FinancialChartVolumeType_$type } from "./FinancialChartVolumeType";
import { FinancialChartXAxisMode_$type } from "./FinancialChartXAxisMode";
import { FinancialChartYAxisMode_$type } from "./FinancialChartYAxisMode";
import { FinancialChartType_$type } from "./FinancialChartType";
import { NumericYAxis } from "./NumericYAxis";
import { CategoryAxisBase } from "./CategoryAxisBase";
import { FinancialChartZoomSliderType_$type } from "./FinancialChartZoomSliderType";
import { BrushCollection } from "igniteui-angular-core";
import { FinancialChartRangeSelectorOptionCollection } from "./FinancialChartRangeSelectorOptionCollection";
import { ObservableCollection$1 } from "igniteui-angular-core";
import { TemplatedHtmlControl } from "./TemplatedHtmlControl";
import { FinancialChartContext } from "./FinancialChartContext";
import { FinancialChartToolbarContext } from "./FinancialChartToolbarContext";
import { FinancialChartViewModel } from "./FinancialChartViewModel";
import { FinancialChartToolbarViewModel } from "./FinancialChartToolbarViewModel";
import { AxisDefaults } from "./AxisDefaults";
import { Defaults } from "./Defaults";
import { BrushUtil } from "igniteui-angular-core";
import { Series } from "./Series";
import { Rect } from "igniteui-angular-core";
import { Axis } from "./Axis";
import { AxisLabelSettings } from "./AxisLabelSettings";
import { MarkerSeries } from "./MarkerSeries";
import { IZoomableCategoryAxis_$type } from "./IZoomableCategoryAxis";
import { SyncSettings } from "./SyncSettings";
import { SyncManager } from "./SyncManager";
import { FinancialOverlayType_$type } from "./FinancialOverlayType";
import { ArrayExtension } from "igniteui-angular-core";
import { FinancialIndicatorType_$type } from "./FinancialIndicatorType";
import { IndicatorDisplayType_$type } from "./IndicatorDisplayType";
import { ITimeRangeSelectorAxis_$type } from "./ITimeRangeSelectorAxis";
import { FinancialChartVisualData } from "./FinancialChartVisualData";
import { FinancialChartCustomIndicatorArgs } from "./FinancialChartCustomIndicatorArgs";
import { ScalerParams } from "./ScalerParams";
import { stringReplace, stringJoin, stringIsNullOrEmpty } from "igniteui-angular-core";
import { timeSpanFromDays } from "igniteui-angular-core";
import { dateMaxValue, dateMinValue } from "igniteui-angular-core";
import { isNaN_, isInfinity } from "igniteui-angular-core";
import { FinancialChartTypePicker } from "./FinancialChartTypePicker";
import { FinancialChartIndicatorMenu } from "./FinancialChartIndicatorMenu";
import { TrendLineType_$type } from "igniteui-angular-core";
import { FinancialChartIndicatorMenuContext } from "./FinancialChartIndicatorMenuContext";
import { FinancialChartTypePickerContext } from "./FinancialChartTypePickerContext";
import { FinancialChartRangeSelectorContext } from "./FinancialChartRangeSelectorContext";
import { FinancialChartToolbarVisualData } from "./FinancialChartToolbarVisualData";
import { FinancialChartRangeSelectorViewModel } from "./FinancialChartRangeSelectorViewModel";
import { FinancialChartRangeSelectorView } from "./FinancialChartRangeSelectorView";
/**
 * @hidden
 */
var FinancialChart = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialChart, _super);
    function FinancialChart() {
        var _this = _super.call(this) || this;
        _this.air = null;
        _this.alp = null;
        _this.aln = null;
        _this.alk = null;
        _this.alm = null;
        _this.alo = null;
        _this.all = null;
        _this.ahx = null;
        _this.al7 = null;
        _this.al8 = null;
        _this.al4 = null;
        _this.al9 = null;
        _this.ama = null;
        _this.al5 = null;
        _this.al6 = null;
        _this.ajf = null;
        _this.akp = 40;
        _this.ail = null;
        _this.aij = null;
        _this.ain = null;
        _this.ais = null;
        _this.ami = null;
        _this.ajb = null;
        _this.aj1 = false;
        _this.aj0 = false;
        _this.aj8 = false;
        _this.ajn = false;
        _this.alv = 10;
        _this.akw = NaN;
        _this.aky = NaN;
        _this.akx = NaN;
        _this.akz = 0;
        _this.ah3 = 0;
        _this.ah6 = 0;
        _this.akr = 3;
        _this.aku = NaN;
        _this.aks = NaN;
        _this.akt = NaN;
        _this.akv = NaN;
        _this.ah8 = 0;
        _this.aji = true;
        _this.ahz = 0;
        _this.ajj = false;
        _this.aid = null;
        _this.aif = null;
        _this.aka = null;
        _this.ajl = true;
        _this.ajk = false;
        _this.ajm = false;
        _this.ajc = null;
        _this.aia = 1;
        _this.ag1 = null;
        _this.ag2 = null;
        _this.ag3 = null;
        _this.ag4 = null;
        _this.ag6 = null;
        _this.ag5 = null;
        _this.ag0 = null;
        _this.agz = null;
        _this.akq = 1;
        _this.ako = 1;
        _this.akn = 2;
        _this.akm = 1;
        _this.aip = null;
        _this.alr = -2147483648;
        _this.akl = 2;
        _this.alu = 3;
        _this.als = 10;
        _this.alq = 30;
        _this.alt = 9;
        _this.ahu = null;
        _this.ahv = null;
        _this.ahq = null;
        _this.applyCustomIndicators = null;
        _this.aqc = null;
        _this.ak0 = 1;
        _this.ajh = false;
        _this.aih = null;
        _this.aki = dateMinValue();
        _this.akh = dateMaxValue();
        _this.akf = null;
        _this.ul();
        _this.akf = new ObservableCollection$1(Base.$, 0);
        if (_this.xAxisBreaks != null) {
            var a = _this.xAxisBreaks;
            a.collectionChanged = delegateCombine(a.collectionChanged, function (a, b) { return _this.ap1(); });
        }
        _this.apm();
        return _this;
    }
    FinancialChart.prototype.vy = function (a, b, c) {
        _super.prototype.vy.call(this, a, b, c);
        switch (a) {
            case "ToolbarTemplate":
            case "RangeSelectorTemplate":
                this.ahy = new FinancialChartToolbar(this, this.amf);
                break;
            case "Toolbar":
                var d = b;
                if (d != null) {
                    d.chartTypeChanged = delegateRemove(d.chartTypeChanged, runOn(this, this.ao9));
                    d.trendLineTypeChanged = delegateRemove(d.trendLineTypeChanged, runOn(this, this.apc));
                    d.volumeTypeChanged = delegateRemove(d.volumeTypeChanged, runOn(this, this.apd));
                    d.l(null);
                }
                if (this.ahy != null) {
                    this.ahy.ac = this.ah5;
                    this.ahy.ai = this.trendLineType;
                    this.ahy.y = this.ah0;
                    this.ahy.al = this.ajy;
                    if (this.alm != null) {
                        this.ahy.l(this.alm);
                    }
                    var e = this.ahy;
                    e.chartTypeChanged = delegateCombine(e.chartTypeChanged, runOn(this, this.ao9));
                    ;
                    var f = this.ahy;
                    f.trendLineTypeChanged = delegateCombine(f.trendLineTypeChanged, runOn(this, this.apc));
                    var g = this.ahy;
                    g.volumeTypeChanged = delegateCombine(g.volumeTypeChanged, runOn(this, this.apd));
                }
                break;
            case "ChartType":
                if (this.ahy != null) {
                    this.ahy.y = this.ah0;
                }
                break;
            case "VolumeType":
                if (this.ahy != null) {
                    this.ahy.ac = this.ah5;
                }
                break;
            case "TrendLineType":
                if (this.ahy != null) {
                    this.ahy.ai = this.trendLineType;
                }
                break;
            case "IsToolbarVisible":
                if (this.ahy == null) {
                    break;
                }
                this.ahy.al = this.ajy;
                this.setGridRows();
                break;
        }
    };
    FinancialChart.prototype.apd = function (a, b) {
        this.ah5 = this.ahy.ac;
    };
    FinancialChart.prototype.apc = function (a, b) {
        this.trendLineType = this.ahy.ai;
    };
    FinancialChart.prototype.ao9 = function (a, b) {
        this.ah0 = this.ahy.y;
    };
    FinancialChart.prototype.apm = function () {
        this.air = new IndicatorPane();
        this.aii = TypeRegistrar.create("FinancialLegend");
    };
    FinancialChart.prototype.provideGrid = function (a) {
        this.alp = a;
        this.ap7();
        this.setGridRows();
        if (this.ahy != null) {
            this.ahy.bg(a);
        }
    };
    FinancialChart.prototype.onDocumentClick = function (a) {
        if (this.ahy != null) {
            this.ahy.bl(a);
        }
    };
    FinancialChart.prototype.getContext = function () {
        var a = this.ahy.v();
        var b = new FinancialChartContext();
        b.vm = new FinancialChartViewModel();
        b.vm.toolbar = a;
        b.container = this.lt;
        b.toolbarContainer = this.alm;
        b.legendContainer = this.all;
        b.indicatorsContainer = this.alk;
        b.volumeContainer = this.aln;
        b.zoomContainer = this.alo;
        return b;
    };
    FinancialChart.prototype.provideContainer = function (a) {
        var b = a;
        if (b != null) {
            var c = "financialChartMainGrid";
            var d = b.createElement("div");
            d.setStyleProperty("width", "100%");
            d.setStyleProperty("height", "100%");
            if (this.ahy == null) {
                this.ahy = new FinancialChartToolbar(this, this.amf);
            }
            this.ahy.w.isIndicatorMenuVisible = this.ajp && this.ajq;
            this.alm = b.getSubRenderer(d);
            this.ahy.l(this.alm);
            var e = b.createElement("div");
            e.setStyleProperty("width", "100%");
            e.setStyleProperty("height", "100%");
            var f = b.createElement("div");
            f.setStyleProperty("width", "100%");
            f.setStyleProperty("height", "100%");
            this.all = b.getSubRenderer(f);
            var g = b.createElement("div");
            g.setStyleProperty("width", "100%");
            g.setStyleProperty("height", "100%");
            this.alk = b.getSubRenderer(g);
            var h = b.createElement("div");
            h.setStyleProperty("width", "100%");
            h.setStyleProperty("height", "100%");
            this.aln = b.getSubRenderer(h);
            var i = b.createElement("div");
            i.setStyleProperty("width", "100%");
            i.setStyleProperty("height", "100%");
            this.alo = b.getSubRenderer(i);
            a = b.getSubRenderer(e);
        }
        else {
            this.alm = null;
            if (this.ahy != null) {
                this.ahy.l(null);
            }
            if (this.ajg != null) {
                this.ajg.provideContainer(null);
                this.ajg = null;
            }
            if (this.aii != null) {
                this.aii.provideContainer(null);
            }
        }
        _super.prototype.provideContainer.call(this, a);
        if (b != null) {
            if (this.volumeChart != null) {
                this.volumeChart.c9.b4(this.aln);
            }
            if (this.air != null) {
                this.air.h(this.alk);
            }
            if (this.zoomSliderChart != null) {
                this.zoomSliderChart.c9.b4(this.alo);
                if (a != null) {
                    this.aot();
                }
                else {
                    this.ajg = null;
                }
            }
            if (this.aii != null) {
                this.aii.provideContainer(this.all);
            }
            this.setGridRows();
        }
    };
    FinancialChart.prototype.apx = function (a, b, c) {
        if (a != null) {
            a.provideContainer(null);
        }
        if (b != null) {
            b.c9.b4(c);
        }
        this.setGridRows();
    };
    FinancialChart.prototype.aqb = function (a, b) {
        this.apx(a, b, this.alo);
        if (b == null) {
            return;
        }
        this.aot();
    };
    FinancialChart.prototype.aot = function () {
        var _this = this;
        if (this.alo == null) {
            return;
        }
        if (this.ajg != null) {
            this.ajg.provideContainer(null);
        }
        this.ajg = TypeRegistrar.create("ZoomSlider");
        this.ajg.provideContainer(this.alo);
        var a = this.ajg;
        a.windowRectChanged = delegateCombine(a.windowRectChanged, function (a, b) {
            if (_this.dataChart != null) {
                _this.dataChart.wl = new Rect(0, _this.ajg.windowRect.left, _this.dataChart.v4.top, _this.ajg.windowRect.width, _this.dataChart.v4.height);
            }
        });
        this.aou();
    };
    FinancialChart.prototype.ap9 = function (a, b) {
        this.apx(a, b, this.aln);
    };
    FinancialChart.prototype.setGridRows = function () {
        if (this.alp == null) {
            return;
        }
        var a = new Array(6);
        a[0] = (this.ajy ? this.ak6 : 0) + "px";
        a[1] = this.aju ? "min-content" : "0px";
        a[2] = "auto";
        a[3] = this.indicatorCharts == null || this.indicatorCharts.count == 0 ? "0px" : this.indicatorCharts.count * 150 + "px";
        a[4] = this.volumeChart == null ? "0px" : "100px";
        a[5] = this.zoomSliderChart == null ? "0px" : "100px";
        if (this.ajg != null) {
            if (a[5] == "0px") {
                this.ajg.hide();
            }
            else {
                this.ajg.show();
            }
        }
        this.alp.setStyleProperty("-ms-grid-rows", stringReplace(stringJoin.apply(void 0, __spreadArray([" "], __read(a))), "auto", "1fr"));
        this.alp.setStyleProperty("grid-template-rows", stringJoin.apply(void 0, __spreadArray([" "], __read(a))));
        if (this.lt == null) {
            return;
        }
        if (this.dataChart != null) {
            this.dataChart.notifyContainerResized();
        }
        if (this.air != null) {
            this.air.f();
        }
        if (this.volumeChart != null) {
            this.volumeChart.notifyContainerResized();
        }
        if (this.zoomSliderChart != null) {
            this.zoomSliderChart.notifyContainerResized();
        }
        if (this.ajg != null) {
            this.ajg.notifySizeChanged();
        }
    };
    FinancialChart.prototype.u5 = function () {
        var e_1, _a;
        _super.prototype.u5.call(this);
        this.aad = 1;
        this.afs = 0;
        this.aca = 0;
        this.agm = null;
        this.agf = AxisDefaults.g;
        this.abu = AxisDefaults.e;
        this.abt = AxisDefaults.f;
        this.agg = AxisDefaults.j;
        this.agc = null;
        this.aqd = AxisDefaults.h;
        this.alj = AxisDefaults.b;
        this.finalValueAnnotationsVisible = true;
        this.crosshairsAnnotationEnabled = true;
        this.gn = false;
        this.crosshairsDisplayMode = 0;
        this.jl = Defaults.j;
        this.yc = Defaults.ae;
        this.x7 = Defaults.af;
        this.x8 = Defaults.ag;
        this.j5 = NaN;
        this.jx = 40;
        this.g3 = true;
        this.hb = false;
        if (this.dataChart != null) {
            var a = this.dataChart.c9.j.e();
            this.ag9 = a.d;
            this.aha = a.e;
            this.ag8 = a.d;
            this.aqd = this.dataChart.aaq;
        }
        var b = new BrushCollection();
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#8BDC5C";
            return $ret;
        })()));
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#8961A9";
            return $ret;
        })()));
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#6DB1FF";
            return $ret;
        })()));
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#82E9D9";
            return $ret;
        })()));
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#EA3C63";
            return $ret;
        })()));
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#735656";
            return $ret;
        })()));
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#F8CE4F";
            return $ret;
        })()));
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#A8A8B7";
            return $ret;
        })()));
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#E051A9";
            return $ret;
        })()));
        b.add(((function () {
            var $ret = new Brush();
            $ret.fill = "#FF903B";
            return $ret;
        })()));
        var c = new BrushCollection();
        try {
            for (var _b = __values(fromEnum(b)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var d = _c.value;
                c.add(BrushUtil.n(d, 0.3));
            }
        }
        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;
            }
        }
        this.ahb = c;
        this.ahc = b;
    };
    FinancialChart.prototype.apt = function () {
        if (this.air != null) {
            this.air.b = null;
            this.air.b = this.indicatorCharts;
        }
        this.setGridRows();
    };
    FinancialChart.prototype.apu = function () {
        this.setGridRows();
    };
    FinancialChart.prototype.ap3 = function () {
        this.apt();
    };
    FinancialChart.prototype.aos = function () {
        if (this.ajg == null || this.zoomSliderChart == null || this.dataChart == null || this.dataChart.series.count == 0) {
            return;
        }
        var a = this.lt.rootWrapper.width();
        var b = this.dataChart.wk.left + this.dataChart.wk.width;
        var c = this.dataChart.wk.left;
        var d = a - b;
        this.ajg.startInset = c - this.ajg.trackStartInset;
        this.ajg.endInset = d - this.ajg.trackEndInset;
        if (this.ajg.endInset < 0) {
            var e = this.ajg.endInset;
            this.ajg.endInset = 0;
            this.dataChart.h7 += (e * -1);
        }
        if (this.ajg.startInset < 0) {
            var f = this.ajg.startInset;
            this.ajg.startInset = 0;
            this.dataChart.h2 += (f * -1);
        }
        this.zoomSliderChart.h2 = c;
        this.zoomSliderChart.h7 = d;
        this.zoomSliderChart.hp = this.ajg.barExtent;
    };
    FinancialChart.prototype.apj = function () {
        this.aos();
    };
    FinancialChart.prototype.u2 = function (a) {
        _super.prototype.u2.call(this, a);
        if (a != null) {
            a.ho = 0;
        }
    };
    FinancialChart.prototype.aqe = function (a) {
        return a.vx();
    };
    FinancialChart.prototype.aqh = function () {
        return this.all == null ? null : this.aqg(this.all.rootWrapper);
    };
    FinancialChart.prototype.aqf = function (a) {
        if (a == null || a.d == null) {
            return null;
        }
        return this.aqg(a.d.rootWrapper);
    };
    FinancialChart.prototype.aqg = function (a) {
        if (a == null) {
            return null;
        }
        var b = a.getOffset();
        return new Rect(0, b.left, b.top, a.width(), a.height());
    };
    FinancialChart.prototype.ak1 = function () {
        if (this.alp == null) {
            return NaN;
        }
        var a = this.alp.getOffset();
        return this.alp.width() + (a == null ? 0 : a.left);
    };
    FinancialChart.prototype.ve = function (source_, a, b) {
        _super.prototype.ve.call(this, source_, a, b);
        if (this.zoomSliderChart != null) {
            this.zoomSliderChart.oe(source_, a, b);
        }
    };
    FinancialChart.prototype.vf = function (source_, a, b) {
        _super.prototype.vf.call(this, source_, a, b);
        if (this.zoomSliderChart != null) {
            this.zoomSliderChart.of(source_, a, b);
        }
    };
    FinancialChart.prototype.vd = function (source_) {
        _super.prototype.vd.call(this, source_);
        if (this.zoomSliderChart != null) {
            this.zoomSliderChart.n7(source_);
        }
    };
    FinancialChart.prototype.vh = function (source_, a, b, c) {
        _super.prototype.vh.call(this, source_, a, b, c);
        if (this.zoomSliderChart != null) {
            this.zoomSliderChart.og(source_, a, b, c);
        }
    };
    FinancialChart.prototype.u8 = function (a, b) {
        _super.prototype.u8.call(this, a, b);
        if (this.ajv(a)) {
            a.toolTip = null;
        }
    };
    Object.defineProperty(FinancialChart.prototype, "ahy", {
        get: function () {
            return this.ahx;
        },
        set: function (a) {
            var b = this.ahy;
            if (a != b) {
                this.ahx = a;
                this.vu("Toolbar", b, this.ahy);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ame", {
        get: function () {
            return this.al7;
        },
        set: function (a) {
            var b = this.ame;
            if (a != b) {
                this.al7 = a;
                this.vu("RangeSelectorTemplate", b, this.ame);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "amf", {
        get: function () {
            return this.al8;
        },
        set: function (a) {
            var b = this.amf;
            if (a != b) {
                this.al8 = a;
                this.vu("ToolbarTemplate", b, this.amf);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "amb", {
        get: function () {
            return this.al4;
        },
        set: function (a) {
            var b = this.amb;
            if (a != b) {
                this.al4 = a;
                this.vu("ChartTypePickerTemplate", b, this.amb);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "amg", {
        get: function () {
            return this.al9;
        },
        set: function (a) {
            var b = this.amg;
            if (a != b) {
                this.al9 = a;
                this.vu("TrendLineTypePickerTemplate", b, this.amg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "amh", {
        get: function () {
            return this.ama;
        },
        set: function (a) {
            var b = this.amh;
            if (a != b) {
                this.ama = a;
                this.vu("VolumeTypePickerTemplate", b, this.amh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "amc", {
        get: function () {
            return this.al5;
        },
        set: function (a) {
            var b = this.amc;
            if (a != b) {
                this.al5 = a;
                this.vu("IndicatorMenuTemplate", b, this.amc);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "amd", {
        get: function () {
            return this.al6;
        },
        set: function (a) {
            var b = this.amd;
            if (a != b) {
                this.al6 = a;
                this.vu("OverlayPickerTemplate", b, this.amd);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ajg", {
        get: function () {
            return this.ajf;
        },
        set: function (a) {
            var b = this.ajg;
            if (a != b) {
                this.ajf = a;
                this.vu("ZoomSlider", b, this.ajg);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.get_jx = function () {
        return _super.prototype.get_jx.call(this);
    };
    FinancialChart.prototype.set_jx = function (a) {
        _super.prototype.set_jx.call(this, a);
    };
    FinancialChart.prototype.get_g3 = function () {
        return _super.prototype.get_g3.call(this);
    };
    FinancialChart.prototype.set_g3 = function (a) {
        _super.prototype.set_g3.call(this, a);
    };
    Object.defineProperty(FinancialChart.prototype, "ak6", {
        get: function () {
            return this.akp;
        },
        set: function (a) {
            var b = this.ak6;
            if (a != b) {
                this.akp = a;
                this.vu("ToolbarHeight", b, this.ak6);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.z2 = function () {
        return this.xAxis;
    };
    FinancialChart.prototype.z3 = function () {
        return this.yAxis;
    };
    FinancialChart.prototype.onAttachedToUI = function () {
        _super.prototype.onAttachedToUI.call(this);
        if (this.ajg != null) {
            this.ajg.onAttachedToUI();
        }
    };
    FinancialChart.prototype.onDetachedFromUI = function () {
        _super.prototype.onDetachedFromUI.call(this);
        if (this.ajg != null) {
            this.ajg.onDetachedFromUI();
        }
    };
    FinancialChart.prototype.be = function (a) {
        return 20;
    };
    FinancialChart.prototype.get_hx = function () {
        return ((function () {
            var $ret = new List$1(DataSeriesType_$type, 0);
            $ret.add(20);
            return $ret;
        })());
    };
    Object.defineProperty(FinancialChart.prototype, "hx", {
        get: function () {
            return this.get_hx();
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.get_hw = function () {
        return ((function () {
            var $ret = new List$1(IDataSeriesAdapterRule_$type, 0);
            $ret.add(new SimpleFinancialPriceSeriesRule());
            $ret.add(new SubCollectionsRule());
            return $ret;
        })());
    };
    Object.defineProperty(FinancialChart.prototype, "hw", {
        get: function () {
            return this.get_hw();
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.ahk = function (a) {
        return this.ahl(a);
    };
    FinancialChart.prototype.aiy = function (a) {
        return this.aiz(a);
    };
    FinancialChart.prototype.ahj = function (a) {
        var b = this.ahk(0);
        b.name = a;
        return b;
    };
    FinancialChart.prototype.ug = function () {
        this.xAxis = this.ahj("xAxis");
        this.yAxis = this.aiy(0);
        this.yAxis.name = "yAxis";
        this.volumeAxis = this.aiy(0);
        this.volumeAxis.name = "volumeAxis";
        this.volumeXAxis = this.ahj("volumeXAxis");
        this.akc = new List$1(NumericYAxis.$, 0);
        this.ake = new List$1(CategoryAxisBase.$, 0);
        this.indicatorAxis = this.aiy(0);
        this.indicatorAxis.name = "indicatorAxis";
        this.indicatorXAxis = this.ahj("indicatorXAxis_0");
        this.akc.add(this.indicatorAxis);
        this.ake.add(this.indicatorXAxis);
        if (this.xAxis.az == null) {
            this.xAxis.az = new AxisLabelSettings();
        }
        if (this.yAxis.az == null) {
            this.yAxis.az = new AxisLabelSettings();
        }
        if (this.volumeAxis.az == null) {
            this.volumeAxis.az = new AxisLabelSettings();
        }
        if (this.volumeXAxis.az == null) {
            this.volumeAxis.az = new AxisLabelSettings();
        }
        if (this.indicatorAxis.az == null) {
            this.indicatorAxis.az = new AxisLabelSettings();
        }
        if (this.indicatorXAxis.az == null) {
            this.indicatorXAxis.az = new AxisLabelSettings();
        }
        this.zoomSliderAxis = this.aiy(0);
        this.zoomSliderAxis.name = "zoomSliderAxis";
        this.zoomSliderXAxis = this.ahj("zoomSliderXAxis");
        if (this.zoomSliderAxis.az == null) {
            this.zoomSliderAxis.az = new AxisLabelSettings();
        }
        if (this.zoomSliderXAxis.az == null) {
            this.zoomSliderXAxis.az = new AxisLabelSettings();
        }
    };
    FinancialChart.prototype.ua = function (a, b) {
        var c = typeCast(MarkerSeries.$, a);
        if (c != null) {
            c.w9 = this.c2(a, b);
        }
    };
    FinancialChart.prototype.c1 = function (a) {
        if (a != null) {
            return 1;
        }
        return _super.prototype.c1.call(this, a);
    };
    FinancialChart.prototype.wn = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.lo = true;
            this.yAxis.mm = 10;
        }
    };
    FinancialChart.prototype.wq = function () {
        this.yAxis.lo = this.aj5;
        this.yAxis.mm = this.al3;
    };
    FinancialChart.prototype.ah2 = function (a) {
        var b;
        if (this.ah0 == 0) {
            if (a == null || a.index > 0 || stringIsNullOrEmpty(a.getMemberPathFor(12))) {
                b = 4;
            }
            else {
                b = 2;
            }
        }
        else {
            b = this.ah0;
        }
        b = this.ah1(b);
        return b;
    };
    FinancialChart.prototype.ah1 = function (a) {
        if ((a == 1 || a == 2)) {
            if (TypeRegistrar.isRegistered("FinancialPriceSeries")) {
                return a;
            }
            a = 4;
        }
        if (a == 4) {
            if (TypeRegistrar.isRegistered("LineSeries")) {
                return a;
            }
            a = 3;
        }
        if (a == 3) {
            if (TypeRegistrar.isRegistered("ColumnSeries")) {
                return a;
            }
        }
        return a;
    };
    FinancialChart.prototype.aib = function (a) {
        if ((a == 2 || a == 3)) {
            if (TypeRegistrar.isRegistered("FinancialPriceSeries")) {
                return a;
            }
            a = 5;
        }
        if (a == 5) {
            if (TypeRegistrar.isRegistered("LineSeries")) {
                return a;
            }
            a = 6;
        }
        if (a == 6) {
            if (TypeRegistrar.isRegistered("AreaSeries")) {
                return a;
            }
            a = 4;
        }
        if (a == 4) {
            if (TypeRegistrar.isRegistered("ColumnSeries")) {
                return a;
            }
        }
        return a;
    };
    FinancialChart.prototype.ah4 = function (a) {
        if (a == 2) {
            if (TypeRegistrar.isRegistered("LineSeries")) {
                return a;
            }
            a = 3;
        }
        if (a == 3) {
            if (TypeRegistrar.isRegistered("AreaSeries")) {
                return a;
            }
            a = 1;
        }
        if (a == 1) {
            if (TypeRegistrar.isRegistered("ColumnSeries")) {
                return a;
            }
        }
        return a;
    };
    FinancialChart.prototype.amq = function (a) {
        var b = a.getMemberPathFor(14);
        if (stringIsNullOrEmpty(b)) {
            b = a.getMemberPathFor(11);
        }
        return b;
    };
    FinancialChart.prototype.ahl = function (axisType_) {
        if ((this.externalObject)) {
            return (this.externalObject.createXAxis(axisType_).i);
        }
        else {
            var a = void 0;
            switch (axisType_) {
                case 0:
                    if (TypeRegistrar.isRegistered("OrdinalTimeXAxis")) {
                        a = TypeRegistrar.create("OrdinalTimeXAxis");
                    }
                    else if (TypeRegistrar.isRegistered("TimeXAxis")) {
                        a = TypeRegistrar.create("TimeXAxis");
                    }
                    else {
                        throw new BaseError(1, "no valid axes loaded");
                    }
                    return a;
                case 1:
                    if (TypeRegistrar.isRegistered("TimeXAxis")) {
                        a = TypeRegistrar.create("TimeXAxis");
                    }
                    else if (TypeRegistrar.isRegistered("OrdinalTimeXAxis")) {
                        a = TypeRegistrar.create("OrdinalTimeXAxis");
                    }
                    else {
                        throw new BaseError(1, "no valid axes loaded");
                    }
                    return a;
            }
            return null;
        }
    };
    FinancialChart.prototype.aiz = function (axisType_) {
        if ((this.externalObject)) {
            return (this.externalObject.createYAxis(axisType_).i);
        }
        else {
            var a = void 0;
            switch (axisType_) {
                case 0:
                    if (TypeRegistrar.isRegistered("NumericYAxis")) {
                        a = TypeRegistrar.create("NumericYAxis");
                    }
                    else if (TypeRegistrar.isRegistered("PercentChangeYAxis")) {
                        a = TypeRegistrar.create("PercentChangeYAxis");
                    }
                    else {
                        throw new BaseError(1, "no valid axes loaded");
                    }
                    return a;
                case 1:
                    if (TypeRegistrar.isRegistered("PercentChangeYAxis")) {
                        a = TypeRegistrar.create("PercentChangeYAxis");
                    }
                    else if (TypeRegistrar.isRegistered("NumericYAxis")) {
                        a = TypeRegistrar.create("NumericYAxis");
                    }
                    else {
                        throw new BaseError(1, "no valid axes loaded");
                    }
                    return a;
            }
            return null;
        }
    };
    FinancialChart.prototype.ai5 = function () {
        return this.de(1);
    };
    FinancialChart.prototype.ai6 = function () {
        return this.de(0);
    };
    FinancialChart.prototype.ai4 = function () {
        return this.de(2);
    };
    FinancialChart.prototype.ai7 = function () {
        return this.de(20);
    };
    Object.defineProperty(FinancialChart.prototype, "ajo", {
        get: function () {
            return (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy"));
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aim", {
        get: function () {
            if (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")) {
                return TypeRegistrar.create("HorizontalAnchoredCategorySeriesProxy");
            }
            else {
                throw new BaseError(1, "horizontal series module is not loaded, but is required.");
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ajr", {
        get: function () {
            return (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy"));
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aik", {
        get: function () {
            if (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")) {
                return TypeRegistrar.create("FinancialPriceSeriesProxy");
            }
            else {
                throw new BaseError(1, "financial series module is not loaded, but is required.");
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ajp", {
        get: function () {
            return (TypeRegistrar.isRegistered("IndicatorProxy"));
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aio", {
        get: function () {
            if (TypeRegistrar.isRegistered("IndicatorProxy")) {
                return TypeRegistrar.create("IndicatorProxy");
            }
            else {
                throw new BaseError(1, "financial series module is not loaded, but is required.");
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ajq", {
        get: function () {
            return (TypeRegistrar.isRegistered("OverlayProxy"));
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ait", {
        get: function () {
            if (TypeRegistrar.isRegistered("OverlayProxy")) {
                return TypeRegistrar.create("OverlayProxy");
            }
            else {
                throw new BaseError(1, "overlay series module is not loaded, but is required.");
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.dc = function (a, b) {
        var c = this.amq(a);
        switch (this.ah2(a)) {
            case 3:
                var d = this.ai5();
                this.aim.setValueMemberPath(d, c);
                this.aim.setXAxis(d, this.xAxis);
                this.aim.setYAxis(d, this.yAxis);
                this.aim.setCategoryMode(d, 1);
                return d;
            case 4:
                var e = this.ai6();
                this.aim.setValueMemberPath(e, c);
                this.aim.setXAxis(e, this.xAxis);
                this.aim.setYAxis(e, this.yAxis);
                this.aim.setCategoryMode(e, 1);
                return e;
            default:
            case 1:
            case 2:
                var f = this.ai7();
                this.aik.setOpenMemberPath(f, a.getMemberPathFor(11));
                this.aik.setHighMemberPath(f, a.getMemberPathFor(12));
                this.aik.setLowMemberPath(f, a.getMemberPathFor(13));
                this.aik.setCloseMemberPath(f, a.getMemberPathFor(14));
                this.aik.setVolumeMemberPath(f, a.getMemberPathFor(15));
                this.aik.setXAxis(f, this.xAxis);
                this.aik.setYAxis(f, this.yAxis);
                this.aik.setDisplayType(f, this.ah0 == 1 ? 1 : 0);
                this.aik.setCategoryMode(f, 1);
                return f;
        }
    };
    FinancialChart.prototype.wp = function () {
        _super.prototype.wp.call(this);
        this.aph(this.xAxis);
        this.ap5(false);
        if (this.ah5 != 0 && this.volumeChart != null) {
            this.apo();
        }
        this.aph(this.volumeXAxis);
        this.aph(this.indicatorXAxis);
        this.ap2();
        this.ap4();
        if (this.aic != 0) {
            this.app();
            this.aph(this.zoomSliderXAxis);
        }
    };
    FinancialChart.prototype.afe = function (a, b) {
        var e_2, _a;
        _super.prototype.afe.call(this, a, b);
        a(this.volumeXAxis);
        if (this.ake != null) {
            try {
                for (var _b = __values(fromEnum(this.ake)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var c = _c.value;
                    a(c);
                }
            }
            catch (e_2_1) {
                e_2 = { error: e_2_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_2)
                        throw e_2.error;
                }
            }
        }
        var d = true;
        switch (b) {
            case "XAxisMajorStroke":
            case "XAxisMajorStrokeThickness":
                d = false;
                break;
        }
        if (d) {
            a(this.zoomSliderXAxis);
        }
    };
    FinancialChart.prototype.afj = function (a, b) {
        var e_3, _a;
        _super.prototype.afj.call(this, a, b);
        if (b) {
            a(this.volumeAxis);
            if (this.akc != null) {
                try {
                    for (var _b = __values(fromEnum(this.akc)), _c = _b.next(); !_c.done; _c = _b.next()) {
                        var c = _c.value;
                        a(c);
                    }
                }
                catch (e_3_1) {
                    e_3 = { error: e_3_1 };
                }
                finally {
                    try {
                        if (_c && !_c.done && (_a = _b.return))
                            _a.call(_b);
                    }
                    finally {
                        if (e_3)
                            throw e_3.error;
                    }
                }
            }
            a(this.zoomSliderAxis);
        }
    };
    FinancialChart.prototype.apl = function (a) {
        var b = typeCast(IZoomableCategoryAxis_$type, this.xAxis);
        if (b != null) {
            a(b);
        }
    };
    FinancialChart.prototype.afh = function (a) {
        _super.prototype.afh.call(this, a);
        this.ae8(this.volumeXAxis, a);
        this.ae8(this.indicatorXAxis, a);
        this.ae8(this.zoomSliderXAxis, a);
    };
    FinancialChart.prototype.afm = function (a) {
        _super.prototype.afm.call(this, a);
        this.ae8(this.volumeAxis, a);
        this.ae8(this.indicatorAxis, a);
        this.ae8(this.zoomSliderAxis, a);
    };
    FinancialChart.prototype.afk = function (a) {
        _super.prototype.afk.call(this, a);
        this.ae7(this.volumeAxis, a);
        this.ae7(this.indicatorAxis, a);
        this.ae7(this.zoomSliderAxis, a);
    };
    FinancialChart.prototype.aff = function (a) {
        _super.prototype.aff.call(this, a);
        this.ae7(this.volumeXAxis, a);
        this.ae7(this.indicatorXAxis, a);
        this.ae7(this.zoomSliderXAxis, a);
    };
    FinancialChart.prototype.u1 = function (a) {
        var _this = this;
        _super.prototype.u1.call(this, a);
        if (a == null) {
            return;
        }
        if (a == this.zoomSliderChart) {
            a.xg = a.xj = false;
            a.legend = null;
            if (this.dataChart != null) {
                a.ag = this.dataChart.ag;
                a.aj = this.dataChart.aj;
            }
        }
        else {
            SyncManager.d(a, ((function () {
                var $ret = new SyncSettings();
                $ret.syncChannel = _this.anl();
                $ret.synchronizeHorizontally = true;
                $ret.synchronizeVertically = false;
                return $ret;
            })()));
            SyncManager.c(a);
        }
        a.cw = 2;
    };
    FinancialChart.prototype.anl = function () {
        if (this.ami == null) {
            FinancialChart.al2++;
            this.ami = FinancialChart.al2.toString();
        }
        return this.ami;
    };
    FinancialChart.prototype.ao3 = function (a, b) {
        this.aop();
        this.apj();
    };
    FinancialChart.prototype.aop = function () {
        var e_4, _a;
        if (this.yAxis.b8()) {
            return;
        }
        var a = this.yAxis.aw.bd;
        if (this.ah5 != 0) {
            a = Math.max(a, this.volumeAxis.aw.bd);
        }
        try {
            for (var _b = __values(fromEnum(this.akc)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                a = Math.max(a, b.aw.bd);
            }
        }
        catch (e_4_1) {
            e_4 = { error: e_4_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_4)
                    throw e_4.error;
            }
        }
        this.aoq(a);
    };
    FinancialChart.prototype.aoq = function (a) {
        var e_5, _a;
        if (this.yAxis.b8()) {
            return;
        }
        this.yAxis.eu = this.volumeAxis.eu = a;
        try {
            for (var _b = __values(fromEnum(this.akc)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var b = _c.value;
                b.eu = a;
            }
        }
        catch (e_5_1) {
            e_5 = { error: e_5_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_5)
                    throw e_5.error;
            }
        }
        this.zoomSliderAxis.eu = this.yAxis.eu;
    };
    FinancialChart.prototype.aov = function (a) {
        if (this.indicatorCharts == null) {
            return;
        }
        for (var b = 0; b < this.indicatorCharts.count; b++) {
            var c = this.indicatorCharts._inner[b];
            for (var d = 0; d < c.series.count; d++) {
                var e = c.series._inner[d];
                if (!(this.ajt(e))) {
                    continue;
                }
                a(c.series._inner[d], b);
            }
        }
    };
    FinancialChart.prototype.aoy = function (a) {
        if (this.volumeChart == null) {
            return;
        }
        for (var b = 0; b < this.volumeChart.series.count; b++) {
            var c = this.volumeChart.series._inner[b];
            if (c.es) {
                continue;
            }
            a(this.volumeChart.series._inner[b], b);
        }
    };
    FinancialChart.prototype.aow = function (a) {
        if (this.dataChart == null) {
            return;
        }
        for (var b = 0; b < this.dataChart.series.count; b++) {
            var c = this.dataChart.series._inner[b];
            if (!this.ajv(c)) {
                continue;
            }
            a(c, b);
        }
    };
    FinancialChart.prototype.aox = function (a, b) {
        if (this.dataChart == null) {
            return;
        }
        for (var c = 0; c < this.dataChart.series.count; c++) {
            var d = this.dataChart.series._inner[c];
            if (this.ajv(d)) {
                continue;
            }
            var e = this.alw(d, c);
            a(d, e);
        }
        if (b) {
            this.aoz(a);
        }
    };
    FinancialChart.prototype.aoz = function (a) {
        if (this.zoomSliderChart == null) {
            return;
        }
        for (var b = 0; b < this.zoomSliderChart.series.count; b++) {
            var c = this.zoomSliderChart.series._inner[b];
            if (c.es) {
                continue;
            }
            a(this.zoomSliderChart.series._inner[b], b);
        }
    };
    FinancialChart.prototype.alw = function (a, b) {
        if (a.c9 != this.dataChart) {
            return b;
        }
        var c = this.bf == null || this.bf.dataSeries == null ? 0 : this.bf.dataSeries.count;
        var d = this.aig == null ? 0 : this.aig.count;
        return b - (c * d);
    };
    FinancialChart.prototype.uq = function (a) {
        _super.prototype.uq.call(this, a);
        this.aoy(a);
        this.aov(a);
        this.aoz(a);
    };
    Object.defineProperty(FinancialChart.prototype, "volumeChart", {
        get: function () {
            return this.ajb;
        },
        set: function (a) {
            var b = this.volumeChart;
            if (a != b) {
                this.ajb = a;
                this.vu("VolumeChart", b, this.volumeChart);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.apo = function () {
        if (this.dataChart == null) {
            return;
        }
        this.volumeChart.series.clear();
        var a = new List$1(Series.$, 0);
        var b = -1;
        for (var c = 0; c < this.dataChart.series.count; c++) {
            var d = this.dataChart.series._inner[c];
            if (this.ajv(d) || d.es) {
                continue;
            }
            b++;
            var e = void 0;
            var f = this.ah5;
            f = this.ah4(f);
            switch (f) {
                case 2:
                    e = this.ai6();
                    break;
                case 3:
                    e = this.ai4();
                    break;
                default:
                case 1:
                    e = this.ai5();
                    break;
            }
            this.aim.setCategoryMode(e, 1);
            e.name = "volumeSeries_" + b;
            e.itemsSource = d.itemsSource;
            this.aim.setXAxis(e, this.volumeXAxis);
            this.aim.setYAxis(e, this.volumeAxis);
            this.aim.setValueMemberPath(e, this.bf != null && this.bf.dataSeries != null && this.bf.dataSeries.count > b ? this.bf.dataSeries._inner[b].getMemberPathFor(15) : null);
            e.title = d.title + " Volume";
            e.ve = ArrayExtension.getModulus$1(Brush.$, this.ahd, b);
            e.vu = ArrayExtension.getModulus$1(Brush.$, this.ahe, b);
            e.jo = this.ak7;
            a.add(e);
        }
        var g = this.ht("volume", false);
        if (g != null) {
            a.o(g);
        }
        for (var h = 0; h < a.count; h++) {
            var i = a._inner[h];
            this.volumeChart.series.add(i);
            this.u6(i, h);
        }
    };
    FinancialChart.prototype.ajs = function (a) {
        if (!this.ajo) {
            return false;
        }
        return this.aim.matchesType(a);
    };
    FinancialChart.prototype.ajw = function (a) {
        if (!this.ajr) {
            return false;
        }
        return this.aik.matchesType(a);
    };
    FinancialChart.prototype.ajt = function (a) {
        if (!this.ajp) {
            return false;
        }
        return this.aio.matchesType(a);
    };
    FinancialChart.prototype.ajv = function (a) {
        if (!this.ajq) {
            return false;
        }
        return this.ait.matchesType(a);
    };
    FinancialChart.prototype.apn = function () {
        if (this.dataChart == null) {
            return;
        }
        var a = 0;
        var b = this.aie == null ? 0 : this.aie.count;
        var c = this.customIndicatorNames == null ? 0 : this.customIndicatorNames.count;
        var d = b + c;
        for (var e = 0; e < d; e++) {
            var f = new List$1(Series.$, 0);
            var g = this.indicatorCharts._inner[e];
            var h = e >= b;
            var i = h ? this.customIndicatorNames._inner[e - b] : EnumUtil.getName(FinancialIndicatorType_$type, this.aie._inner[e]);
            var j = -1;
            for (var k = 0; k < this.dataChart.series.count; k++) {
                var l = this.dataChart.series._inner[k];
                if (this.ajv(l) || l.es) {
                    continue;
                }
                j++;
                var m = void 0;
                if (h) {
                    var n = this.ai8("Custom");
                    this.aio.handleCustomIndicatorEvent(n, runOn(this, this.ao1));
                    m = n;
                }
                else {
                    m = this.aja(this.aie._inner[e]);
                }
                if (m == null) {
                    continue;
                }
                m.name = "indicator_" + a++;
                this.aio.setXAxis(m, this.ake._inner[e]);
                this.aio.setYAxis(m, this.akc._inner[e]);
                m.itemsSource = l.itemsSource;
                this.aio.setOpenMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(11));
                this.aio.setHighMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(12));
                this.aio.setLowMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(13));
                this.aio.setCloseMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(14));
                this.aio.setVolumeMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(15));
                m.title = l.title + " " + i;
                m.ve = ArrayExtension.getModulus$1(Brush.$, this.ag7, e);
                m.jo = this.ak3;
                if (this.ajt(m)) {
                    this.aio.setNegativeBrush(m, ArrayExtension.getModulus$1(Brush.$, this.ag8, e));
                    this.aio.setDisplayType(m, ArrayExtension.getModulus$1(IndicatorDisplayType_$type, this.aiq, e));
                }
                if (this.aly != -2147483648 && this.ajt(m)) {
                    this.aio.setPeriodOverride(m, this.aly);
                }
                if (this.ajt(m)) {
                    this.aio.setSmoothingPeriod(m, this.al1);
                }
                if (this.ajt(m)) {
                    this.aio.setSignalPeriod(m, this.al0);
                }
                if (this.ajt(m)) {
                    this.aio.setShortPeriod(m, this.alz);
                    this.aio.setLongPeriod(m, this.alx);
                }
                this.u6(m, e);
                f.add(m);
            }
            var o = this.ht(i, false);
            for (var p = 0; p < f.count; p++) {
                var q = f._inner[p];
                g.series.add(q);
            }
            if (o != null) {
                for (var r = 0; r < o.count; r++) {
                    var s = o._inner[r];
                    g.series.add(s);
                    this.u6(s, r);
                }
            }
        }
    };
    FinancialChart.prototype.ai8 = function (indicatorName_) {
        return (this.externalObject.createIndicator(indicatorName_ + 'Indicator').i);
    };
    FinancialChart.prototype.aja = function (a) {
        return this.ai8(EnumUtil.getName(FinancialIndicatorType_$type, a));
    };
    FinancialChart.prototype.ap5 = function (a) {
        if (this.ahy == null) {
            return;
        }
        var b = this.xAxis;
        if (b.actualMinimumValue > b.actualMaximumValue) {
            return;
        }
        this.ahy.as = b.actualMinimumValue;
        this.ahy.ar = b.actualMaximumValue;
        if (a) {
            this.ahy.au = b.visibleMinimum;
            this.ahy.at = b.visibleMaximum;
        }
        this.ahy.bn();
    };
    FinancialChart.prototype.lu = function () {
        var e_6, _a, e_7, _b;
        var _this = this;
        var a = ((function () {
            var $ret = new FinancialChartVisualData();
            $ret.mainChart = _super.prototype.lu.call(_this);
            $ret.volumeChart = _this.volumeChart == null ? null : _this.volumeChart.ys();
            $ret.toolbar = _this.ahy == null ? null : _this.ahy.aj();
            $ret.zoomChart = _this.zoomSliderChart == null ? null : _this.zoomSliderChart.ys();
            return $ret;
        })());
        if (this.indicatorCharts != null) {
            a.indicatorCharts = new List$1(Base.$, 0);
            try {
                for (var _c = __values(fromEnum(this.indicatorCharts)), _d = _c.next(); !_d.done; _d = _c.next()) {
                    var b = _d.value;
                    a.indicatorCharts.add1(b.ys());
                }
            }
            catch (e_6_1) {
                e_6 = { error: e_6_1 };
            }
            finally {
                try {
                    if (_d && !_d.done && (_a = _c.return))
                        _a.call(_c);
                }
                finally {
                    if (e_6)
                        throw e_6.error;
                }
            }
        }
        if (this.dataChart != null) {
            a.mainChartLeft = this.aqe(this.dataChart).x;
            a.mainChartTop = this.aqe(this.dataChart).y;
        }
        if (this.volumeChart != null) {
            a.volumeChartLeft = this.aqe(this.volumeChart).x;
            a.volumeChartTop = this.aqe(this.volumeChart).y;
        }
        if (this.zoomSliderChart != null) {
            a.zoomChartLeft = this.aqe(this.zoomSliderChart).x;
            a.zoomChartTop = this.aqe(this.zoomSliderChart).y;
        }
        if (this.ahy != null) {
            var c = this.aqf(this.ahy);
            a.toolbarLeft = c.left;
            a.toolbarTop = c.top;
            a.toolbarWidth = c.width;
            a.toolbarHeight = c.height;
        }
        if (this.indicatorCharts != null) {
            a.indicatorChartLefts = new List$1(Number_$type, 0);
            a.indicatorChartTops = new List$1(Number_$type, 0);
            try {
                for (var _e = __values(fromEnum(this.indicatorCharts)), _f = _e.next(); !_f.done; _f = _e.next()) {
                    var d = _f.value;
                    a.indicatorChartLefts.add(this.aqe(d).x);
                    a.indicatorChartTops.add(this.aqe(d).y);
                }
            }
            catch (e_7_1) {
                e_7 = { error: e_7_1 };
            }
            finally {
                try {
                    if (_f && !_f.done && (_b = _e.return))
                        _b.call(_e);
                }
                finally {
                    if (e_7)
                        throw e_7.error;
                }
            }
        }
        var e = this.aqh();
        a.legendLeft = e.left;
        a.legendTop = e.top;
        a.legendWidth = e.width;
        a.legendHeight = e.height;
        a.legend = this.aii == null ? null : this.aii.exportVisualData();
        return a;
    };
    FinancialChart.prototype.amn = function () {
        var a = this.lu();
        a.scaleByViewport();
        return a.serialize();
    };
    FinancialChart.prototype.ai9 = function (overlayName_) {
        return (this.externalObject.createOverlay(overlayName_ + 'Overlay').i);
    };
    FinancialChart.prototype.ap4 = function () {
        var e_8, _a, e_9, _b;
        if (this.dataChart == null) {
            return;
        }
        var a = new List$1(Series.$, 0);
        try {
            for (var _c = __values(fromEnum(this.dataChart.series)), _d = _c.next(); !_d.done; _d = _c.next()) {
                var b = _d.value;
                if (this.ajv(b)) {
                    a.add(b);
                }
            }
        }
        catch (e_8_1) {
            e_8 = { error: e_8_1 };
        }
        finally {
            try {
                if (_d && !_d.done && (_a = _c.return))
                    _a.call(_c);
            }
            finally {
                if (e_8)
                    throw e_8.error;
            }
        }
        try {
            for (var _e = __values(fromEnum(a)), _f = _e.next(); !_f.done; _f = _e.next()) {
                var c = _f.value;
                this.dataChart.series.remove(c);
            }
        }
        catch (e_9_1) {
            e_9 = { error: e_9_1 };
        }
        finally {
            try {
                if (_f && !_f.done && (_b = _e.return))
                    _b.call(_e);
            }
            finally {
                if (e_9)
                    throw e_9.error;
            }
        }
        if (this.aig == null) {
            return;
        }
        var d = new List$1(Series.$, 0);
        var e = -1;
        for (var f = 0; f < this.dataChart.series.count; f++) {
            var g = this.dataChart.series._inner[f];
            if (this.ajv(g) || g.es) {
                continue;
            }
            e++;
            for (var h = 0; h < this.aig.count; h++) {
                var i = this.aig._inner[h];
                var j = void 0;
                switch (i) {
                    case 1:
                        j = this.ai9(EnumUtil.getName(FinancialOverlayType_$type, i));
                        break;
                    default:
                    case 0:
                        j = this.ai9(EnumUtil.getName(FinancialOverlayType_$type, i));
                        break;
                }
                j.name = g.name + "_" + EnumUtil.getName(FinancialOverlayType_$type, i);
                this.ait.setXAxis(j, this.xAxis);
                this.ait.setYAxis(j, this.yAxis);
                j.itemsSource = g.itemsSource;
                var k = e * this.aig.count + h;
                j.ve = ArrayExtension.getModulus$1(Brush.$, this.ahb, k);
                j.vu = ArrayExtension.getModulus$1(Brush.$, this.ahc, k);
                j.jo = this.ak5;
                j.title = g.title + " " + EnumUtil.getName(FinancialOverlayType_$type, i);
                var l = g;
                if (l == null) {
                    continue;
                }
                var m = this.bf.dataSeries._inner[e];
                this.ait.setOpenMemberPath(j, m.getMemberPathFor(11));
                this.ait.setHighMemberPath(j, m.getMemberPathFor(12));
                this.ait.setLowMemberPath(j, m.getMemberPathFor(13));
                this.ait.setCloseMemberPath(j, m.getMemberPathFor(14));
                this.ait.setVolumeMemberPath(j, m.getMemberPathFor(15));
                d.add(j);
            }
        }
        var n = new Array(this.dataChart.series.count);
        this.dataChart.series.copyTo(n, 0);
        this.dataChart.skipDataCleanup = true;
        this.dataChart.series.clear();
        this.dataChart.skipDataCleanup = false;
        for (var o = 0; o < n.length; o++) {
            n[o].index = -1;
        }
        d.o(n);
        for (var p = 0; p < d.count; p++) {
            var q = d._inner[p];
            this.dataChart.series.add(q);
            this.u6(q, p);
        }
    };
    FinancialChart.prototype.ap2 = function () {
        var e_10, _a;
        if (this.aj1) {
            return;
        }
        this.aj1 = true;
        if (this.indicatorCharts != null) {
            var a = this.indicatorCharts;
            this.indicatorCharts = null;
            try {
                for (var _b = __values(fromEnum(a)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var b = _c.value;
                    this.api(b);
                }
            }
            catch (e_10_1) {
                e_10 = { error: e_10_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_10)
                        throw e_10.error;
                }
            }
        }
        if ((this.aie == null || this.aie.count == 0) && (this.customIndicatorNames == null || this.customIndicatorNames.count == 0)) {
            this.indicatorCharts = null;
            if (this.akc != null) {
                this.akc.clear();
            }
            if (this.ake != null) {
                this.ake.clear();
            }
            this.apt();
            this.ap3();
            this.aj1 = false;
            return;
        }
        if (this.indicatorCharts == null) {
            this.indicatorCharts = new List$1(XamDataChart.$, 0);
        }
        this.indicatorCharts.clear();
        this.akc.clear();
        this.ake.clear();
        var c = this.aie == null ? 0 : this.aie.count;
        var d = this.customIndicatorNames == null ? 0 : this.customIndicatorNames.count;
        var e = c + d;
        for (var f = 0; f < e; f++) {
            var g = new XamDataChart();
            this.indicatorCharts.add(g);
            this.apg(g, null);
            var h = f >= c;
            if (h) {
                g.l3 = this.customIndicatorNames._inner[f - c];
            }
            else {
                g.l3 = this.amp(this.aie._inner[f]);
            }
            if (this.indicatorAxis != null) {
                var i = void 0;
                var j = void 0;
                if (f == 0) {
                    i = this.indicatorAxis;
                    j = this.indicatorXAxis;
                }
                else {
                    i = new NumericYAxis();
                    if (!this.indicatorXAxis.ce) {
                        j = this.ahk(0);
                    }
                    else {
                        j = this.ahk(1);
                    }
                }
                j.name = "indicatorXAxis_" + f;
                i.name = "indicatorAxis_" + f;
                g.axes.add(i);
                g.axes.add(j);
                this.akc.add(i);
                this.ake.add(j);
                if (this.gh) {
                    this.afb(i);
                }
                if (this.gh) {
                    this.ae9(j);
                }
            }
        }
        this.apt();
        this.apn();
        if (this.ahy != null) {
            this.ahy.ae = this.aie;
        }
        this.aor();
        this.ap3();
        this.aj1 = false;
    };
    FinancialChart.prototype.uy = function () {
        var e_11, _a, e_12, _b;
        _super.prototype.uy.call(this);
        this.ae9(this.xAxis);
        this.ae9(this.volumeXAxis);
        if (this.ake != null) {
            try {
                for (var _c = __values(fromEnum(this.ake)), _d = _c.next(); !_d.done; _d = _c.next()) {
                    var a = _d.value;
                    this.ae9(a);
                }
            }
            catch (e_11_1) {
                e_11 = { error: e_11_1 };
            }
            finally {
                try {
                    if (_d && !_d.done && (_a = _c.return))
                        _a.call(_c);
                }
                finally {
                    if (e_11)
                        throw e_11.error;
                }
            }
        }
        this.afb(this.yAxis);
        this.afb(this.volumeAxis);
        if (this.akc != null) {
            try {
                for (var _e = __values(fromEnum(this.akc)), _f = _e.next(); !_f.done; _f = _e.next()) {
                    var b = _f.value;
                    this.afb(b);
                }
            }
            catch (e_12_1) {
                e_12 = { error: e_12_1 };
            }
            finally {
                try {
                    if (_f && !_f.done && (_b = _e.return))
                        _b.call(_e);
                }
                finally {
                    if (e_12)
                        throw e_12.error;
                }
            }
        }
        this.ae9(this.zoomSliderXAxis);
        this.afb(this.zoomSliderAxis);
    };
    FinancialChart.prototype.get_ha = function () {
        return !this.ajz;
    };
    Object.defineProperty(FinancialChart.prototype, "aj7", {
        get: function () {
            return (this.externalObject._dynamicContent);
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.aqa = function (a, b) {
        this.apw(a, b, this.alo);
        this.aor();
        if (this.zoomSliderChart != null) {
            this.zoomSliderChart.axes.add(this.zoomSliderAxis);
            this.zoomSliderChart.axes.add(this.zoomSliderXAxis);
        }
        this.app();
        this.zoomSliderXAxis.itemsSource = this.xAxis.itemsSource;
        this.apu();
        this.aqb(a, b);
    };
    FinancialChart.prototype.app = function () {
        if (this.dataChart == null || this.zoomSliderChart == null) {
            return;
        }
        this.zoomSliderChart.series.clear();
        var a = new List$1(Series.$, 0);
        for (var b = 0; b < this.dataChart.series.count; b++) {
            var c = this.dataChart.series._inner[b];
            if (this.ajv(c) || c.es) {
                continue;
            }
            var d = void 0;
            var e = this.aic;
            e = this.aib(e);
            var f = this.alw(c, b);
            if (e == 1) {
                switch (this.ah2(this.bf != null && this.bf.dataSeries != null && this.bf.dataSeries.count > f ? this.bf.dataSeries._inner[f] : null)) {
                    case 1:
                        e = 2;
                        break;
                    case 2:
                        e = 3;
                        break;
                    case 3:
                        e = 4;
                        break;
                    case 4:
                        e = 5;
                        break;
                }
            }
            switch (e) {
                case 2:
                    d = this.ai7();
                    this.aik.setDisplayType(d, 1);
                    break;
                case 3:
                    d = this.ai7();
                    this.aik.setDisplayType(d, 0);
                    break;
                case 5:
                    d = this.ai6();
                    break;
                case 6:
                    d = this.ai4();
                    break;
                default:
                case 4:
                    d = this.ai5();
                    break;
            }
            var g = this.bf != null && this.bf.dataSeries != null && this.bf.dataSeries.count > f ? this.bf.dataSeries._inner[f] : null;
            if (d.ey && !d.e6) {
                this.aim.setCategoryMode(d, 1);
                this.aim.setXAxis(d, this.zoomSliderXAxis);
                this.aim.setYAxis(d, this.zoomSliderAxis);
                this.aim.setValueMemberPath(d, g == null ? null : this.amq(g));
            }
            else if (d.e6) {
                this.aik.setCategoryMode(d, 1);
                this.aik.setXAxis(d, this.zoomSliderXAxis);
                this.aik.setYAxis(d, this.zoomSliderAxis);
                if (g != null) {
                    this.aik.setOpenMemberPath(d, g.getMemberPathFor(11));
                    this.aik.setHighMemberPath(d, g.getMemberPathFor(12));
                    this.aik.setLowMemberPath(d, g.getMemberPathFor(13));
                    this.aik.setCloseMemberPath(d, g.getMemberPathFor(14));
                    this.aik.setVolumeMemberPath(d, g.getMemberPathFor(15));
                }
            }
            d.name = "zoomSliderSeries_" + f;
            d.itemsSource = c.itemsSource;
            d.title = c.title;
            d.jo = this.kb;
            a.add(d);
        }
        for (var h = 0; h < a.count; h++) {
            var i = a._inner[h];
            this.zoomSliderChart.series.add(i);
            this.u6(i, h);
        }
    };
    FinancialChart.prototype.vm = function (a, b, c) {
        var e_13, _a;
        _super.prototype.vm.call(this, a, b, c);
        if (a == null || !b) {
            return;
        }
        var d = true;
        var e = true;
        switch (c) {
            case "Brushes":
            case "Outlines":
                d = e = false;
                break;
        }
        if (this.indicatorCharts != null && d) {
            try {
                for (var _b = __values(fromEnum(this.indicatorCharts)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var f = _c.value;
                    a(f);
                }
            }
            catch (e_13_1) {
                e_13 = { error: e_13_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_13)
                        throw e_13.error;
                }
            }
        }
        if (this.volumeChart != null && e) {
            a(this.volumeChart);
        }
        if (this.zoomSliderChart != null) {
            a(this.zoomSliderChart);
        }
    };
    FinancialChart.prototype.ao1 = function (a, b) {
        var c = b;
        var d = a;
        var e = -1;
        if (this.indicatorCharts != null) {
            e = this.indicatorCharts.indexOf(d.c9);
        }
        e -= this.aie == null ? 0 : this.aie.count;
        if (this.applyCustomIndicators != null) {
            this.applyCustomIndicators(this, new FinancialChartCustomIndicatorArgs(c, d, e));
        }
    };
    FinancialChart.prototype.apy = function (a, b, c) {
        if (a != null) {
            if (b != null) {
                a.axes.remove(b);
            }
            a.axes.add(c);
        }
        if (this.gh) {
            this.ae9(c);
        }
    };
    Object.defineProperty(FinancialChart.prototype, "aj6", {
        get: function () {
            return TypeRegistrar.isRegistered("IgxZoomSliderComponent");
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.ao2 = function (a, b) {
        this.ap2();
    };
    FinancialChart.prototype.ajx = function (a, b) {
        if (b <= (0)) {
            return false;
        }
        switch (a) {
            case 5: return true;
            case 4:
            case 3: return b >= timeSpanFromDays(365);
            case 2: return b >= timeSpanFromDays(180);
            case 1: return b >= timeSpanFromDays(90);
            case 0: return b >= timeSpanFromDays(30);
        }
        return false;
    };
    FinancialChart.prototype.aps = function () {
        var e_14, _a;
        var a = this.ahw != null ? this.ahw : new FinancialChartRangeSelectorOptionCollection(1, [5, 4, 3, 2, 1, 0]);
        var b = new FinancialChartRangeSelectorOptionCollection(0);
        var c = this.xAxis;
        var d = +(c.actualMaximumValue) - +(c.actualMinimumValue);
        try {
            for (var _b = __values(fromEnum(a)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var e = _c.value;
                if (this.ajx(e, d)) {
                    b.add(e);
                }
            }
        }
        catch (e_14_1) {
            e_14 = { error: e_14_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_14)
                    throw e_14.error;
            }
        }
        this.ahv = b;
        if (this.ahy != null) {
            this.ahy.u = this.ahv;
        }
    };
    FinancialChart.prototype.ao6 = function (a, b) {
        this.aps();
    };
    FinancialChart.prototype.apb = function (a, b) {
        this.aig = this.ahy.ag;
    };
    FinancialChart.prototype.apa = function (a, b) {
        this.aie = this.ahy.ae;
    };
    FinancialChart.prototype.ao4 = function (a, b) {
        this.ap2();
    };
    FinancialChart.prototype.ao5 = function (a, b) {
        this.ap4();
    };
    FinancialChart.prototype.apf = function (a, b) {
        var c = a;
        if (c.bg == null) {
            return;
        }
        if (this.ajz) {
            this.apr(c.bg);
        }
    };
    FinancialChart.prototype.api = function (a) {
        SyncManager.e(a);
        a.axes.clear();
        a.series.clear();
        a.gridAreaRectChanged = delegateRemove(a.gridAreaRectChanged, runOn(this, this.ao3));
        a.provideContainer(null);
        if (this.volumeChart == null && this.indicatorCharts == null) {
            this.yAxis.eu = this.volumeAxis.eu = this.indicatorAxis.eu = 0;
            this.xAxis.az.visibility = this.agx;
        }
    };
    FinancialChart.prototype.apg = function (a, b) {
        var c = a != this.zoomSliderChart;
        if (c) {
            if (this.dataChart != null) {
                a.wl = new Rect(0, this.dataChart.v4.x, a.wl.y, this.dataChart.v4.width, a.wl.height);
            }
            var d = ((function () {
                var $ret = new SyncSettings();
                $ret.syncChannel = "one";
                $ret.synchronizeHorizontally = true;
                $ret.synchronizeVertically = false;
                return $ret;
            })());
            SyncManager.d(a, d);
            SyncManager.c(a);
        }
        a.gridAreaRectChanged = delegateCombine(a.gridAreaRectChanged, runOn(this, this.ao3));
        this.u0(a, b);
    };
    FinancialChart.prototype.aor = function () {
        if (this.indicatorCharts != null || this.volumeChart != null) {
            this.ae7(this.xAxis, function (a) { return a.visibility = 1; });
        }
        var _loop_1 = function (a) {
            var b = this_1.ake._inner[a];
            var c = a < this_1.ake.count - 1 || this_1.volumeChart != null;
            this_1.ae7(b, function (d) { return d.visibility = c ? 1 : 0; });
        };
        var this_1 = this;
        for (var a = 0; a < this.ake.count; a++) {
            _loop_1(a);
        }
    };
    FinancialChart.prototype.apw = function (a, b, c) {
        if (a != null) {
            this.api(a);
        }
        if (b != null) {
            this.apg(b, c);
        }
    };
    FinancialChart.prototype.ap8 = function (a, b) {
        this.apw(a, b, this.aln);
        this.aor();
        if (this.volumeChart != null) {
            if (this.volumeAxis != null) {
                this.volumeChart.axes.add(this.volumeAxis);
                this.volumeChart.axes.add(this.volumeXAxis);
            }
            this.apo();
            this.volumeXAxis.itemsSource = this.xAxis.itemsSource;
        }
        this.ap9(a, b);
    };
    FinancialChart.prototype.ao7 = function (a, b) {
        this.ap6();
    };
    FinancialChart.prototype.ap6 = function () {
        if (this.ahy == null || +(this.ahy.au) == +(dateMaxValue()) || +(this.ahy.at) == +(dateMinValue()) || this.dataChart == null) {
            return;
        }
        var a = this.xAxis;
        var b = a.getWindowRectForSelection(this.ahy.au, this.ahy.at);
        if (b.width == 0 || isNaN_(b.width) || isInfinity(b.width)) {
            return;
        }
        this.aj0 = true;
        this.dataChart.wl = new Rect(0, b.left, this.dataChart.wl.top, b.width, this.dataChart.wl.height);
        if (this.ajg != null) {
            this.ajg.windowRect = this.dataChart.v4;
        }
        if (this.ajz) {
            this.apr(this.dataChart);
        }
        this.aj0 = false;
    };
    FinancialChart.prototype.ape = function (a, b) {
        this.aps();
        this.ap5(!this.aj0);
    };
    FinancialChart.prototype.ao0 = function (a, b) {
        var _this = this;
        if (!this.aj0) {
            if (this.ajz) {
                this.apr(a);
            }
            var c = false;
            var d = this.v2(function () { return _this.ap5(true); }, c);
            c = d.p1;
            if (this.ajg != null) {
                this.ajg.windowRect = this.dataChart.v4;
            }
        }
    };
    FinancialChart.prototype.ap0 = function (a, b, c, d) {
        var e_15, _a;
        if (a == null || b == null) {
            return;
        }
        if (c != -1) {
            this.aj0 = true;
            a.wl = new Rect(0, d, a.v4.top, c, a.v4.height);
            this.aj0 = false;
        }
        var e = 1.7976931348623157E+308;
        var f = -1.7976931348623157E+308;
        var g = new Rect(0, 0, 0, 1, 1);
        var h = new ScalerParams(0, g, g, this.yAxis.ch, a.v8);
        try {
            for (var _b = __values(fromEnum(a.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var i = _c.value;
                h.b = i.ix();
                var j = i.az(a.v4);
                var k = j == null || j.c == 1.7976931348623157E+308 || isNaN_(j.c);
                if (k) {
                    continue;
                }
                var l = b.el(j.c, h);
                var m = b.el(j.b, h);
                f = Math.max(f, l);
                e = Math.min(e, m);
            }
        }
        catch (e_15_1) {
            e_15 = { error: e_15_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_15)
                    throw e_15.error;
            }
        }
        var n = a.v4.width;
        if (c != -1) {
            n = c;
        }
        var o = a.v4.left;
        if (d != -1) {
            o = d;
        }
        if (e == 1.7976931348623157E+308 || f == -1.7976931348623157E+308 || isNaN_(e) || isNaN_(f)) {
            return;
        }
        this.aj0 = true;
        var p = new Rect(0, o, e, n, f - e);
        a.wl = p;
        this.aj0 = false;
    };
    FinancialChart.prototype.apz = function (a) {
        if (a == null) {
            return;
        }
        if (a == this.dataChart) {
            this.ap0(this.dataChart, this.yAxis, -1, -1);
            if (this.volumeChart != null) {
                this.ap0(this.volumeChart, this.volumeAxis, this.dataChart.v4.width, this.dataChart.v4.left);
            }
        }
        else if (a == this.volumeChart) {
            this.ap0(this.volumeChart, this.volumeAxis, -1, -1);
            this.ap0(this.dataChart, this.yAxis, this.volumeChart.v4.width, this.volumeChart.v4.left);
        }
    };
    FinancialChart.prototype.apr = function (a) {
        var _this = this;
        this.v1(function () { return _this.apz(a); });
    };
    FinancialChart.prototype.ao8 = function (a, b) {
        if (this.ajz) {
            this.apr(a);
        }
    };
    FinancialChart.prototype.ap7 = function () {
        if (!this.aj7) {
            return;
        }
        this.aou();
        if (this.aic == 0) {
            this.resetZoom();
            this.zoomSliderChart = null;
            this.alo.rootWrapper.removeChildren();
        }
        else if (this.zoomSliderChart == null) {
            this.zoomSliderChart = ((function () {
                var $ret = new XamDataChart();
                $ret.name = "ZoomSliderChart";
                return $ret;
            })());
            this.apu();
        }
        else {
            this.app();
        }
    };
    FinancialChart.prototype.aou = function () {
        var container_ = this.alo.rootWrapper.getNativeElement();
        var containerParent_ = container_.parentElement;
        if (this.ajg != null && containerParent_ != null && !this.aj8) {
            this.aj8 = true;
            if (TypeRegistrar.isRegistered("IgxZoomSliderComponent")) {
                var z_ = this.ajg;
                var f_ = this.externalObject;
                var sliderComponent_ = TypeRegistrar.get("IgxZoomSliderComponent");
                var sliderInstance_ = TypeRegistrar.create("IgxZoomSliderComponent");
                sliderInstance_._implementation = z_;
                sliderComponent_._staticStyling(container_, sliderInstance_, f_);
            }
        }
    };
    FinancialChart.prototype.ap1 = function () {
        var _this = this;
        if (this.ah7 != 1) {
            return;
        }
        this.afd(function (a) {
            var e_16, _a;
            var b;
            b = a.breaks;
            b.clear();
            if (_this.xAxisBreaks == null) {
                return;
            }
            try {
                for (var _b = __values(fromEnum(_this.xAxisBreaks)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var c = _c.value;
                    b.add(c);
                }
            }
            catch (e_16_1) {
                e_16 = { error: e_16_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_16)
                        throw e_16.error;
                }
            }
        });
    };
    FinancialChart.prototype.wu = function (a, b, c) {
        _super.prototype.wu.call(this, a, b, c);
        if (this.bf.dataSeries.count > 0) {
            if (this.ah7 == 1 && stringIsNullOrEmpty(this.no)) {
                this.ce.setXMemberPath(a, c.getMemberPathFor(17));
            }
            if (stringIsNullOrEmpty(this.nq)) {
                this.ce.setYMemberPath(a, this.amq(c));
            }
            if (stringIsNullOrEmpty(this.nb)) {
                this.ce.setLabelMemberPath(a, this.amq(c));
            }
            if (stringIsNullOrEmpty(this.m7)) {
                this.ce.setContentMemberPath(a, this.amq(c));
            }
        }
    };
    FinancialChart.prototype.amp = function (a) {
        switch (a) {
            case 0: return "Absolute Volume Oscillator";
            case 1: return "Accumulation/Distribution Indicator";
            case 2: return "Average Directional Index";
            case 3: return "Average True Range Indicator";
            case 4: return "Bollinger Bandwidth";
            case 5: return "Chaikin Oscillator";
            case 6: return "Chaikin Volatility Indicator";
            case 7: return "Commodity Channel Index";
            case 8: return "Detrended Price Oscillator";
            case 9: return "Ease of Movement Indicator";
            case 10: return "Fast Stochastic Oscillator";
            case 11: return "Force Index Indicator";
            case 12: return "Full Stochastic Oscillator";
            case 13: return "Market Facilitation Index";
            case 14: return "Mass Index Indicator";
            case 15: return "Median Price Indicator";
            case 16: return "Money Flow Index";
            case 17: return "MACD Indicator";
            case 18: return "Negative Volume Index";
            case 19: return "On Balance Volume Indicator";
            case 20: return "Percentage Price Oscillator";
            case 21: return "Percentage Volume Oscillator";
            case 22: return "Positive Volume Index";
            case 23: return "Price Volume Trend";
            case 24: return "ROC - Rate of Change Indicator";
            case 25: return "RSI - Relative Strength Index";
            case 26: return "Slow Stochastic Oscillator";
            case 27: return "Standard Deviation Indicator";
            case 28: return "Stoch RSI";
            case 29: return "TRIX Indicator";
            case 30: return "Typical Price Indicator";
            case 31: return "Ultimate Oscillator";
            case 32: return "Weighted Close Indicator";
            case 33: return "Williams %R Indicator";
            default: return "Unknown";
        }
    };
    FinancialChart.prototype.ae9 = function (a) {
        var e_17, _a;
        var _this = this;
        _super.prototype.ae9.call(this, a);
        var b = a;
        this.aph(b);
        if (a.bg != null) {
            try {
                for (var _b = __values(fromEnum(a.bg.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var c = _c.value;
                    if (this.ajs(c)) {
                        this.aim.setXAxis(c, b);
                    }
                    else if (this.ajw(c)) {
                        this.aik.setXAxis(c, b);
                    }
                    else if (this.ajt(c)) {
                        this.aio.setXAxis(c, b);
                    }
                    else if (this.ajv(c)) {
                        this.ait.setXAxis(c, b);
                    }
                }
            }
            catch (e_17_1) {
                e_17 = { error: e_17_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_17)
                        throw e_17.error;
                }
            }
        }
        this.apl(function (d) {
            d.zoomMaximumCategoryRange = _this.ak8;
            d.zoomMaximumItemSpan = _this.ak9;
            d.zoomToCategoryRange = _this.ala;
            d.zoomToCategoryStart = _this.alb;
            d.zoomToItemSpan = _this.alc;
        });
        var d = a == this.zoomSliderXAxis;
        if (d) {
            a.jz = this.aqd;
            a.et = this.alj;
            this.ae7(a, function (e) { return e.visibility = 1; });
        }
        var e = a;
        e.minimumValue = this.akk;
        e.maximumValue = this.akj;
        a.b1 = this.aj2;
    };
    FinancialChart.prototype.afb = function (a) {
        var e_18, _a;
        _super.prototype.afb.call(this, a);
        if (a.bg != null && a == this.yAxis) {
            try {
                for (var _b = __values(fromEnum(a.bg.series)), _c = _b.next(); !_c.done; _c = _b.next()) {
                    var b = _c.value;
                    if (this.ajs(b)) {
                        this.aim.setYAxis(b, this.yAxis);
                    }
                    else if (this.ajw(b)) {
                        this.aik.setYAxis(b, this.yAxis);
                    }
                    else if (this.ajt(b)) {
                        this.aio.setYAxis(b, this.yAxis);
                    }
                    else if (this.ajv(b)) {
                        this.ait.setYAxis(b, this.yAxis);
                    }
                }
            }
            catch (e_18_1) {
                e_18 = { error: e_18_1 };
            }
            finally {
                try {
                    if (_c && !_c.done && (_a = _b.return))
                        _a.call(_b);
                }
                finally {
                    if (e_18)
                        throw e_18.error;
                }
            }
        }
        a.lf = this.aj3;
        a.mc = this.alh;
        a.mb = this.alg;
        if (a == this.yAxis) {
            a.l8 = this.alf;
        }
        var c = a == this.zoomSliderAxis;
        if (c) {
            this.ae7(a, function (d) { return d.visibility = 1; });
        }
        a.b1 = this.aj4;
    };
    FinancialChart.prototype.aph = function (a) {
        a.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        a.f2 = XYChart.acw(a, this.bf.dataSeries);
        if (this.bf.dataSeries.count > 0) {
            var b = this.bf.dataSeries._inner[0].getMemberPathFor(17);
            a.h1(b);
        }
    };
    FinancialChart.prototype.u6 = function (a, b) {
        if (a == null) {
            return;
        }
        var c = this.zoomSliderChart == a.c9;
        var d = this.dataChart != null && this.dataChart.series.contains(a);
        if (d && !a.es && !this.ajv(a)) {
            a.l2 = "Financial Series";
        }
        _super.prototype.u6.call(this, a, b);
        if ((d || c) && a.fl) {
            a.r2(this.ag9 != null ? ArrayExtension.getModulus$1(Brush.$, this.ag9, b) : null, this.aha != null ? ArrayExtension.getModulus$1(Brush.$, this.aha, b) : null);
        }
        var e = this.ajt(a);
        if (this.ajv(a)) {
            a.ve = this.ahb != null ? ArrayExtension.getModulus$1(Brush.$, this.ahb, b) : null;
            a.vu = this.ahc != null ? ArrayExtension.getModulus$1(Brush.$, this.ahc, b) : null;
            a.jo = this.ak5;
        }
        else if (e) {
            a.ve = this.ag7 != null ? ArrayExtension.getModulus$1(Brush.$, this.ag7, b) : null;
            a.jo = this.ak3;
        }
        else if (!a.es && (d || c)) {
            a.ve = this.z != null ? ArrayExtension.getModulus$1(Brush.$, this.z, b) : null;
            a.vu = this.ad != null ? ArrayExtension.getModulus$1(Brush.$, this.ad, b) : null;
        }
        var f = this.volumeChart != null && this.volumeChart == a.c9;
        if (f) {
            a.jo = this.ak7;
        }
        a.legend = c || f || e || !a.isUsableInLegend ? null : this.legend != null ? this.legend : this.aju ? this.aii : null;
    };
    FinancialChart.prototype.u7 = function (a, b) {
        _super.prototype.u7.call(this, a, b);
        if (a == null) {
            return;
        }
    };
    FinancialChart.prototype.vu = function (a, b, c) {
        var e_19, _a, e_20, _b;
        var _this = this;
        _super.prototype.vu.call(this, a, b, c);
        switch (a) {
            case "YAxisIsLogarithmic":
                this.yAxis.lo = this.aj5;
                if (this.volumeAxis != null) {
                    this.volumeAxis.lo = this.aj5;
                }
                if (this.zoomSliderAxis != null) {
                    this.zoomSliderAxis.lo = this.aj5;
                }
                break;
            case "YAxisLogarithmBase":
                this.yAxis.mm = this.al3;
                if (this.volumeAxis != null) {
                    this.volumeAxis.mm = this.al3;
                }
                if (this.zoomSliderAxis != null) {
                    this.zoomSliderAxis.mm = this.al3;
                }
                break;
            case "VolumeType":
                var d = EnumUtil.getEnumValue(FinancialChartVolumeType_$type, b);
                if (this.ah5 == 0) {
                    this.volumeChart = null;
                }
                else if (this.volumeChart == null) {
                    this.volumeChart = ((function () {
                        var $ret = new XamDataChart();
                        $ret.name = "VolumeChart";
                        return $ret;
                    })());
                }
                else {
                    this.apo();
                }
                break;
            case "VolumeChart":
                this.ap8(typeCast(XamDataChart.$, b), typeCast(XamDataChart.$, c));
                break;
            case "DataChart":
                if (typeCast(XamDataChart.$, b) !== null) {
                    var e = b;
                    e.gridAreaRectChanged = delegateRemove(e.gridAreaRectChanged, runOn(this, this.ao3));
                    e.actualWindowRectChanged = delegateRemove(e.actualWindowRectChanged, runOn(this, this.ao0));
                    e.seriesDataUpdated = delegateRemove(e.seriesDataUpdated, runOn(this, this.ao8));
                }
                if (this.dataChart != null) {
                    var f = this.dataChart;
                    f.gridAreaRectChanged = delegateCombine(f.gridAreaRectChanged, runOn(this, this.ao3));
                    var g = this.dataChart;
                    g.actualWindowRectChanged = delegateCombine(g.actualWindowRectChanged, runOn(this, this.ao0));
                    var h = this.dataChart;
                    h.seriesDataUpdated = delegateCombine(h.seriesDataUpdated, runOn(this, this.ao8));
                }
                this.ap7();
                break;
            case "XAxisMode":
                this.xAxis = this.ahk(this.ah7);
                this.xAxis.name = "xAxis";
                this.volumeXAxis = this.ahk(this.ah7);
                this.volumeXAxis.name = "volumeXAxis";
                this.indicatorXAxis = this.ahk(this.ah7);
                this.indicatorXAxis.name = "indicatorXAxis_0";
                this.zoomSliderXAxis = this.ahk(this.ah7);
                this.zoomSliderXAxis.name = "zoomSliderXAxis";
                this.ae7(this.zoomSliderXAxis, function (i) { return i.visibility = 1; });
                this.aor();
                if (this.ah7 == 1) {
                    this.ap1();
                }
                break;
            case "YAxisMode":
                this.yAxis = this.aiy(this.ah9);
                this.yAxis.name = "yAxis";
                this.zoomSliderAxis = this.aiy(this.ah9);
                this.zoomSliderAxis.name = "zoomSliderAxis";
                this.volumeAxis = this.aiy(this.ah9);
                this.volumeAxis.name = "volumeAxis";
                break;
            case "Toolbar":
                var i = typeCast(FinancialChartToolbar.$, b);
                if (i != null) {
                    i.rangeChanged = delegateRemove(i.rangeChanged, runOn(this, this.ao7));
                    i.indicatorTypesChanged = delegateRemove(i.indicatorTypesChanged, runOn(this, this.apa));
                    i.overlayTypesChanged = delegateRemove(i.overlayTypesChanged, runOn(this, this.apb));
                }
                if (this.ahy != null) {
                    this.ahy.ae = this.aie;
                    this.ahy.ag = this.aig;
                    this.ahy.u = this.ahv;
                    this.ap5(true);
                    var j = this.ahy;
                    j.rangeChanged = delegateCombine(j.rangeChanged, runOn(this, this.ao7));
                    var k = this.ahy;
                    k.indicatorTypesChanged = delegateCombine(k.indicatorTypesChanged, runOn(this, this.apa));
                    var l = this.ahy;
                    l.overlayTypesChanged = delegateCombine(l.overlayTypesChanged, runOn(this, this.apb));
                }
                break;
            case "XAxis":
                var m = typeCast(CategoryAxisBase.$, b);
                if (m != null) {
                    if (this.dataChart != null) {
                        this.dataChart.axes.remove(m);
                    }
                }
                var n = typeCast(ITimeRangeSelectorAxis_$type, b);
                if (n != null) {
                    n.visibleRangeChanged = delegateRemove(n.visibleRangeChanged, runOn(this, this.ape));
                }
                if (this.dataChart != null) {
                    this.dataChart.axes.add(this.xAxis);
                }
                if (this.gh) {
                    this.ae9(this.xAxis);
                    this.un();
                }
                this.ap5(false);
                this.ap6();
                this.aps();
                var o = this.xAxis;
                o.visibleRangeChanged = delegateCombine(o.visibleRangeChanged, runOn(this, this.ape));
                break;
            case "XAxisZoomMaximumCategoryRange":
                this.apl(function (p) { return p.zoomMaximumCategoryRange = _this.ak8; });
                break;
            case "XAxisZoomMaximumItemSpan":
                this.apl(function (p) { return p.zoomMaximumItemSpan = _this.ak9; });
                break;
            case "XAxisZoomToCategoryRange":
                this.apl(function (p) { return p.zoomToCategoryRange = _this.ala; });
                break;
            case "XAxisZoomToCategoryStart":
                this.apl(function (p) { return p.zoomToCategoryStart = _this.alb; });
                break;
            case "XAxisZoomToItemSpan":
                this.apl(function (p) { return p.zoomToItemSpan = _this.alc; });
                break;
            case "ChartType":
                this.ur();
                break;
            case "VolumeXAxis":
                this.apy(this.volumeChart, typeCast(Axis.$, b), this.volumeXAxis);
                break;
            case "ZoomSliderXAxis":
                this.apy(this.zoomSliderChart, typeCast(Axis.$, b), this.zoomSliderXAxis);
                break;
            case "IndicatorXAxis":
                this.ap2();
                break;
            case "YAxis":
                var p = typeCast(NumericYAxis.$, b);
                if (p != null) {
                    if (this.dataChart != null) {
                        this.dataChart.axes.remove(p);
                    }
                }
                if (this.dataChart != null) {
                    this.dataChart.axes.add(this.yAxis);
                }
                if (this.gh) {
                    this.afb(this.yAxis);
                    this.afb(this.yAxis);
                }
                var q = this.yAxis;
                q.rangeChanged = delegateCombine(q.rangeChanged, runOn(this, this.apf));
                break;
            case "VolumeAxis":
                var r = typeCast(Axis.$, b);
                if (this.volumeChart != null && r != null) {
                    this.volumeChart.axes.remove(r);
                }
                if (this.volumeChart != null && this.volumeAxis != null) {
                    this.volumeChart.axes.add(this.volumeAxis);
                    this.apo();
                }
                if (this.gh) {
                    this.afb(this.volumeAxis);
                }
                var s = this.volumeAxis;
                s.rangeChanged = delegateCombine(s.rangeChanged, runOn(this, this.apf));
                break;
            case "IndicatorAxis":
                if (this.indicatorCharts != null) {
                    for (var t = 0; t < this.indicatorCharts.count; t++) {
                        var u = this.indicatorCharts._inner[t];
                        var v = new List$1(Axis.$, 0);
                        try {
                            for (var _c = (e_19 = void 0, __values(fromEnum(u.axes))), _d = _c.next(); !_d.done; _d = _c.next()) {
                                var w = _d.value;
                                if (typeCast(NumericYAxis.$, w) !== null) {
                                    v.add(w);
                                }
                            }
                        }
                        catch (e_19_1) {
                            e_19 = { error: e_19_1 };
                        }
                        finally {
                            try {
                                if (_d && !_d.done && (_a = _c.return))
                                    _a.call(_c);
                            }
                            finally {
                                if (e_19)
                                    throw e_19.error;
                            }
                        }
                        try {
                            for (var _e = (e_20 = void 0, __values(fromEnum(v))), _f = _e.next(); !_f.done; _f = _e.next()) {
                                var x = _f.value;
                                u.axes.remove(x);
                            }
                        }
                        catch (e_20_1) {
                            e_20 = { error: e_20_1 };
                        }
                        finally {
                            try {
                                if (_f && !_f.done && (_b = _e.return))
                                    _b.call(_e);
                            }
                            finally {
                                if (e_20)
                                    throw e_20.error;
                            }
                        }
                        var y = null;
                        if (t == 0) {
                            y = this.indicatorAxis;
                        }
                        else if (this.ah9 == 1) {
                            y = this.aiy(this.ah9);
                        }
                        else if (typeCast(NumericYAxis.$, this.indicatorAxis) !== null) {
                            y = new NumericYAxis();
                        }
                        if (y != null) {
                            u.axes.add(y);
                        }
                        if (this.gh) {
                            this.afb(y);
                        }
                    }
                }
                break;
            case "IsWindowSyncedToVisibleRange":
                if (this.dataChart != null) {
                    this.dataChart.xj = this.hb && this.ha;
                }
                if (this.volumeChart != null) {
                    this.volumeChart.xj = this.hb && this.ha;
                }
                if (this.ajz) {
                    this.apz(this.dataChart);
                }
                else {
                    this.volumeChart.yq = 1;
                }
                break;
            case "IndicatorTypes":
                var z = typeCast(ObservableCollection$1.$.specialize(FinancialIndicatorType_$type), b);
                if (z != null) {
                    z.collectionChanged = delegateRemove(z.collectionChanged, runOn(this, this.ao4));
                }
                var aa = typeCast(ObservableCollection$1.$.specialize(FinancialIndicatorType_$type), c);
                if (aa != null) {
                    aa.collectionChanged = delegateCombine(aa.collectionChanged, runOn(this, this.ao4));
                }
                this.ap2();
                break;
            case "OverlayTypes":
                var ab = typeCast(ObservableCollection$1.$.specialize(FinancialOverlayType_$type), b);
                if (ab != null) {
                    ab.collectionChanged = delegateRemove(ab.collectionChanged, runOn(this, this.ao5));
                }
                var ac = typeCast(ObservableCollection$1.$.specialize(FinancialOverlayType_$type), c);
                if (ac != null) {
                    ac.collectionChanged = delegateCombine(ac.collectionChanged, runOn(this, this.ao5));
                }
                this.ap4();
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.afi(function (ad) { return ad.lf = _this.aj3; });
                break;
            case "YAxisMinimumValue":
                this.afj(function (ad) { return ad.mc = _this.alh; }, false);
                break;
            case "YAxisMaximumValue":
                this.afj(function (ad) { return ad.mb = _this.alg; }, false);
                break;
            case "YAxisInterval":
                this.afj(function (ad) { return ad.l8 = _this.alf; }, false);
                break;
            case "Thickness":
            case "ZoomSliderType":
                this.ap7();
                break;
            case "ZoomSliderChart":
                if (!this.aj6) {
                    return;
                }
                this.aqa(typeCast(XamDataChart.$, b), typeCast(XamDataChart.$, c));
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.aox(function (ad, ae) {
                    if (ad.fl) {
                        ad.r2(_this.ag9 != null ? ArrayExtension.getModulus$1(Brush.$, _this.ag9, ae) : null, _this.aha != null ? ArrayExtension.getModulus$1(Brush.$, _this.aha, ae) : null);
                    }
                }, true);
                break;
            case "OverlayBrushes":
                this.aow(function (ad, ae) { return ad.ve = _this.ahb != null ? ArrayExtension.getModulus$1(Brush.$, _this.ahb, ae) : null; });
                break;
            case "OverlayOutlines":
                this.aow(function (ad, ae) { return ad.vu = _this.ahc != null ? ArrayExtension.getModulus$1(Brush.$, _this.ahc, ae) : null; });
                break;
            case "OverlayThickness":
                this.aow(function (ad, ae) { return ad.jo = _this.ak5; });
                break;
            case "OverlayMultiplier":
                this.aow(function (ad, ae) { return _this.ait.setMultiplier(ad, _this.ak4); });
                break;
            case "VolumeBrushes":
                this.aoy(function (ad, ae) { return ad.ve = ArrayExtension.getModulus$1(Brush.$, _this.ahd, ae); });
                break;
            case "VolumeOutlines":
                this.aoy(function (ad, ae) { return ad.vu = ArrayExtension.getModulus$1(Brush.$, _this.ahe, ae); });
                break;
            case "VolumeThickness":
                this.aoy(function (ad, ae) { return ad.jo = _this.ak7; });
                break;
            case "IndicatorNegativeBrushes":
                this.aov(function (ad, ae) { return _this.aio.setNegativeBrush(ad, ArrayExtension.getModulus$1(Brush.$, _this.ag8, ae)); });
                break;
            case "IndicatorBrushes":
                this.aov(function (ad, ae) { return ad.ve = ArrayExtension.getModulus$1(Brush.$, _this.ag7, ae); });
                break;
            case "IndicatorThickness":
                this.aov(function (ad, ae) { return ad.jo = _this.ak3; });
                break;
            case "IndicatorDisplayTypes":
                this.aov(function (ad, ae) { return _this.aio.setDisplayType(ad, ArrayExtension.getModulus$1(IndicatorDisplayType_$type, _this.aiq, ae)); });
                break;
            case "IndicatorPeriod":
                this.aov(function (ad, ae) {
                    if (_this.aly == -2147483648) {
                        return;
                    }
                    _this.aio.setPeriodOverride(ad, _this.aly);
                });
                break;
            case "IndicatorMultiplier":
                this.aov(function (ad, ae) { return _this.aio.setMultiplier(ad, _this.ak2); });
                break;
            case "IndicatorSmoothingPeriod":
                this.aov(function (ad, ae) { return _this.aio.setSmoothingPeriod(ad, _this.al1); });
                break;
            case "IndicatorShortPeriod":
                this.aov(function (ad, ae) { return _this.aio.setShortPeriod(ad, _this.alz); });
                break;
            case "IndicatorLongPeriod":
                this.aov(function (ad, ae) { return _this.aio.setLongPeriod(ad, _this.alx); });
                break;
            case "IndicatorSignalPeriod":
                this.aov(function (ad, ae) { return _this.aio.setSignalPeriod(ad, _this.al0); });
                break;
            case "RangeSelectorOptions":
                var ad = typeCast(FinancialChartRangeSelectorOptionCollection.$, b);
                if (ad != null) {
                    ad.collectionChanged = delegateRemove(ad.collectionChanged, runOn(this, this.ao6));
                }
                if (this.ahw != null) {
                    var ae = this.ahw;
                    ae.collectionChanged = delegateCombine(ae.collectionChanged, runOn(this, this.ao6));
                }
                this.aps();
                break;
            case "CustomIndicatorNames":
                var af = typeCast(ObservableCollection$1.$.specialize(String_$type), b);
                if (af != null) {
                    af.collectionChanged = delegateRemove(af.collectionChanged, runOn(this, this.ao2));
                }
                if (this.customIndicatorNames != null) {
                    var ag = this.customIndicatorNames;
                    ag.collectionChanged = delegateCombine(ag.collectionChanged, runOn(this, this.ao2));
                }
                this.ap2();
                break;
            case "Legend":
                if (this.zoomSliderChart != null) {
                    this.zoomSliderChart.legend = null;
                }
                break;
            case "Brushes":
                this.aox(function (ah, ai) { return ah.ve = _this.z != null ? ArrayExtension.getModulus$1(Brush.$, _this.z, ai) : null; }, true);
                break;
            case "Outlines":
                this.aox(function (ah, ai) { return ah.vu = _this.ad != null ? ArrayExtension.getModulus$1(Brush.$, _this.ad, ai) : null; }, true);
                break;
            case "XAxisLabelVisibility":
                if (this.agx == 0 && this.zoomSliderXAxis != null) {
                    this.ae7(this.zoomSliderXAxis, function (ah) { return ah.visibility = 1; });
                }
                this.aor();
                break;
            case "YAxisLabelVisibility":
                if (this.agy != 0 || this.zoomSliderAxis == null) {
                    break;
                }
                this.ae7(this.zoomSliderAxis, function (ah) { return ah.visibility = 1; });
                break;
            case "ZoomSliderXAxisMajorStroke":
                this.zoomSliderXAxis.jz = this.aqd;
                break;
            case "ZoomSliderXAxisMajorStrokeThickness":
                this.zoomSliderXAxis.et = this.alj;
                break;
            case "FinancialChartLegend":
            case "IsLegendVisible":
                var ah_1 = this.aju && this.legend == null;
                {
                    var ai = function (aj, ak) {
                        if (aj.isUsableInLegend) {
                            aj.legend = ah_1 ? _this.aii : null;
                        }
                    };
                    this.aox(ai, false);
                    this.aow(ai);
                }
                break;
            case "ZoomSliderAxis":
                var aj = typeCast(Axis.$, b);
                if (aj != null && this.zoomSliderChart != null) {
                    this.zoomSliderChart.axes.remove(aj);
                }
                if (this.zoomSliderAxis != null) {
                    if (this.zoomSliderChart != null) {
                        this.zoomSliderChart.axes.add(this.zoomSliderAxis);
                        this.app();
                        this.zoomSliderXAxis.itemsSource = this.xAxis.itemsSource;
                    }
                    if (this.gh) {
                        this.afb(this.zoomSliderAxis);
                    }
                    this.ae7(this.zoomSliderAxis, function (ak) { return ak.visibility = 1; });
                }
                break;
            case "XAxisMinimumValue":
                this.afd(function (ak) {
                    var al = typeCast(ITimeRangeSelectorAxis_$type, ak);
                    if (al != null) {
                        al.minimumValue = _this.akk;
                    }
                });
                break;
            case "XAxisMaximumValue":
                this.afd(function (ak) {
                    var al = typeCast(ITimeRangeSelectorAxis_$type, ak);
                    if (al != null) {
                        al.maximumValue = _this.akj;
                    }
                });
                break;
            case FinancialChart.any:
                this.afe(function (ak) { return ak.b1 = _this.aj2; }, a);
                break;
            case FinancialChart.an9:
                this.afi(function (ak) { return ak.b1 = _this.aj4; });
                break;
        }
    };
    FinancialChart.prototype.get_cb = function () {
        return 1;
    };
    Object.defineProperty(FinancialChart.prototype, "cb", {
        get: function () {
            return this.get_cb();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aj5", {
        get: function () {
            return this.ajn;
        },
        set: function (a) {
            var b = this.aj5;
            if (a != b) {
                this.ajn = a;
                this.vu("YAxisIsLogarithmic", b, this.aj5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "al3", {
        get: function () {
            return this.alv;
        },
        set: function (a) {
            var b = this.al3;
            if (a != b) {
                this.alv = a;
                this.vu("YAxisLogarithmBase", b, this.al3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "alf", {
        get: function () {
            return this.akw;
        },
        set: function (a) {
            var b = this.alf;
            if (a != b) {
                this.akw = a;
                this.vu("YAxisInterval", b, this.alf);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "alh", {
        get: function () {
            return this.aky;
        },
        set: function (a) {
            var b = this.alh;
            if (a != b) {
                this.aky = a;
                this.vu("YAxisMinimumValue", b, this.alh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "alg", {
        get: function () {
            return this.akx;
        },
        set: function (a) {
            var b = this.alg;
            if (a != b) {
                this.akx = a;
                this.vu("YAxisMaximumValue", b, this.alg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ali", {
        get: function () {
            return this.akz;
        },
        set: function (a) {
            var b = this.ali;
            if (a != b) {
                this.akz = a;
                this.vu("YAxisMinorInterval", b, this.ali);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ale", {
        get: function () {
            return this.yAxis.l4;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ald", {
        get: function () {
            return this.yAxis.l3;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ah5", {
        get: function () {
            return this.ah3;
        },
        set: function (a) {
            var b = this.ah5;
            if (a != b) {
                this.ah3 = a;
                this.vu("VolumeType", enumGetBox(FinancialChartVolumeType_$type, b), enumGetBox(FinancialChartVolumeType_$type, this.ah5));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ah7", {
        get: function () {
            return this.ah6;
        },
        set: function (a) {
            var b = this.ah7;
            if (a != b) {
                this.ah6 = a;
                this.vu("XAxisMode", enumGetBox(FinancialChartXAxisMode_$type, b), enumGetBox(FinancialChartXAxisMode_$type, this.ah7));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ak8", {
        get: function () {
            return this.akr;
        },
        set: function (a) {
            var b = this.ak8;
            if (a != b) {
                this.akr = a;
                this.vu("XAxisZoomMaximumCategoryRange", b, this.ak8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "alb", {
        get: function () {
            return this.aku;
        },
        set: function (a) {
            var b = this.alb;
            if (a != b) {
                this.aku = a;
                this.vu("XAxisZoomToCategoryStart", b, this.alb);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ak9", {
        get: function () {
            return this.aks;
        },
        set: function (a) {
            var b = this.ak9;
            if (a != b) {
                this.aks = a;
                this.vu("XAxisZoomMaximumItemSpan", b, this.ak9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ala", {
        get: function () {
            return this.akt;
        },
        set: function (a) {
            var b = this.ala;
            if (a != b) {
                this.akt = a;
                this.vu("XAxisZoomToCategoryRange", b, this.ala);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "alc", {
        get: function () {
            return this.akv;
        },
        set: function (a) {
            var b = this.alc;
            if (a != b) {
                this.akv = a;
                this.vu("XAxisZoomToItemSpan", b, this.alc);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ah9", {
        get: function () {
            return this.ah8;
        },
        set: function (a) {
            var b = this.ah9;
            if (a != b) {
                this.ah8 = a;
                this.vu("YAxisMode", enumGetBox(FinancialChartYAxisMode_$type, b), enumGetBox(FinancialChartYAxisMode_$type, this.ah9));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ajy", {
        get: function () {
            return this.aji;
        },
        set: function (a) {
            var b = this.ajy;
            if (a != b) {
                this.aji = a;
                this.vu("IsToolbarVisible", b, this.ajy);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ah0", {
        get: function () {
            return this.ahz;
        },
        set: function (a) {
            var b = this.ah0;
            if (a != b) {
                this.ahz = a;
                this.vu("ChartType", enumGetBox(FinancialChartType_$type, b), enumGetBox(FinancialChartType_$type, this.ah0));
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.get_afs = function () {
        return _super.prototype.get_afs.call(this);
    };
    FinancialChart.prototype.set_afs = function (a) {
        _super.prototype.set_afs.call(this, a);
    };
    Object.defineProperty(FinancialChart.prototype, "ajz", {
        get: function () {
            return this.ajj;
        },
        set: function (a) {
            var b = this.ajz;
            if (a != b) {
                this.ajj = a;
                this.vu("IsWindowSyncedToVisibleRange", b, this.ajz);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aie", {
        get: function () {
            return this.aid;
        },
        set: function (a) {
            var b = this.aie;
            if (a != b) {
                this.aid = a;
                this.vu("IndicatorTypes", b, this.aie);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aig", {
        get: function () {
            return this.aif;
        },
        set: function (a) {
            var b = this.aig;
            if (a != b) {
                this.aif = a;
                this.vu("OverlayTypes", b, this.aig);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "indicatorCharts", {
        get: function () {
            return this.aka;
        },
        set: function (a) {
            var b = this.indicatorCharts;
            if (a != b) {
                this.aka = a;
                this.vu("IndicatorCharts", b, this.indicatorCharts);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aj3", {
        get: function () {
            return this.ajl;
        },
        set: function (a) {
            var b = this.aj3;
            if (a != b) {
                this.ajl = a;
                this.vu("YAxisAbbreviateLargeNumbers", b, this.aj3);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.get_j5 = function () {
        return _super.prototype.get_j5.call(this);
    };
    FinancialChart.prototype.set_j5 = function (a) {
        _super.prototype.set_j5.call(this, a);
    };
    Object.defineProperty(FinancialChart.prototype, "aj2", {
        get: function () {
            return this.ajk;
        },
        set: function (a) {
            var b = this.aj2;
            if (a != b) {
                this.ajk = a;
                this.vu(FinancialChart.any, b, this.aj2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aj4", {
        get: function () {
            return this.ajm;
        },
        set: function (a) {
            var b = this.aj4;
            if (a != b) {
                this.ajm = a;
                this.vu(FinancialChart.an9, b, this.aj4);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "zoomSliderChart", {
        get: function () {
            return this.ajc;
        },
        set: function (a) {
            var b = this.zoomSliderChart;
            if (a != b) {
                this.ajc = a;
                this.vu("ZoomSliderChart", b, this.zoomSliderChart);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "zoomSliderAxis", {
        get: function () {
            return this.aix;
        },
        set: function (a) {
            var b = this.zoomSliderAxis;
            if (a != b) {
                this.aix = a;
                this.vu("ZoomSliderAxis", b, this.zoomSliderAxis);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "zoomSliderXAxis", {
        get: function () {
            return this.ahi;
        },
        set: function (a) {
            var b = this.zoomSliderXAxis;
            if (a != b) {
                this.ahi = a;
                this.vu("ZoomSliderXAxis", b, this.zoomSliderXAxis);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aic", {
        get: function () {
            return this.aia;
        },
        set: function (a) {
            var b = this.aic;
            if (a != b) {
                this.aia = a;
                this.vu("ZoomSliderType", enumGetBox(FinancialChartZoomSliderType_$type, b), enumGetBox(FinancialChartZoomSliderType_$type, this.aic));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ag9", {
        get: function () {
            return this.ag1;
        },
        set: function (a) {
            var b = this.ag9;
            if (a != b) {
                this.ag1 = a;
                this.vu("NegativeBrushes", b, this.ag9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aha", {
        get: function () {
            return this.ag2;
        },
        set: function (a) {
            var b = this.aha;
            if (a != b) {
                this.ag2 = a;
                this.vu("NegativeOutlines", b, this.aha);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ahb", {
        get: function () {
            return this.ag3;
        },
        set: function (a) {
            var b = this.ahb;
            if (a != b) {
                this.ag3 = a;
                this.vu("OverlayBrushes", b, this.ahb);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ahc", {
        get: function () {
            return this.ag4;
        },
        set: function (a) {
            var b = this.ahc;
            if (a != b) {
                this.ag4 = a;
                this.vu("OverlayOutlines", b, this.ahc);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ahe", {
        get: function () {
            return this.ag6;
        },
        set: function (a) {
            var b = this.ahe;
            if (a != b) {
                this.ag6 = a;
                this.vu("VolumeOutlines", b, this.ahe);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ahd", {
        get: function () {
            return this.ag5;
        },
        set: function (a) {
            var b = this.ahd;
            if (a != b) {
                this.ag5 = a;
                this.vu("VolumeBrushes", b, this.ahd);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ag8", {
        get: function () {
            return this.ag0;
        },
        set: function (a) {
            var b = this.ag8;
            if (a != b) {
                this.ag0 = a;
                this.vu("IndicatorNegativeBrushes", b, this.ag8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ag7", {
        get: function () {
            return this.agz;
        },
        set: function (a) {
            var b = this.ag7;
            if (a != b) {
                this.agz = a;
                this.vu("IndicatorBrushes", b, this.ag7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ak7", {
        get: function () {
            return this.akq;
        },
        set: function (a) {
            var b = this.ak7;
            if (a != b) {
                this.akq = a;
                this.vu("VolumeThickness", b, this.ak7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ak5", {
        get: function () {
            return this.ako;
        },
        set: function (a) {
            var b = this.ak5;
            if (a != b) {
                this.ako = a;
                this.vu("OverlayThickness", b, this.ak5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ak4", {
        get: function () {
            return this.akn;
        },
        set: function (a) {
            var b = this.ak4;
            if (a != b) {
                this.akn = a;
                this.vu("OverlayMultiplier", b, this.ak4);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ak3", {
        get: function () {
            return this.akm;
        },
        set: function (a) {
            var b = this.ak3;
            if (a != b) {
                this.akm = a;
                this.vu("IndicatorThickness", b, this.ak3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aiq", {
        get: function () {
            return this.aip;
        },
        set: function (a) {
            var b = this.aiq;
            if (a != b) {
                this.aip = a;
                this.vu("IndicatorDisplayTypes", b, this.aiq);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aly", {
        get: function () {
            return this.alr;
        },
        set: function (a) {
            var b = this.aly;
            if (a != b) {
                this.alr = a;
                this.vu("IndicatorPeriod", b, this.aly);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ak2", {
        get: function () {
            return this.akl;
        },
        set: function (a) {
            var b = this.ak2;
            if (a != b) {
                this.akl = a;
                this.vu("IndicatorMultiplier", b, this.ak2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "al1", {
        get: function () {
            return this.alu;
        },
        set: function (a) {
            var b = this.al1;
            if (a != b) {
                this.alu = a;
                this.vu("IndicatorSmoothingPeriod", b, this.al1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "alz", {
        get: function () {
            return this.als;
        },
        set: function (a) {
            var b = this.alz;
            if (a != b) {
                this.als = a;
                this.vu("IndicatorShortPeriod", b, this.alz);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "alx", {
        get: function () {
            return this.alq;
        },
        set: function (a) {
            var b = this.alx;
            if (a != b) {
                this.alq = a;
                this.vu("IndicatorLongPeriod", b, this.alx);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "al0", {
        get: function () {
            return this.alt;
        },
        set: function (a) {
            var b = this.al0;
            if (a != b) {
                this.alt = a;
                this.vu("IndicatorSignalPeriod", b, this.al0);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ahw", {
        get: function () {
            return this.ahu;
        },
        set: function (a) {
            var b = this.ahw;
            if (a != b) {
                this.ahu = a;
                this.vu("RangeSelectorOptions", b, this.ahw);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "customIndicatorNames", {
        get: function () {
            return this.ahq;
        },
        set: function (a) {
            var b = this.ahq;
            if (a != b) {
                this.ahq = a;
                this.vu("CustomIndicatorNames", b, this.customIndicatorNames);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.prototype.get_hb = function () {
        return _super.prototype.get_hb.call(this);
    };
    FinancialChart.prototype.set_hb = function (a) {
        _super.prototype.set_hb.call(this, a);
    };
    Object.defineProperty(FinancialChart.prototype, "aqd", {
        get: function () {
            return this.aqc;
        },
        set: function (a) {
            var b = this.aqd;
            if (a != b) {
                this.aqc = a;
                this.vu("ZoomSliderXAxisMajorStroke", b, this.aqd);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "alj", {
        get: function () {
            return this.ak0;
        },
        set: function (a) {
            var b = this.alj;
            if (a != b) {
                this.ak0 = a;
                this.vu("ZoomSliderXAxisMajorStrokeThickness", b, this.alj);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aju", {
        get: function () {
            return this.ajh;
        },
        set: function (a) {
            var b = this.aju;
            if (a != b) {
                this.ajh = a;
                this.vu("IsLegendVisible", b, this.aju);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "aii", {
        get: function () {
            return this.aih;
        },
        set: function (a) {
            var b = this.aii;
            if (a != b) {
                this.aih = a;
                this.vu("FinancialChartLegend", b, this.aii);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "xAxis", {
        get: function () {
            return this.ahh;
        },
        set: function (a) {
            var b = this.xAxis;
            if (a != b) {
                this.ahh = a;
                this.vu("XAxis", b, this.xAxis);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "yAxis", {
        get: function () {
            return this.aiw;
        },
        set: function (a) {
            var b = this.yAxis;
            if (a != b) {
                this.aiw = a;
                this.vu("YAxis", b, this.yAxis);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "volumeAxis", {
        get: function () {
            return this.aiv;
        },
        set: function (a) {
            var b = this.volumeAxis;
            if (a != b) {
                this.aiv = a;
                this.vu("VolumeAxis", b, this.volumeAxis);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "volumeXAxis", {
        get: function () {
            return this.ahg;
        },
        set: function (a) {
            var b = this.volumeXAxis;
            if (a != b) {
                this.ahg = a;
                this.vu("VolumeXAxis", b, this.volumeXAxis);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "indicatorAxis", {
        get: function () {
            return this.aiu;
        },
        set: function (a) {
            var b = this.indicatorAxis;
            if (a != b) {
                this.aiu = a;
                this.vu("IndicatorAxis", b, this.indicatorAxis);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "indicatorXAxis", {
        get: function () {
            return this.ahf;
        },
        set: function (a) {
            var b = this.indicatorXAxis;
            if (a != b) {
                this.ahf = a;
                this.vu("IndicatorXAxis", b, this.indicatorXAxis);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "akc", {
        get: function () {
            return this.aj9;
        },
        set: function (a) {
            var b = this.akc;
            if (a != b) {
                this.aj9 = a;
                this.vu("IndicatorAxes", b, this.akc);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "ake", {
        get: function () {
            return this.akb;
        },
        set: function (a) {
            var b = this.ake;
            if (a != b) {
                this.akb = a;
                this.vu("IndicatorXAxes", b, this.ake);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "akk", {
        get: function () {
            return this.aki;
        },
        set: function (a) {
            var b = this.akk;
            if (+a != +b) {
                this.aki = a;
                this.vu("XAxisMinimumValue", b, this.akk);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "akj", {
        get: function () {
            return this.akh;
        },
        set: function (a) {
            var b = this.akj;
            if (+a != +b) {
                this.akh = a;
                this.vu("XAxisMaximumValue", b, this.akj);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChart.prototype, "xAxisBreaks", {
        get: function () {
            return this.akf;
        },
        enumerable: false,
        configurable: true
    });
    FinancialChart.$t = markType(FinancialChart, 'FinancialChart', XYChart.$);
    FinancialChart.al2 = 0;
    FinancialChart.any = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    FinancialChart.an9 = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return FinancialChart;
}(XYChart));
export { FinancialChart };
/**
 * @hidden
 */
var FinancialChartToolbar = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialChartToolbar, _super);
    function FinancialChartToolbar(a, b) {
        var _this = _super.call(this, "financialChartToolbar", b, "") || this;
        _this.o = null;
        _this.r = null;
        _this.z = null;
        _this.p = null;
        _this.w = null;
        _this.aq = dateMaxValue();
        _this.ap = dateMinValue();
        _this.ao = dateMaxValue();
        _this.an = dateMinValue();
        _this.rangeChanged = null;
        _this.chartTypeChanged = null;
        _this.trendLineTypeChanged = null;
        _this.volumeTypeChanged = null;
        _this.indicatorTypesChanged = null;
        _this.overlayTypesChanged = null;
        _this.x = 0;
        _this.ah = 0;
        _this.ab = 0;
        _this.ad = null;
        _this.af = null;
        _this.t = null;
        _this.ak = false;
        _this.o = a;
        _this.w = new FinancialChartToolbarViewModel();
        _this.s = new FinancialChartRangeSelector(a != null ? a.ame : null);
        _this.aa = new FinancialChartTypePicker(a != null ? a.amb : null);
        _this.q = new FinancialChartIndicatorMenu(1, a != null ? a.amc : null);
        return _this;
    }
    FinancialChartToolbar.prototype.bg = function (a) {
        var b = a.querySelectorAll(".financialChartToolbarArea");
        if (b != null && b.length > 0) {
            this.g = b[0];
            if (!this.al) {
                this.g.hide();
            }
        }
        var c = a.querySelectorAll(".financialChartIndicatorMenu");
        if (c != null && c.length > 0) {
            this.q.g = c[0];
        }
        var d = a.querySelectorAll(".financialChartRangeSelector");
        if (d != null && d.length > 0) {
            this.s.g = d[0];
        }
        var e = a.querySelectorAll(".financialChartTypePicker");
        if (e != null && e.length > 0) {
            this.aa.g = e[0];
        }
    };
    FinancialChartToolbar.prototype.bl = function (a) {
        this.q.u(a);
        this.aa.u(a);
    };
    Object.defineProperty(FinancialChartToolbar.prototype, "s", {
        get: function () {
            return this.r;
        },
        set: function (a) {
            var b = this.s;
            if (a != b) {
                this.r = a;
                this.bm("RangeSelector", b, this.s);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "aa", {
        get: function () {
            return this.z;
        },
        set: function (a) {
            var b = this.aa;
            if (a != b) {
                this.z = a;
                this.bm("ChartTypePicker", b, this.aa);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "q", {
        get: function () {
            return this.p;
        },
        set: function (a) {
            var b = this.q;
            if (a != b) {
                this.p = a;
                this.bm("IndicatorMenu", b, this.q);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChartToolbar.prototype.bm = function (a, b, c) {
        switch (a) {
            case "RangeStart":
                if (this.s != null) {
                    this.s.t = this.as;
                }
                break;
            case "RangeEnd":
                if (this.s != null) {
                    this.s.s = this.ar;
                }
                break;
            case "SelectionStart":
                if (this.s != null) {
                    this.s.v = this.au;
                }
                break;
            case "SelectionEnd":
                if (this.s != null) {
                    this.s.u = this.at;
                }
                break;
            case "RangeSelector":
                var d = b;
                if (d != null) {
                    d.rangeChanged = delegateRemove(d.rangeChanged, runOn(this, this.bj));
                }
                if (this.s != null) {
                    this.s.t = this.as;
                    this.s.s = this.ar;
                    this.s.o = this.u;
                    this.s.v = this.au;
                    this.s.u = this.at;
                    var e = this.s;
                    e.rangeChanged = delegateCombine(e.rangeChanged, runOn(this, this.bj));
                }
                break;
            case "ChartTypePicker":
                var f = b;
                if (f != null) {
                    f.selectionChanged = delegateRemove(f.selectionChanged, runOn(this, this.bi));
                }
                if (this.aa != null) {
                    this.aa.w = this.y;
                    var g = this.aa;
                    g.selectionChanged = delegateCombine(g.selectionChanged, runOn(this, this.bi));
                }
                break;
            case "ChartType":
                if (this.aa != null) {
                    this.aa.w = this.y;
                }
                break;
            case "RangeSelectorOptions":
                if (this.s != null) {
                    this.s.o = this.u;
                }
                break;
            case "IsToolbarVisible":
                if (this.g == null) {
                    break;
                }
                if (this.al) {
                    this.g.show();
                }
                else {
                    this.g.hide();
                }
                break;
            case "IndicatorMenu":
                var h = typeCast(FinancialChartIndicatorMenu.$, b);
                if (h != null) {
                    h.selectionChanged = delegateRemove(h.selectionChanged, runOn(this, this.bh));
                }
                if (this.q != null) {
                    var i = this.q;
                    i.selectionChanged = delegateCombine(i.selectionChanged, runOn(this, this.bh));
                }
                break;
            case "IndicatorTypes":
                if (this.indicatorTypesChanged != null) {
                    this.indicatorTypesChanged(this, EventArgs.empty);
                }
                break;
            case "OverlayTypes":
                if (this.overlayTypesChanged != null) {
                    this.overlayTypesChanged(this, EventArgs.empty);
                }
                break;
            case "TrendLineType":
                if (this.trendLineTypeChanged != null) {
                    this.trendLineTypeChanged(this, EventArgs.empty);
                }
                break;
            case "VolumeType":
                if (this.volumeTypeChanged != null) {
                    this.volumeTypeChanged(this, EventArgs.empty);
                }
                break;
        }
    };
    FinancialChartToolbar.prototype.bh = function (a, b) {
        this.ag = this.q.z;
        this.ae = this.q.y;
        this.ai = this.q.aa;
        this.ac = this.q.x;
    };
    FinancialChartToolbar.prototype.bi = function (a, b) {
        this.y = this.aa.w;
        if (this.chartTypeChanged != null) {
            this.chartTypeChanged(this, b);
        }
    };
    FinancialChartToolbar.prototype.bj = function (a, b) {
        this.au = this.s.v;
        this.at = this.s.u;
        if (this.rangeChanged != null) {
            this.rangeChanged(this, b);
        }
    };
    FinancialChartToolbar.prototype.v = function () {
        var _this = this;
        var a = new FinancialChartToolbarContext();
        a.container = this.d;
        a.vm = this.w;
        a.vm.financialChartIndicatorMenu = ((function () {
            var $ret = new FinancialChartIndicatorMenuContext();
            $ret.vm = _this.q.p;
            return $ret;
        })());
        a.vm.financialChartTypePicker = ((function () {
            var $ret = new FinancialChartTypePickerContext();
            $ret.vm = _this.aa.p;
            return $ret;
        })());
        a.vm.financialChartRangeSelector = ((function () {
            var $ret = new FinancialChartRangeSelectorContext();
            $ret.vm = _this.s.q;
            return $ret;
        })());
        return a;
    };
    FinancialChartToolbar.prototype.l = function (a) {
        _super.prototype.l.call(this, a);
        if (a == null) {
            return;
        }
        this.s.l(a);
        this.aa.l(a);
        this.q.l(a);
        this.bk();
    };
    FinancialChartToolbar.prototype.bk = function () {
    };
    Object.defineProperty(FinancialChartToolbar.prototype, "au", {
        get: function () {
            return this.aq;
        },
        set: function (a) {
            var b = this.au;
            if (+a != +b) {
                this.aq = a;
                this.bm("SelectionStart", b, this.au);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "at", {
        get: function () {
            return this.ap;
        },
        set: function (a) {
            var b = this.at;
            if (+a != +b) {
                this.ap = a;
                this.bm("SelectionEnd", b, this.at);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "as", {
        get: function () {
            return this.ao;
        },
        set: function (a) {
            var b = this.as;
            if (+a != +b) {
                this.ao = a;
                this.bm("RangeStart", b, this.as);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "ar", {
        get: function () {
            return this.an;
        },
        set: function (a) {
            var b = this.ar;
            if (+a != +b) {
                this.an = a;
                this.bm("RangeEnd", b, this.ar);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChartToolbar.prototype.bn = function () {
        if (this.s != null) {
            this.s.ab();
        }
    };
    Object.defineProperty(FinancialChartToolbar.prototype, "y", {
        get: function () {
            return this.x;
        },
        set: function (a) {
            var b = this.y;
            if (a != b) {
                this.x = a;
                this.bm("ChartType", enumGetBox(FinancialChartType_$type, b), enumGetBox(FinancialChartType_$type, this.y));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "ai", {
        get: function () {
            return this.ah;
        },
        set: function (a) {
            var b = this.ai;
            if (a != b) {
                this.ah = a;
                this.bm("TrendLineType", enumGetBox(TrendLineType_$type, b), enumGetBox(TrendLineType_$type, this.ai));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "ac", {
        get: function () {
            return this.ab;
        },
        set: function (a) {
            var b = this.ac;
            if (a != b) {
                this.ab = a;
                this.bm("VolumeType", enumGetBox(FinancialChartVolumeType_$type, b), enumGetBox(FinancialChartVolumeType_$type, this.ac));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "ae", {
        get: function () {
            return this.ad;
        },
        set: function (a) {
            var b = this.ae;
            if (!FinancialChartToolbar.am(b, a)) {
                this.ad = a;
                this.bm("IndicatorTypes", b, this.ae);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "ag", {
        get: function () {
            return this.af;
        },
        set: function (a) {
            var b = this.ag;
            if (!FinancialChartToolbar.am(b, a)) {
                this.af = a;
                this.bm("OverlayTypes", b, this.ag);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChartToolbar.am = function (a, b) {
        var e_21, _a;
        if (a == b) {
            return true;
        }
        if ((a == null && b != null) || (a != null && b == null)) {
            return false;
        }
        if (a.count != b.count) {
            return false;
        }
        try {
            for (var _b = __values(fromEn(a)), _c = _b.next(); !_c.done; _c = _b.next()) {
                var c = _c.value;
                if (!b.contains(c)) {
                    return false;
                }
            }
        }
        catch (e_21_1) {
            e_21 = { error: e_21_1 };
        }
        finally {
            try {
                if (_c && !_c.done && (_a = _b.return))
                    _a.call(_b);
            }
            finally {
                if (e_21)
                    throw e_21.error;
            }
        }
        return true;
    };
    FinancialChartToolbar.prototype.aj = function () {
        var _this = this;
        return ((function () {
            var $ret = new FinancialChartToolbarVisualData();
            $ret.rangeSelector = _this.s == null ? null : _this.s.r();
            return $ret;
        })());
    };
    Object.defineProperty(FinancialChartToolbar.prototype, "u", {
        get: function () {
            return this.t;
        },
        set: function (a) {
            var b = this.u;
            if (a != b) {
                this.t = a;
                this.bm("RangeSelectorOptions", b, this.u);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartToolbar.prototype, "al", {
        get: function () {
            return this.ak;
        },
        set: function (a) {
            var b = this.al;
            if (a != b) {
                this.ak = a;
                this.bm("IsToolbarVisible", b, this.al);
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChartToolbar.$t = markType(FinancialChartToolbar, 'FinancialChartToolbar', TemplatedHtmlControl.$);
    return FinancialChartToolbar;
}(TemplatedHtmlControl));
export { FinancialChartToolbar };
/**
 * @hidden
 */
var FinancialChartRangeSelector = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(FinancialChartRangeSelector, _super);
    function FinancialChartRangeSelector(a) {
        var _this = _super.call(this, "financialChartRangeSelector", a, "") || this;
        _this.q = null;
        _this.rangeChanged = null;
        _this.p = null;
        _this.p = new FinancialChartRangeSelectorView();
        _this.q = new FinancialChartRangeSelectorViewModel();
        _this.q.onRangeChanged = runOn(_this, _this.z);
        _this.p.c = _this.q;
        return _this;
    }
    Object.defineProperty(FinancialChartRangeSelector.prototype, "v", {
        get: function () {
            return this.q.selectionStart;
        },
        set: function (a) {
            this.q.selectionStart = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartRangeSelector.prototype, "u", {
        get: function () {
            return this.q.selectionEnd;
        },
        set: function (a) {
            this.q.selectionEnd = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartRangeSelector.prototype, "t", {
        get: function () {
            return this.q.rangeStart;
        },
        set: function (a) {
            this.q.rangeStart = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(FinancialChartRangeSelector.prototype, "s", {
        get: function () {
            return this.q.rangeEnd;
        },
        set: function (a) {
            this.q.rangeEnd = a;
        },
        enumerable: false,
        configurable: true
    });
    FinancialChartRangeSelector.prototype.ab = function () {
        if (this.q.onPropertiesChanged()) {
            this.p.g(this.q);
        }
    };
    FinancialChartRangeSelector.prototype.l = function (a) {
        _super.prototype.l.call(this, a);
        this.p.f(this.d, this.q);
    };
    FinancialChartRangeSelector.prototype.z = function () {
        if (this.rangeChanged != null) {
            this.rangeChanged(this, EventArgs.empty);
        }
    };
    FinancialChartRangeSelector.prototype.r = function () {
        return this.p.d(this.g);
    };
    Object.defineProperty(FinancialChartRangeSelector.prototype, "o", {
        get: function () {
            return this.q.options;
        },
        set: function (a) {
            var b = !FinancialChartToolbar.am(this.q.options, a);
            if (b) {
                this.q.options = a;
                this.aa();
            }
        },
        enumerable: false,
        configurable: true
    });
    FinancialChartRangeSelector.prototype.aa = function () {
        var a = false;
        if (this.q != null) {
            a = this.q.p();
        }
        if (this.p != null) {
            this.p.i(this.o);
            if (a) {
                if (this.q.notifyChanged != null) {
                    this.q.notifyChanged();
                }
            }
        }
    };
    FinancialChartRangeSelector.$t = markType(FinancialChartRangeSelector, 'FinancialChartRangeSelector', TemplatedHtmlControl.$);
    FinancialChartRangeSelector.x = 0;
    return FinancialChartRangeSelector;
}(TemplatedHtmlControl));
export { FinancialChartRangeSelector };