UNPKG

igniteui-angular-charts

Version:

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

3,869 lines 140 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 { 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
 */
export let FinancialChart = /*@__PURE__*/ (() => {
    class FinancialChart extends XYChart {
        constructor() {
            super();
            this.ajv = null;
            this.amt = null;
            this.amr = null;
            this.amo = null;
            this.amq = null;
            this.ams = null;
            this.amp = null;
            this.ai1 = null;
            this.anb = null;
            this.anc = null;
            this.am8 = null;
            this.and = null;
            this.ane = null;
            this.am9 = null;
            this.ana = null;
            this.akj = null;
            this.alt = 40;
            this.ajp = null;
            this.ajn = null;
            this.ajr = null;
            this.ajw = null;
            this.anm = null;
            this.akf = null;
            this.ak5 = false;
            this.ak4 = false;
            this.alc = false;
            this.akr = false;
            this.amz = 10;
            this.al0 = NaN;
            this.al2 = NaN;
            this.al1 = NaN;
            this.al3 = 0;
            this.ai7 = 0;
            this.aja = 0;
            this.alv = 3;
            this.aly = NaN;
            this.alw = NaN;
            this.alx = NaN;
            this.alz = NaN;
            this.ajc = 0;
            this.akm = true;
            this.ai3 = 0;
            this.akn = false;
            this.ajh = null;
            this.ajj = null;
            this.ale = null;
            this.akp = true;
            this.ako = false;
            this.akq = false;
            this.akg = null;
            this.aje = 1;
            this.ah5 = null;
            this.ah6 = null;
            this.ah7 = null;
            this.ah8 = null;
            this.aia = null;
            this.ah9 = null;
            this.ah4 = null;
            this.ah3 = null;
            this.alu = 1;
            this.als = 1;
            this.alr = 2;
            this.alq = 1;
            this.ajt = null;
            this.amv = -2147483648;
            this.alp = 2;
            this.amy = 3;
            this.amw = 10;
            this.amu = 30;
            this.amx = 9;
            this.aiy = null;
            this.aiz = null;
            this.aiu = null;
            this.applyCustomIndicators = null;
            this.arg = null;
            this.al4 = 1;
            this.akl = false;
            this.ajl = null;
            this.alm = dateMinValue();
            this.all = dateMaxValue();
            this.alj = null;
            this.u8();
            this.alj = new ObservableCollection$1(Base.$, 0);
            if (this.xAxisBreaks != null) {
                let a = this.xAxisBreaks;
                a.collectionChanged = delegateCombine(a.collectionChanged, (a, b) => this.aq5());
            }
            this.aqq();
        }
        wo(a, b, c) {
            super.wo(a, b, c);
            switch (a) {
                case "ToolbarTemplate":
                case "RangeSelectorTemplate":
                    this.ai2 = new FinancialChartToolbar(this, this.anj);
                    break;
                case "Toolbar":
                    let d = b;
                    if (d != null) {
                        d.chartTypeChanged = delegateRemove(d.chartTypeChanged, runOn(this, this.aqd));
                        d.trendLineTypeChanged = delegateRemove(d.trendLineTypeChanged, runOn(this, this.aqg));
                        d.volumeTypeChanged = delegateRemove(d.volumeTypeChanged, runOn(this, this.aqh));
                        d.l(null);
                    }
                    if (this.ai2 != null) {
                        this.ai2.ac = this.ai9;
                        this.ai2.ai = this.ec;
                        this.ai2.y = this.ai4;
                        this.ai2.al = this.ak2;
                        if (this.amq != null) {
                            this.ai2.l(this.amq);
                        }
                        let e = this.ai2;
                        e.chartTypeChanged = delegateCombine(e.chartTypeChanged, runOn(this, this.aqd));
                        ;
                        let f = this.ai2;
                        f.trendLineTypeChanged = delegateCombine(f.trendLineTypeChanged, runOn(this, this.aqg));
                        let g = this.ai2;
                        g.volumeTypeChanged = delegateCombine(g.volumeTypeChanged, runOn(this, this.aqh));
                    }
                    break;
                case "ChartType":
                    if (this.ai2 != null) {
                        this.ai2.y = this.ai4;
                    }
                    break;
                case "VolumeType":
                    if (this.ai2 != null) {
                        this.ai2.ac = this.ai9;
                    }
                    break;
                case "TrendLineType":
                    if (this.ai2 != null) {
                        this.ai2.ai = this.ec;
                    }
                    break;
                case "IsToolbarVisible":
                    if (this.ai2 == null) {
                        break;
                    }
                    this.ai2.al = this.ak2;
                    this.setGridRows();
                    break;
            }
        }
        aqh(a, b) {
            this.ai9 = this.ai2.ac;
        }
        aqg(a, b) {
            this.ec = this.ai2.ai;
        }
        aqd(a, b) {
            this.ai4 = this.ai2.y;
        }
        aqq() {
            this.ajv = new IndicatorPane();
            this.ajm = TypeRegistrar.create("FinancialLegend");
        }
        provideGrid(a) {
            this.amt = a;
            this.arb();
            this.setGridRows();
            if (this.ai2 != null) {
                this.ai2.bg(a);
            }
        }
        onDocumentClick(a) {
            if (this.ai2 != null) {
                this.ai2.bl(a);
            }
        }
        getContext() {
            let a = this.ai2.v();
            let b = new FinancialChartContext();
            b.vm = new FinancialChartViewModel();
            b.vm.toolbar = a;
            b.container = this.l8;
            b.toolbarContainer = this.amq;
            b.legendContainer = this.amp;
            b.indicatorsContainer = this.amo;
            b.volumeContainer = this.amr;
            b.zoomContainer = this.ams;
            return b;
        }
        provideContainer(a) {
            let b = a;
            if (b != null) {
                let c = "financialChartMainGrid";
                let d = b.createElement("div");
                d.setStyleProperty("width", "100%");
                d.setStyleProperty("height", "100%");
                if (this.ai2 == null) {
                    this.ai2 = new FinancialChartToolbar(this, this.anj);
                }
                this.ai2.w.isIndicatorMenuVisible = this.akt && this.aku;
                this.amq = b.getSubRenderer(d);
                this.ai2.l(this.amq);
                let e = b.createElement("div");
                e.setStyleProperty("width", "100%");
                e.setStyleProperty("height", "100%");
                let f = b.createElement("div");
                f.setStyleProperty("width", "100%");
                f.setStyleProperty("height", "100%");
                this.amp = b.getSubRenderer(f);
                let g = b.createElement("div");
                g.setStyleProperty("width", "100%");
                g.setStyleProperty("height", "100%");
                this.amo = b.getSubRenderer(g);
                let h = b.createElement("div");
                h.setStyleProperty("width", "100%");
                h.setStyleProperty("height", "100%");
                this.amr = b.getSubRenderer(h);
                let i = b.createElement("div");
                i.setStyleProperty("width", "100%");
                i.setStyleProperty("height", "100%");
                this.ams = b.getSubRenderer(i);
                a = b.getSubRenderer(e);
            }
            else {
                this.amq = null;
                if (this.ai2 != null) {
                    this.ai2.l(null);
                }
                if (this.akk != null) {
                    this.akk.provideContainer(null);
                    this.akk = null;
                }
                if (this.ajm != null) {
                    this.ajm.provideContainer(null);
                }
            }
            super.provideContainer(a);
            if (b != null) {
                if (this.volumeChart != null) {
                    this.volumeChart.dc.b4(this.amr);
                }
                if (this.ajv != null) {
                    this.ajv.h(this.amo);
                }
                if (this.zoomSliderChart != null) {
                    this.zoomSliderChart.dc.b4(this.ams);
                    if (a != null) {
                        this.apx();
                    }
                    else {
                        this.akk = null;
                    }
                }
                if (this.ajm != null) {
                    this.ajm.provideContainer(this.amp);
                }
                this.setGridRows();
            }
        }
        aq1(a, b, c) {
            if (a != null) {
                a.provideContainer(null);
            }
            if (b != null) {
                b.dc.b4(c);
            }
            this.setGridRows();
        }
        arf(a, b) {
            this.aq1(a, b, this.ams);
            if (b == null) {
                return;
            }
            this.apx();
        }
        apx() {
            if (this.ams == null) {
                return;
            }
            if (this.akk != null) {
                this.akk.provideContainer(null);
            }
            this.akk = TypeRegistrar.create("ZoomSlider");
            this.akk.provideContainer(this.ams);
            let a = this.akk;
            a.windowRectChanged = delegateCombine(a.windowRectChanged, (a, b) => {
                if (this.dataChart != null) {
                    this.dataChart.xc = new Rect(0, this.akk.windowRect.left, this.dataChart.wt.top, this.akk.windowRect.width, this.dataChart.wt.height);
                }
            });
            this.apy();
        }
        ard(a, b) {
            this.aq1(a, b, this.amr);
        }
        setGridRows() {
            if (this.amt == null) {
                return;
            }
            let a = new Array(6);
            a[0] = (this.ak2 ? this.ama : 0) + "px";
            a[1] = this.aky ? "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.akk != null) {
                if (a[5] == "0px") {
                    this.akk.hide();
                }
                else {
                    this.akk.show();
                }
            }
            this.amt.setStyleProperty("-ms-grid-rows", stringReplace(stringJoin(" ", ...a), "auto", "1fr"));
            this.amt.setStyleProperty("grid-template-rows", stringJoin(" ", ...a));
            if (this.l8 == null) {
                return;
            }
            if (this.dataChart != null) {
                this.dataChart.notifyContainerResized();
            }
            if (this.ajv != null) {
                this.ajv.f();
            }
            if (this.volumeChart != null) {
                this.volumeChart.notifyContainerResized();
            }
            if (this.zoomSliderChart != null) {
                this.zoomSliderChart.notifyContainerResized();
            }
            if (this.akk != null) {
                this.akk.notifySizeChanged();
            }
        }
        vs() {
            super.vs();
            this.aa5 = 1;
            this.agw = 0;
            this.ada = 0;
            this.ahq = null;
            this.ahj = AxisDefaults.axis_LineBrush;
            this.acs = AxisDefaults.axis_TickStroke;
            this.acr = AxisDefaults.categoryAxis_TickLength;
            this.ahk = AxisDefaults.axis_TickBrush;
            this.ahg = null;
            this.arh = AxisDefaults.axis_MajorBrush;
            this.amn = AxisDefaults.axis_MajorStroke;
            this.finalValueAnnotationsVisible = true;
            this.crosshairsAnnotationEnabled = true;
            this.gu = false;
            this.crosshairsDisplayMode = 0;
            this.ju = Defaults.crosshairLineThickness;
            this.y4 = Defaults.crosshairLineBrush;
            this.yz = Defaults.crosshairXAxisAnnotationBackground;
            this.y0 = Defaults.crosshairXAxisAnnotationTextColor;
            this.ke = NaN;
            this.j6 = 40;
            this.ha = true;
            this.hi = false;
            if (this.dataChart != null) {
                let a = this.dataChart.dc.j.e();
                this.aid = a.d;
                this.aie = a.e;
                this.aic = a.d;
                this.arh = this.dataChart.abh;
            }
            let b = new BrushCollection();
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#8BDC5C";
                return $ret;
            })()));
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#8961A9";
                return $ret;
            })()));
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#6DB1FF";
                return $ret;
            })()));
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#82E9D9";
                return $ret;
            })()));
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#EA3C63";
                return $ret;
            })()));
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#735656";
                return $ret;
            })()));
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#F8CE4F";
                return $ret;
            })()));
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#A8A8B7";
                return $ret;
            })()));
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#E051A9";
                return $ret;
            })()));
            b.add(((() => {
                let $ret = new Brush();
                $ret.fill = "#FF903B";
                return $ret;
            })()));
            let c = new BrushCollection();
            for (let d of fromEnum(b)) {
                c.add(BrushUtil.p(d, 0.3));
            }
            this.aif = c;
            this.aig = b;
        }
        aqx() {
            if (this.ajv != null) {
                this.ajv.b = null;
                this.ajv.b = this.indicatorCharts;
            }
            this.setGridRows();
        }
        aqy() {
            this.setGridRows();
        }
        aq7() {
            this.aqx();
        }
        apw() {
            if (this.akk == null || this.zoomSliderChart == null || this.dataChart == null || this.dataChart.series.count == 0) {
                return;
            }
            let a = this.l8.rootWrapper.width();
            let b = this.dataChart.xb.left + this.dataChart.xb.width;
            let c = this.dataChart.xb.left;
            let d = a - b;
            this.akk.startInset = c - this.akk.trackStartInset;
            this.akk.endInset = d - this.akk.trackEndInset;
            if (this.akk.endInset < 0) {
                let e = this.akk.endInset;
                this.akk.endInset = 0;
                this.dataChart.ih += (e * -1);
            }
            if (this.akk.startInset < 0) {
                let f = this.akk.startInset;
                this.akk.startInset = 0;
                this.dataChart.ib += (f * -1);
            }
            this.zoomSliderChart.ib = c;
            this.zoomSliderChart.ih = d;
            this.zoomSliderChart.hw = this.akk.barExtent;
        }
        aqn() {
            this.apw();
        }
        vp(a) {
            super.vp(a);
            if (a != null) {
                a.hv = 0;
            }
        }
        ari(a) {
            return a.wm();
        }
        arl() {
            return this.amp == null ? null : this.ark(this.amp.rootWrapper);
        }
        arj(a) {
            if (a == null || a.d == null) {
                return null;
            }
            return this.ark(a.d.rootWrapper);
        }
        ark(a) {
            if (a == null) {
                return null;
            }
            let b = a.getOffset();
            return new Rect(0, b.left, b.top, a.width(), a.height());
        }
        al5() {
            if (this.amt == null) {
                return NaN;
            }
            let a = this.amt.getOffset();
            return this.amt.width() + (a == null ? 0 : a.left);
        }
        v1(source_, a, b) {
            super.v1(source_, a, b);
            if (this.zoomSliderChart != null) {
                this.zoomSliderChart.ow(source_, a, b);
            }
        }
        v2(source_, a, b) {
            super.v2(source_, a, b);
            if (this.zoomSliderChart != null) {
                this.zoomSliderChart.ox(source_, a, b);
            }
        }
        v0(source_) {
            super.v0(source_);
            if (this.zoomSliderChart != null) {
                this.zoomSliderChart.op(source_);
            }
        }
        v4(source_, a, b, c) {
            super.v4(source_, a, b, c);
            if (this.zoomSliderChart != null) {
                this.zoomSliderChart.oy(source_, a, b, c);
            }
        }
        vv(a, b) {
            super.vv(a, b);
            if (this.akz(a)) {
                a.toolTip = null;
            }
        }
        get ai2() {
            return this.ai1;
        }
        set ai2(a) {
            let b = this.ai2;
            if (a != b) {
                this.ai1 = a;
                this.wj("Toolbar", b, this.ai2);
            }
        }
        get ani() {
            return this.anb;
        }
        set ani(a) {
            let b = this.ani;
            if (a != b) {
                this.anb = a;
                this.wj("RangeSelectorTemplate", b, this.ani);
            }
        }
        get anj() {
            return this.anc;
        }
        set anj(a) {
            let b = this.anj;
            if (a != b) {
                this.anc = a;
                this.wj("ToolbarTemplate", b, this.anj);
            }
        }
        get anf() {
            return this.am8;
        }
        set anf(a) {
            let b = this.anf;
            if (a != b) {
                this.am8 = a;
                this.wj("ChartTypePickerTemplate", b, this.anf);
            }
        }
        get ank() {
            return this.and;
        }
        set ank(a) {
            let b = this.ank;
            if (a != b) {
                this.and = a;
                this.wj("TrendLineTypePickerTemplate", b, this.ank);
            }
        }
        get anl() {
            return this.ane;
        }
        set anl(a) {
            let b = this.anl;
            if (a != b) {
                this.ane = a;
                this.wj("VolumeTypePickerTemplate", b, this.anl);
            }
        }
        get ang() {
            return this.am9;
        }
        set ang(a) {
            let b = this.ang;
            if (a != b) {
                this.am9 = a;
                this.wj("IndicatorMenuTemplate", b, this.ang);
            }
        }
        get anh() {
            return this.ana;
        }
        set anh(a) {
            let b = this.anh;
            if (a != b) {
                this.ana = a;
                this.wj("OverlayPickerTemplate", b, this.anh);
            }
        }
        get akk() {
            return this.akj;
        }
        set akk(a) {
            let b = this.akk;
            if (a != b) {
                this.akj = a;
                this.wj("ZoomSlider", b, this.akk);
            }
        }
        get_j6() {
            return super.get_j6();
        }
        set_j6(a) {
            super.set_j6(a);
        }
        get_ha() {
            return super.get_ha();
        }
        set_ha(a) {
            super.set_ha(a);
        }
        get ama() {
            return this.alt;
        }
        set ama(a) {
            let b = this.ama;
            if (a != b) {
                this.alt = a;
                this.wj("ToolbarHeight", b, this.ama);
            }
        }
        aau() {
            return this.xAxis;
        }
        aav() {
            return this.yAxis;
        }
        onAttachedToUI() {
            super.onAttachedToUI();
            if (this.akk != null) {
                this.akk.onAttachedToUI();
            }
        }
        onDetachedFromUI() {
            super.onDetachedFromUI();
            if (this.akk != null) {
                this.akk.onDetachedFromUI();
            }
        }
        be(a) {
            return 20;
        }
        get_h6() {
            return ((() => {
                let $ret = new List$1(DataSeriesType_$type, 0);
                $ret.add(20);
                return $ret;
            })());
        }
        get h6() {
            return this.get_h6();
        }
        get_h5() {
            return ((() => {
                let $ret = new List$1(IDataSeriesAdapterRule_$type, 0);
                $ret.add(new SimpleFinancialPriceSeriesRule());
                $ret.add(new SubCollectionsRule());
                return $ret;
            })());
        }
        get h5() {
            return this.get_h5();
        }
        aio(a) {
            return this.aip(a);
        }
        aj2(a) {
            return this.aj3(a);
        }
        ain(a) {
            let b = this.aio(0);
            b.name = a;
            return b;
        }
        u3() {
            this.xAxis = this.ain("xAxis");
            this.yAxis = this.aj2(0);
            this.yAxis.name = "yAxis";
            this.volumeAxis = this.aj2(0);
            this.volumeAxis.name = "volumeAxis";
            this.volumeXAxis = this.ain("volumeXAxis");
            this.alg = new List$1(NumericYAxis.$, 0);
            this.ali = new List$1(CategoryAxisBase.$, 0);
            this.indicatorAxis = this.aj2(0);
            this.indicatorAxis.name = "indicatorAxis";
            this.indicatorXAxis = this.ain("indicatorXAxis_0");
            this.alg.add(this.indicatorAxis);
            this.ali.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.aj2(0);
            this.zoomSliderAxis.name = "zoomSliderAxis";
            this.zoomSliderXAxis = this.ain("zoomSliderXAxis");
            if (this.zoomSliderAxis.az == null) {
                this.zoomSliderAxis.az = new AxisLabelSettings();
            }
            if (this.zoomSliderXAxis.az == null) {
                this.zoomSliderXAxis.az = new AxisLabelSettings();
            }
        }
        ux(a, b) {
            let c = typeCast(MarkerSeries.$, a);
            if (c != null) {
                c.xf = this.c2(a, b);
            }
        }
        c1(a) {
            if (a != null) {
                return 1;
            }
            return super.c1(a);
        }
        xe(a) {
            if (a.suggestedSecondaryAxis == 2) {
                this.yAxis.lo = true;
                this.yAxis.mm = 10;
            }
        }
        xh() {
            this.yAxis.lo = this.ak9;
            this.yAxis.mm = this.am7;
        }
        ai6(a) {
            let b;
            if (this.ai4 == 0) {
                if (a == null || a.index > 0 || stringIsNullOrEmpty(a.getMemberPathFor(12))) {
                    b = 4;
                }
                else {
                    b = 2;
                }
            }
            else {
                b = this.ai4;
            }
            b = this.ai5(b);
            return b;
        }
        ai5(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;
        }
        ajf(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;
        }
        ai8(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;
        }
        anu(a) {
            let b = a.getMemberPathFor(14);
            if (stringIsNullOrEmpty(b)) {
                b = a.getMemberPathFor(11);
            }
            return b;
        }
        aip(axisType_) {
            if ((this.externalObject)) {
                return (this.externalObject.createXAxis(axisType_).i);
            }
            else {
                let a;
                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;
            }
        }
        aj3(axisType_) {
            if ((this.externalObject)) {
                return (this.externalObject.createYAxis(axisType_).i);
            }
            else {
                let a;
                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;
            }
        }
        aj9() {
            return this.df(1);
        }
        aka() {
            return this.df(0);
        }
        aj8() {
            return this.df(2);
        }
        akb() {
            return this.df(20);
        }
        get aks() {
            return (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy"));
        }
        get ajq() {
            if (TypeRegistrar.isRegistered("HorizontalAnchoredCategorySeriesProxy")) {
                return TypeRegistrar.create("HorizontalAnchoredCategorySeriesProxy");
            }
            else {
                throw new BaseError(1, "horizontal series module is not loaded, but is required.");
            }
        }
        get akv() {
            return (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy"));
        }
        get ajo() {
            if (TypeRegistrar.isRegistered("FinancialPriceSeriesProxy")) {
                return TypeRegistrar.create("FinancialPriceSeriesProxy");
            }
            else {
                throw new BaseError(1, "financial series module is not loaded, but is required.");
            }
        }
        get akt() {
            return (TypeRegistrar.isRegistered("IndicatorProxy"));
        }
        get ajs() {
            if (TypeRegistrar.isRegistered("IndicatorProxy")) {
                return TypeRegistrar.create("IndicatorProxy");
            }
            else {
                throw new BaseError(1, "financial series module is not loaded, but is required.");
            }
        }
        get aku() {
            return (TypeRegistrar.isRegistered("OverlayProxy"));
        }
        get ajx() {
            if (TypeRegistrar.isRegistered("OverlayProxy")) {
                return TypeRegistrar.create("OverlayProxy");
            }
            else {
                throw new BaseError(1, "overlay series module is not loaded, but is required.");
            }
        }
        dc(a, b) {
            let c = this.anu(a);
            switch (this.ai6(a)) {
                case 3:
                    let d = this.aj9();
                    this.ajq.setValueMemberPath(d, c);
                    this.ajq.setXAxis(d, this.xAxis);
                    this.ajq.setYAxis(d, this.yAxis);
                    this.ajq.setCategoryMode(d, 1);
                    return d;
                case 4:
                    let e = this.aka();
                    this.ajq.setValueMemberPath(e, c);
                    this.ajq.setXAxis(e, this.xAxis);
                    this.ajq.setYAxis(e, this.yAxis);
                    this.ajq.setCategoryMode(e, 1);
                    return e;
                default:
                case 1:
                case 2:
                    let f = this.akb();
                    this.ajo.setOpenMemberPath(f, a.getMemberPathFor(11));
                    this.ajo.setHighMemberPath(f, a.getMemberPathFor(12));
                    this.ajo.setLowMemberPath(f, a.getMemberPathFor(13));
                    this.ajo.setCloseMemberPath(f, a.getMemberPathFor(14));
                    this.ajo.setVolumeMemberPath(f, a.getMemberPathFor(15));
                    this.ajo.setXAxis(f, this.xAxis);
                    this.ajo.setYAxis(f, this.yAxis);
                    this.ajo.setDisplayType(f, this.ai4 == 1 ? 1 : 0);
                    this.ajo.setCategoryMode(f, 1);
                    return f;
            }
        }
        xg() {
            super.xg();
            this.aql(this.xAxis);
            this.aq9(false);
            if (this.ai9 != 0 && this.volumeChart != null) {
                this.aqs();
            }
            this.aql(this.volumeXAxis);
            this.aql(this.indicatorXAxis);
            this.aq6();
            this.aq8();
            if (this.ajg != 0) {
                this.aqt();
                this.aql(this.zoomSliderXAxis);
            }
        }
        agi(a, b) {
            super.agi(a, b);
            a(this.volumeXAxis);
            if (this.ali != null) {
                for (let c of fromEnum(this.ali)) {
                    a(c);
                }
            }
            let d = true;
            switch (b) {
                case "XAxisMajorStroke":
                case "XAxisMajorStrokeThickness":
                    d = false;
                    break;
            }
            if (d) {
                a(this.zoomSliderXAxis);
            }
        }
        agn(a, b) {
            super.agn(a, b);
            if (b) {
                a(this.volumeAxis);
                if (this.alg != null) {
                    for (let c of fromEnum(this.alg)) {
                        a(c);
                    }
                }
                a(this.zoomSliderAxis);
            }
        }
        aqp(a) {
            let b = typeCast(IZoomableCategoryAxis_$type, this.xAxis);
            if (b != null) {
                a(b);
            }
        }
        agl(a) {
            super.agl(a);
            this.agc(this.volumeXAxis, a);
            this.agc(this.indicatorXAxis, a);
            this.agc(this.zoomSliderXAxis, a);
        }
        agq(a) {
            super.agq(a);
            this.agc(this.volumeAxis, a);
            this.agc(this.indicatorAxis, a);
            this.agc(this.zoomSliderAxis, a);
        }
        ago(a) {
            super.ago(a);
            this.agb(this.volumeAxis, a);
            this.agb(this.indicatorAxis, a);
            this.agb(this.zoomSliderAxis, a);
        }
        agj(a) {
            super.agj(a);
            this.agb(this.volumeXAxis, a);
            this.agb(this.indicatorXAxis, a);
            this.agb(this.zoomSliderXAxis, a);
        }
        vo(a) {
            super.vo(a);
            if (a == null) {
                return;
            }
            if (a == this.zoomSliderChart) {
                a.x7 = a.ya = false;
                a.legend = null;
                if (this.dataChart != null) {
                    a.ag = this.dataChart.ag;
                    a.aj = this.dataChart.aj;
                }
            }
            else {
                SyncManager.d(a, ((() => {
                    let $ret = new SyncSettings();
                    $ret.syncChannel = this.aop();
                    $ret.synchronizeHorizontally = true;
                    $ret.synchronizeVertically = false;
                    return $ret;
                })()));
                SyncManager.c(a);
            }
            a.cz = 2;
        }
        aop() {
            if (this.anm == null) {
                FinancialChart.am6++;
                this.anm = FinancialChart.am6.toString();
            }
            return this.anm;
        }
        ap7(a, b) {
            this.apt();
            this.aqn();
        }
        apt() {
            if (this.yAxis.b8()) {
                return;
            }
            let a = this.yAxis.aw.bg;
            if (this.ai9 != 0) {
                a = Math.max(a, this.volumeAxis.aw.bg);
            }
            for (let b of fromEnum(this.alg)) {
                a = Math.max(a, b.aw.bg);
            }
            this.apu(a);
        }
        apu(a) {
            if (this.yAxis.b8()) {
                return;
            }
            this.yAxis.eu = this.volumeAxis.eu = a;
            for (let b of fromEnum(this.alg)) {
                b.eu = a;
            }
            this.zoomSliderAxis.eu = this.yAxis.eu;
        }
        apz(a) {
            if (this.indicatorCharts == null) {
                return;
            }
            for (let b = 0; b < this.indicatorCharts.count; b++) {
                let c = this.indicatorCharts._inner[b];
                for (let d = 0; d < c.series.count; d++) {
                    let e = c.series._inner[d];
                    if (!(this.akx(e))) {
                        continue;
                    }
                    a(c.series._inner[d], b);
                }
            }
        }
        ap2(a) {
            if (this.volumeChart == null) {
                return;
            }
            for (let b = 0; b < this.volumeChart.series.count; b++) {
                let c = this.volumeChart.series._inner[b];
                if (c.eu) {
                    continue;
                }
                a(this.volumeChart.series._inner[b], b);
            }
        }
        ap0(a) {
            if (this.dataChart == null) {
                return;
            }
            for (let b = 0; b < this.dataChart.series.count; b++) {
                let c = this.dataChart.series._inner[b];
                if (!this.akz(c)) {
                    continue;
                }
                a(c, b);
            }
        }
        ap1(a, b) {
            if (this.dataChart == null) {
                return;
            }
            for (let c = 0; c < this.dataChart.series.count; c++) {
                let d = this.dataChart.series._inner[c];
                if (this.akz(d)) {
                    continue;
                }
                let e = this.am0(d, c);
                a(d, e);
            }
            if (b) {
                this.ap3(a);
            }
        }
        ap3(a) {
            if (this.zoomSliderChart == null) {
                return;
            }
            for (let b = 0; b < this.zoomSliderChart.series.count; b++) {
                let c = this.zoomSliderChart.series._inner[b];
                if (c.eu) {
                    continue;
                }
                a(this.zoomSliderChart.series._inner[b], b);
            }
        }
        am0(a, b) {
            if (a.da != this.dataChart) {
                return b;
            }
            let c = this.bf == null || this.bf.dataSeries == null ? 0 : this.bf.dataSeries.count;
            let d = this.ajk == null ? 0 : this.ajk.count;
            return b - (c * d);
        }
        vd(a) {
            super.vd(a);
            this.ap2(a);
            this.apz(a);
            this.ap3(a);
        }
        get volumeChart() {
            return this.akf;
        }
        set volumeChart(a) {
            let b = this.volumeChart;
            if (a != b) {
                this.akf = a;
                this.wj("VolumeChart", b, this.volumeChart);
            }
        }
        aqs() {
            if (this.dataChart == null) {
                return;
            }
            this.volumeChart.series.clear();
            let a = new List$1(Series.$, 0);
            let b = -1;
            for (let c = 0; c < this.dataChart.series.count; c++) {
                let d = this.dataChart.series._inner[c];
                if (this.akz(d) || d.eu) {
                    continue;
                }
                b++;
                let e;
                let f = this.ai9;
                f = this.ai8(f);
                switch (f) {
                    case 2:
                        e = this.aka();
                        break;
                    case 3:
                        e = this.aj8();
                        break;
                    default:
                    case 1:
                        e = this.aj9();
                        break;
                }
                this.ajq.setCategoryMode(e, 1);
                e.name = "volumeSeries_" + b;
                e.itemsSource = d.itemsSource;
                this.ajq.setXAxis(e, this.volumeXAxis);
                this.ajq.setYAxis(e, this.volumeAxis);
                this.ajq.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.vk = ArrayExtension.getModulus$1(Brush.$, this.aih, b);
                e.v0 = ArrayExtension.getModulus$1(Brush.$, this.aii, b);
                e.jq = this.amb;
                a.add(e);
            }
            let g = this.h2("volume", false);
            if (g != null) {
                a.o(g);
            }
            for (let h = 0; h < a.count; h++) {
                let i = a._inner[h];
                this.volumeChart.series.add(i);
                this.vt(i, h);
            }
        }
        akw(a) {
            if (!this.aks) {
                return false;
            }
            return this.ajq.matchesType(a);
        }
        ak0(a) {
            if (!this.akv) {
                return false;
            }
            return this.ajo.matchesType(a);
        }
        akx(a) {
            if (!this.akt) {
                return false;
            }
            return this.ajs.matchesType(a);
        }
        akz(a) {
            if (!this.aku) {
                return false;
            }
            return this.ajx.matchesType(a);
        }
        aqr() {
            if (this.dataChart == null) {
                return;
            }
            let a = 0;
            let b = this.aji == null ? 0 : this.aji.count;
            let c = this.customIndicatorNames == null ? 0 : this.customIndicatorNames.count;
            let d = b + c;
            for (let e = 0; e < d; e++) {
                let f = new List$1(Series.$, 0);
                let g = this.indicatorCharts._inner[e];
                let h = e >= b;
                let i = h ? this.customIndicatorNames._inner[e - b] : EnumUtil.getName(FinancialIndicatorType_$type, this.aji._inner[e]);
                let j = -1;
                for (let k = 0; k < this.dataChart.series.count; k++) {
                    let l = this.dataChart.series._inner[k];
                    if (this.akz(l) || l.eu) {
                        continue;
                    }
                    j++;
                    let m;
                    if (h) {
                        let n = this.akc("Custom");
                        this.ajs.handleCustomIndicatorEvent(n, runOn(this, this.ap5));
                        m = n;
                    }
                    else {
                        m = this.ake(this.aji._inner[e]);
                    }
                    if (m == null) {
                        continue;
                    }
                    m.name = "indicator_" + a++;
                    this.ajs.setXAxis(m, this.ali._inner[e]);
                    this.ajs.setYAxis(m, this.alg._inner[e]);
                    m.itemsSource = l.itemsSource;
                    this.ajs.setOpenMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(11));
                    this.ajs.setHighMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(12));
                    this.ajs.setLowMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(13));
                    this.ajs.setCloseMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(14));
                    this.ajs.setVolumeMemberPath(m, this.bf.dataSeries._inner[j].getMemberPathFor(15));
                    m.title = l.title + " " + i;
                    m.vk = ArrayExtension.getModulus$1(Brush.$, this.aib, e);
                    m.jq = this.al7;
                    if (this.akx(m)) {
                        this.ajs.setNegativeBrush(m, ArrayExtension.getModulus$1(Brush.$, this.aic, e));
                        this.ajs.setDisplayType(m, ArrayExtension.getModulus$1(IndicatorDisplayType_$type, this.aju, e));
                    }
                    if (this.am2 != -2147483648 && this.akx(m)) {
                        this.ajs.setPeriodOverride(m, this.am2);
                    }
                    if (this.akx(m)) {
                        this.ajs.setSmoothingPeriod(m, this.am5);
                    }
                    if (this.akx(m)) {
                        this.ajs.setSignalPeriod(m, this.am4);
                    }
                    if (this.akx(m)) {
                        this.ajs.setShortPeriod(m, this.am3);
                        this.ajs.setLongPeriod(m, this.am1);
                    }
                    this.vt(m, e);
                    f.add(m);
                }
                let o = this.h2(i, false);
                for (let p = 0; p < f.count; p++) {
                    let q = f._inner[p];
                    g.series.add(q);
                }
                if (o != null) {
                    for (let r = 0; r < o.count; r++) {
                        let s = o._inner[r];
                        g.series.add(s);
                        this.vt(s, r);
                    }
                }
            }
        }
        akc(indicatorName_) {
            return (this.externalObject.createIndicator(indicatorName_ + 'Indicator').i);
        }
        ake(a) {
            return this.akc(EnumUtil.getName(FinancialIndicatorType_$type, a));
        }
        aq9(a) {
            if (this.ai2 == null) {
                return;
            }
            let b = this.xAxis;
            if (b.actualMinimumValue > b.actualMaximumValue) {
                return;
            }
            this.ai2.as = b.actualMinimumValue;
            this.ai2.ar = b.actualMaximumValue;
            if (a) {
                this.ai2.au = b.visibleMinimum;
                this.ai2.at = b.visibleMaximum;
            }
            this.ai2.bn();
        }
        l9() {
            let a = ((() => {
                let $ret = new FinancialChartVisualData();
                $ret.mainChart = super.l9();
                $ret.volumeChart = this.volumeChart == null ? null : this.volumeChart.zj();
                $ret.toolbar = this.ai2 == null ? null : this.ai2.aj();
                $ret.zoomChart = this.zoomSliderChart == null ? null : this.zoomSliderChart.zj();
                return $ret;
            })());
            if (this.indicatorCharts != null) {
                a.indicatorCharts = new List$1(Base.$, 0);
                for (let b of fromEnum(this.indicatorCharts)) {
                    a.indicatorCharts.add1(b.zj());
                }
            }
            if (this.dataChart != null) {
                a.mainChartLeft = this.ari(this.dataChart).x;
                a.mainChartTop = this.ari(this.dataChart).y;
            }
            if (this.volumeChart != null) {
                a.volumeChartLeft = this.ari(this.volumeChart).x;
                a.volumeChartTop = this.ari(this.volumeChart).y;
            }
            if (this.zoomSliderChart != null) {
                a.zoomChartLeft = this.ari(this.zoomSliderChart).x;
                a.zoomChartTop = this.ari(this.zoomSliderChart).y;
            }
            if (this.ai2 != null) {
                let c = this.arj(this.ai2);
                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);
                for (let d of fromEnum(this.indicatorCharts)) {
                    a.indicatorChartLefts.add(this.ari(d).x);
                    a.indicatorChartTops.add(this.ari(d).y);
                }
            }
            let e = this.arl();
            a.legendLeft = e.left;
            a.legendTop = e.top;
            a.legendWidth = e.width;
            a.legendHeight = e.height;
            a.legend = this.ajm == null ? null : this.ajm.exportVisualData();
            return a;
        }
        anr() {
            let a = this.l9();
            a.scaleByViewport();
            return a.serialize();
        }
        akd(overlayName_) {
            return (this.externalObject.createOverlay(overlayName_ + 'Overlay').i);
        }
        aq8() {
            if (this.dataChart == null) {
                return;
            }
            let a = new List$1(Series.$, 0);
            for (let b of fromEnum(this.dataChart.series)) {
                if (this.akz(b)) {
                    a.add(b);
                }
            }
            for (let c of fromEnum(a)) {
                this.dataChart.series.remove(c);
            }
            if (this.ajk == null) {
                return;
            }
            let d = new List$1(Series.$, 0);
            let e = -1;
            for (let f = 0; f < this.dataChart.series.count; f++) {
                let g = this.dataChart.series._inner[f];
                if (this.akz(g) || g.eu) {
                    continue;
                }
                e++;
                for (let h = 0; h < this.ajk.count; h++) {
                    let i = this.ajk._inner[h];
                    let j;
                    switch (i) {
                        case 1:
                            j = this.akd(EnumUtil.getName(FinancialOverlayType_$type, i));
                            break;
                        default:
                        case 0:
                            j = this.akd(EnumUtil.getName(FinancialOverlayType_$type, i));
                            break;
                    }
                    j.name = g.name + "_" + EnumUtil.getName(FinancialOverlayType_$type, i);
                    this.ajx.setXAxis(j, this.xAxis);
                    this.ajx.setYAxis(j, this.yAxis);
                    j.itemsSource = g.itemsSource;
                    let k = e * this.ajk.count + h;
                    j.vk = ArrayExtension.getModulus$1(Brush.$, this.aif, k);
                    j.v0 = ArrayExtension.getModulus$1(Brush.$, this.aig, k);
                    j.jq = this.al9;
                    j.title = g.title + " " + EnumUtil.getName(FinancialOverlayType_$type, i);
                    let l = g;
                    if (l == null) {
                        continue;
                    }
                    let m = this.bf.dataSeries._inner[e];
                    this.ajx.setOpenMemberPath(j, m.getMemberPathFor(11));
                    this.ajx.setHighMemberPath(j, m.getMemberPathFor(12));
                    this.ajx.setLowMemberPath(j, m.getMemberPathFor(13));
                    this.ajx.setCloseMemberPath(j, m.getMemberPathFor(14));
                    this.ajx.setVolumeMemberPath(j, m.getMemberPathFor(15));
                    d.add(j);
                }
            }
            let 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 (let o = 0; o < n.length; o++) {
                n[o].index = -1;
            }
            d.o(n);
            for (let p = 0; p < d.count; p++) {
                let q = d._inner[p];
                this.dataChart.series.add(q);
                this.vt(q, p);
            }
        }
        aq6() {
            if (this.ak5) {
                return;
            }
            this.ak5 = true;
            if (this.indicatorCharts != null) {
                let a = this.indicatorCharts;
                this.indicatorCharts = null;
                for (let b of fromEnum(a)) {
                    this.aqm(b);
                }
            }
            if ((this.aji == null || this.aji.count == 0) && (this.customIndicatorNames == null || this.customIndicatorNames.count == 0)) {
                this.indicatorCharts = null;
                if (this.alg != null) {
                    this.alg.clear();
                }
                if (this.ali != null) {
                    this.ali.clear();
                }
                this.aqx();
                this.aq7();
                this.ak5 = false;
                return;
            }
            if (this.indicatorCharts == null) {
                this.indicatorCharts = new List$1(XamDataChart.$, 0);
            }
            this.indicatorCharts.clear();
            this.alg.clear();
            this.ali.clear();
            let c = this.aji == null ? 0 : this.aji.count;
            let d = this.customIndicatorNames == null ? 0 : this.customIndicatorNames.count;
            let e = c + d;
            for (let f = 0; f < e; f++) {
                let g = new XamDataChart();
                this.indicatorCharts.add(g);
                this.aqk(g, null);
                let h = f >= c;
                if (h) {
                    g.ml = this.customIndicatorNames._inner[f - c];
                }
                else {
                    g.ml = this.ant(this.aji._inner[f]);
                }
                if (this.indicatorAxis != null) {
                    let i;
                    let j;
                    if (f == 0) {
                        i = this.indicatorAxis;
                        j = this.indicatorXAxis;
                    }
                    else {
                        i = new NumericYAxis();
                        if (!this.indicatorXAxis.ce) {
                            j = this.aio(0);
                        }
                        else {
                            j = this.aio(1);
                        }
                    }
                    j.name = "indicatorXAxis_" + f;
                    i.name = "indicatorAxis_" + f;
                    g.axes.add(i);
                    g.axes.add(j);
                    this.alg.add(i);
                    this.ali.add(j);
                    if (this.gm) {
                        this.agf(i);
                    }
                    if (this.gm) {
                        this.agd(j);
                    }
                }
            }
            this.aqx();
            this.aqr();
            if (this.ai2 != null) {
                this.ai2.ae = this.aji;
            }
            this.apv();
            this.aq7();
            this.ak5 = false;
        }
        vl() {
            super.vl();
            this.agd(this.xAxis);
            this.agd(this.volumeXAxis);
            if (this.ali != null) {
                for (let a of fromEnum(this.ali)) {
                    this.agd(a);
                }
            }
            this.agf(this.yAxis);
            this.agf(this.volumeAxis);
            if (this.alg != null) {
                for (let b of fromEnum(this.alg)) {
                    this.agf(b);
                }
            }
            this.agd(this.zoomSliderXAxis);
            this.agf(this.zoomSliderAxis);
        }
        get_hh() {
            return !this.ak3;
        }
        get alb() {
            return (this.externalObject._dynamicContent);
        }
        are(a, b) {
            this.aq0(a, b, this.ams);
            this.apv();
            if (this.zoomSliderChart != null) {
                this.zoomSliderChart.axes.add(this.zoomSliderAxis);
                this.zoomSliderChart.axes.add(this.zoomSliderXAxis);
            }
            this.aqt();
            this.zoomSliderXAxis.itemsSource = this.xAxis.itemsSource;
            this.aqy();
            this.arf(a, b);
        }
        aqt() {
            if (this.dataChart == null || this.zoomSliderChart == null) {
                return;
            }
            this.zoomSliderChart.series.clear();
            let a = new List$1(Series.$, 0);
            for (let b = 0; b < this.dataChart.series.count; b++) {
                let c = this.dataChart.series._inner[b];
                if (this.akz(c) || c.eu) {
                    continue;
                }
                let d;
                let e = this.ajg;
                e = this.ajf(e);
                let f = this.am0(c, b);
                if (e == 1) {
                    switch (this.ai6(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.akb();
                        this.ajo.setDisplayType(d, 1);
                        break;
                    case 3:
                        d = this.akb();
                        this.ajo.setDisplayType(d, 0);
                        break;
                    case 5:
                        d = this.aka();
                        break;
                    case 6:
                        d = this.aj8();
                        break;
                    default:
                    case 4:
                        d = this.aj9();
                        break;
                }
                let g = this.bf != null && this.bf.dataSeries != null && this.bf.dataSeries.count > f ? this.bf.dataSeries._inner[f] : null;
                if (d.e0 && !d.e8) {
                    this.ajq.setCategoryMode(d, 1);
                    this.ajq.setXAxis(d, this.zoomSliderXAxis);
                    this.ajq.setYAxis(d, this.zoomSliderAxis);
                    this.ajq.setValueMemberPath(d, g == null ? null : this.anu(g));
                }
                else if (d.e8) {
                    this.ajo.setCategoryMode(d, 1);
                    this.ajo.setXAxis(d, this.zoomSliderXAxis);
                    this.ajo.setYAxis(d, this.zoomSliderAxis);
                    if (g != null) {
                        this.ajo.setOpenMemberPath(d, g.getMemberPathFor(11));
                        this.ajo.setHighMemberPath(d, g.getMemberPathFor(12));
                        this.ajo.setLowMemberPath(d, g.getMemberPathFor(13));
                        this.ajo.setCloseMemberPath(d, g.getMemberPathFor(14));
                        this.ajo.setVolumeMemberPath(d, g.getMemberPathFor(15));
                    }
                }
                d.name = "zoomSliderSeries_" + f;
                d.itemsSource = c.itemsSource;
                d.title = c.title;
                d.jq = this.kk;
                a.add(d);
            }
            for (let h = 0; h < a.count; h++) {
                let i = a._inner[h];
                this.zoomSliderChart.series.add(i);
                this.vt(i, h);
            }
        }
        v9(a, b, c) {
            super.v9(a, b, c);
            if (a == null || !b) {
                return;
            }
            let d = true;
            let e = true;
            switch (c) {
                case "Brushes":
                case "Outlines":
                    d = e = false;
                    break;
            }
            if (this.indicatorCharts != null && d) {
                for (let f of fromEnum(this.indicatorCharts)) {
                    a(f);
                }
            }
            if (this.volumeChart != null && e) {
                a(this.volumeChart);
            }
            if (this.zoomSliderChart != null) {
                a(this.zoomSliderChart);
            }
        }
        ap5(a, b) {
            let c = b;
            let d = a;
            let e = -1;
            if (this.indicatorCharts != null) {
                e = this.indicatorCharts.indexOf(d.da);
            }
            e -= this.aji == null ? 0 : this.aji.count;
            if (this.applyCustomIndicators != null) {
                this.applyCustomIndicators(this, new FinancialChartCustomIndicatorArgs(c, d, e));
            }
        }
        aq2(a, b, c) {
            if (a != null) {
                if (b != null) {
                    a.axes.remove(b);
                }
                a.axes.add(c);
            }
            if (this.gm) {
                this.agd(c);
            }
        }
        get ala() {
            return TypeRegistrar.isRegistered("IgxZoomSliderComponent");
        }
        ap6(a, b) {
            this.aq6();
        }
        ak1(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;
        }
        aqw() {
            let a = this.ai0 != null ? this.ai0 : new FinancialChartRangeSelectorOptionCollection(1, [5, 4, 3, 2, 1, 0]);
            let b = new FinancialChartRangeSelectorOptionCollection(0);
            let c = this.xAxis;
            let d = +(c.actualMaximumValue) - +(c.actualMinimumValue);
            for (let e of fromEnum(a)) {
                if (this.ak1(e, d)) {
                    b.add(e);
                }
            }
            this.aiz = b;
            if (this.ai2 != null) {
                this.ai2.u = this.aiz;
            }
        }
        aqa(a, b) {
            this.aqw();
        }
        aqf(a, b) {
            this.ajk = this.ai2.ag;
        }
        aqe(a, b) {
            this.aji = this.ai2.ae;
        }
        ap8(a, b) {
            this.aq6();
        }
        ap9(a, b) {
            this.aq8();
        }
        aqj(a, b) {
            let c = a;
            if (c.bg == null) {
                return;
            }
            if (this.ak3) {
                this.aqv(c.bg);
            }
        }
        aqm(a) {
            SyncManager.e(a);
            a.axes.clear();
            a.series.clear();
            a.gridAreaRectChanged = delegateRemove(a.gridAreaRectChanged, runOn(this, this.ap7));
            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.ah1;
            }
        }
        aqk(a, b) {
            let c = a != this.zoomSliderChart;
            if (c) {
                if (this.dataChart != null) {
                    a.xc = new Rect(0, this.dataChart.wt.x, a.xc.y, this.dataChart.wt.width, a.xc.height);
                }
                let d = ((() => {
                    let $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.ap7));
            this.vn(a, b);
        }
        apv() {
            if (this.indicatorCharts != null || this.volumeChart != null) {
                this.agb(this.xAxis, (a) => a.visibility = 1);
            }
            for (let a = 0; a < this.ali.count; a++) {
                let b = this.ali._inner[a];
                let c = a < this.ali.count - 1 || this.volumeChart != null;
                this.agb(b, (d) => d.visibility = c ? 1 : 0);
            }
        }
        aq0(a, b, c) {
            if (a != null) {
                this.aqm(a);
            }
            if (b != null) {
                this.aqk(b, c);
            }
        }
        arc(a, b) {
            this.aq0(a, b, this.amr);
            this.apv();
            if (this.volumeChart != null) {
                if (this.volumeAxis != null) {
                    this.volumeChart.axes.add(this.volumeAxis);
                    this.volumeChart.axes.add(this.volumeXAxis);
                }
                this.aqs();
                this.volumeXAxis.itemsSource = this.xAxis.itemsSource;
            }
            this.ard(a, b);
        }
        aqb(a, b) {
            this.ara();
        }
        ara() {
            if (this.ai2 == null || +(this.ai2.au) == +(dateMaxValue()) || +(this.ai2.at) == +(dateMinValue()) || this.dataChart == null) {
                return;
            }
            let a = this.xAxis;
            let b = a.getWindowRectForSelection(this.ai2.au, this.ai2.at);
            if (b.width == 0 || isNaN_(b.width) || isInfinity(b.width)) {
                return;
            }
            this.ak4 = true;
            this.dataChart.xc = new Rect(0, b.left, this.dataChart.xc.top, b.width, this.dataChart.xc.height);
            if (this.akk != null) {
                this.akk.windowRect = this.dataChart.wt;
            }
            if (this.ak3) {
                this.aqv(this.dataChart);
            }
            this.ak4 = false;
        }
        aqi(a, b) {
            this.aqw();
            this.aq9(!this.ak4);
        }
        ap4(a, b) {
            if (!this.ak4) {
                if (this.ak3) {
                    this.aqv(a);
                }
                let c = false;
                let d = this.ws(() => this.aq9(true), c);
                c = d.p1;
                if (this.akk != null) {
                    this.akk.windowRect = this.dataChart.wt;
                }
            }
        }
        aq4(a, b, c, d) {
            if (a == null || b == null) {
                return;
            }
            if (c != -1) {
                this.ak4 = true;
                a.xc = new Rect(0, d, a.wt.top, c, a.wt.height);
                this.ak4 = false;
            }
            let e = 1.7976931348623157E+308;
            let f = -1.7976931348623157E+308;
            let g = new Rect(0, 0, 0, 1, 1);
            let h = new ScalerParams(0, g, g, this.yAxis.ch, a.wx);
            for (let i of fromEnum(a.series)) {
                h.b = i.iz();
                let j = i.az(a.wt);
                let k = j == null || j.c == 1.7976931348623157E+308 || isNaN_(j.c);
                if (k) {
                    continue;
                }
                let l = b.el(j.c, h);
                let m = b.el(j.b, h);
                f = Math.max(f, l);
                e = Math.min(e, m);
            }
            let n = a.wt.width;
            if (c != -1) {
                n = c;
            }
            let o = a.wt.left;
            if (d != -1) {
                o = d;
            }
            if (e == 1.7976931348623157E+308 || f == -1.7976931348623157E+308 || isNaN_(e) || isNaN_(f)) {
                return;
            }
            this.ak4 = true;
            let p = new Rect(0, o, e, n, f - e);
            a.xc = p;
            this.ak4 = false;
        }
        aq3(a) {
            if (a == null) {
                return;
            }
            if (a == this.dataChart) {
                this.aq4(this.dataChart, this.yAxis, -1, -1);
                if (this.volumeChart != null) {
                    this.aq4(this.volumeChart, this.volumeAxis, this.dataChart.wt.width, this.dataChart.wt.left);
                }
            }
            else if (a == this.volumeChart) {
                this.aq4(this.volumeChart, this.volumeAxis, -1, -1);
                this.aq4(this.dataChart, this.yAxis, this.volumeChart.wt.width, this.volumeChart.wt.left);
            }
        }
        aqv(a) {
            this.wr(() => this.aq3(a));
        }
        aqc(a, b) {
            if (this.ak3) {
                this.aqv(a);
            }
        }
        arb() {
            if (!this.alb) {
                return;
            }
            this.apy();
            if (this.ajg == 0) {
                this.resetZoom();
                this.zoomSliderChart = null;
                this.ams.rootWrapper.removeChildren();
            }
            else if (this.zoomSliderChart == null) {
                this.zoomSliderChart = ((() => {
                    let $ret = new XamDataChart();
                    $ret.name = "ZoomSliderChart";
                    return $ret;
                })());
                this.aqy();
            }
            else {
                this.aqt();
            }
        }
        apy() {
            let container_ = this.ams.rootWrapper.getNativeElement();
            let containerParent_ = container_.parentElement;
            if (this.akk != null && containerParent_ != null && !this.alc) {
                this.alc = true;
                if (TypeRegistrar.isRegistered("IgxZoomSliderComponent")) {
                    let z_ = this.akk;
                    let f_ = this.externalObject;
                    let sliderComponent_ = TypeRegistrar.get("IgxZoomSliderComponent");
                    let sliderInstance_ = TypeRegistrar.create("IgxZoomSliderComponent");
                    sliderInstance_._implementation = z_;
                    sliderComponent_._staticStyling(container_, sliderInstance_, f_);
                }
            }
        }
        aq5() {
            if (this.ajb != 1) {
                return;
            }
            this.agh((a) => {
                let b;
                b = a.breaks;
                b.clear();
                if (this.xAxisBreaks == null) {
                    return;
                }
                for (let c of fromEnum(this.xAxisBreaks)) {
                    b.add(c);
                }
            });
        }
        xl(a, b, c) {
            super.xl(a, b, c);
            if (this.bf.dataSeries.count > 0) {
                if (this.ajb == 1 && stringIsNullOrEmpty(this.n3)) {
                    this.ce.setXMemberPath(a, c.getMemberPathFor(17));
                }
                if (stringIsNullOrEmpty(this.n5)) {
                    this.ce.setYMemberPath(a, this.anu(c));
                }
                if (stringIsNullOrEmpty(this.nq)) {
                    this.ce.setLabelMemberPath(a, this.anu(c));
                }
                if (stringIsNullOrEmpty(this.nm)) {
                    this.ce.setContentMemberPath(a, this.anu(c));
                }
            }
        }
        ant(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";
            }
        }
        agd(a) {
            super.agd(a);
            let b = a;
            this.aql(b);
            if (a.bg != null) {
                for (let c of fromEnum(a.bg.series)) {
                    if (this.akw(c)) {
                        this.ajq.setXAxis(c, b);
                    }
                    else if (this.ak0(c)) {
                        this.ajo.setXAxis(c, b);
                    }
                    else if (this.akx(c)) {
                        this.ajs.setXAxis(c, b);
                    }
                    else if (this.akz(c)) {
                        this.ajx.setXAxis(c, b);
                    }
                }
            }
            this.aqp((d) => {
                d.zoomMaximumCategoryRange = this.amc;
                d.zoomMaximumItemSpan = this.amd;
                d.zoomToCategoryRange = this.ame;
                d.zoomToCategoryStart = this.amf;
                d.zoomToItemSpan = this.amg;
            });
            let d = a == this.zoomSliderXAxis;
            if (d) {
                a.jz = this.arh;
                a.et = this.amn;
                this.agb(a, (e) => e.visibility = 1);
            }
            let e = a;
            e.minimumValue = this.alo;
            e.maximumValue = this.aln;
            a.b1 = this.ak6;
        }
        agf(a) {
            super.agf(a);
            if (a.bg != null && a == this.yAxis) {
                for (let b of fromEnum(a.bg.series)) {
                    if (this.akw(b)) {
                        this.ajq.setYAxis(b, this.yAxis);
                    }
                    else if (this.ak0(b)) {
                        this.ajo.setYAxis(b, this.yAxis);
                    }
                    else if (this.akx(b)) {
                        this.ajs.setYAxis(b, this.yAxis);
                    }
                    else if (this.akz(b)) {
                        this.ajx.setYAxis(b, this.yAxis);
                    }
                }
            }
            a.lf = this.ak7;
            a.mc = this.aml;
            a.mb = this.amk;
            if (a == this.yAxis) {
                a.l8 = this.amj;
            }
            let c = a == this.zoomSliderAxis;
            if (c) {
                this.agb(a, (d) => d.visibility = 1);
            }
            a.b1 = this.ak8;
        }
        aql(a) {
            a.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
            a.f2 = XYChart.adw(a, this.bf.dataSeries);
            if (this.bf.dataSeries.count > 0) {
                let b = this.bf.dataSeries._inner[0].getMemberPathFor(17);
                a.h1(b);
            }
        }
        vt(a, b) {
            if (a == null) {
                return;
            }
            let c = this.zoomSliderChart == a.da;
            let d = this.dataChart != null && this.dataChart.series.contains(a);
            if (d && !a.eu && !this.akz(a)) {
                a.l5 = "Financial Series";
            }
            super.vt(a, b);
            if ((d || c) && a.fn) {
                a.r7(this.aid != null ? ArrayExtension.getModulus$1(Brush.$, this.aid, b) : null, this.aie != null ? ArrayExtension.getModulus$1(Brush.$, this.aie, b) : null);
            }
            let e = this.akx(a);
            if (this.akz(a)) {
                a.vk = this.aif != null ? ArrayExtension.getModulus$1(Brush.$, this.aif, b) : null;
                a.v0 = this.aig != null ? ArrayExtension.getModulus$1(Brush.$, this.aig, b) : null;
                a.jq = this.al9;
            }
            else if (e) {
                a.vk = this.aib != null ? ArrayExtension.getModulus$1(Brush.$, this.aib, b) : null;
                a.jq = this.al7;
            }
            else if (!a.eu && (d || c)) {
                a.vk = this.z != null ? ArrayExtension.getModulus$1(Brush.$, this.z, b) : null;
                a.v0 = this.ad != null ? ArrayExtension.getModulus$1(Brush.$, this.ad, b) : null;
            }
            let f = this.volumeChart != null && this.volumeChart == a.da;
            if (f) {
                a.jq = this.amb;
            }
            a.legend = c || f || e || !a.isUsableInLegend ? null : this.legend != null ? this.legend : this.aky ? this.ajm : null;
        }
        vu(a, b) {
            super.vu(a, b);
            if (a == null) {
                return;
            }
        }
        wj(a, b, c) {
            super.wj(a, b, c);
            switch (a) {
                case "YAxisIsLogarithmic":
                    this.yAxis.lo = this.ak9;
                    if (this.volumeAxis != null) {
                        this.volumeAxis.lo = this.ak9;
                    }
                    if (this.zoomSliderAxis != null) {
                        this.zoomSliderAxis.lo = this.ak9;
                    }
                    break;
                case "YAxisLogarithmBase":
                    this.yAxis.mm = this.am7;
                    if (this.volumeAxis != null) {
                        this.volumeAxis.mm = this.am7;
                    }
                    if (this.zoomSliderAxis != null) {
                        this.zoomSliderAxis.mm = this.am7;
                    }
                    break;
                case "VolumeType":
                    let d = EnumUtil.getEnumValue(FinancialChartVolumeType_$type, b);
                    if (this.ai9 == 0) {
                        this.volumeChart = null;
                    }
                    else if (this.volumeChart == null) {
                        this.volumeChart = ((() => {
                            let $ret = new XamDataChart();
                            $ret.name = "VolumeChart";
                            return $ret;
                        })());
                    }
                    else {
                        this.aqs();
                    }
                    break;
                case "VolumeChart":
                    this.arc(typeCast(XamDataChart.$, b), typeCast(XamDataChart.$, c));
                    break;
                case "DataChart":
                    if (typeCast(XamDataChart.$, b) !== null) {
                        let e = b;
                        e.gridAreaRectChanged = delegateRemove(e.gridAreaRectChanged, runOn(this, this.ap7));
                        e.actualWindowRectChanged = delegateRemove(e.actualWindowRectChanged, runOn(this, this.ap4));
                        e.seriesDataUpdated = delegateRemove(e.seriesDataUpdated, runOn(this, this.aqc));
                    }
                    if (this.dataChart != null) {
                        let f = this.dataChart;
                        f.gridAreaRectChanged = delegateCombine(f.gridAreaRectChanged, runOn(this, this.ap7));
                        let g = this.dataChart;
                        g.actualWindowRectChanged = delegateCombine(g.actualWindowRectChanged, runOn(this, this.ap4));
                        let h = this.dataChart;
                        h.seriesDataUpdated = delegateCombine(h.seriesDataUpdated, runOn(this, this.aqc));
                    }
                    this.arb();
                    break;
                case "XAxisMode":
                    this.xAxis = this.aio(this.ajb);
                    this.xAxis.name = "xAxis";
                    this.volumeXAxis = this.aio(this.ajb);
                    this.volumeXAxis.name = "volumeXAxis";
                    this.indicatorXAxis = this.aio(this.ajb);
                    this.indicatorXAxis.name = "indicatorXAxis_0";
                    this.zoomSliderXAxis = this.aio(this.ajb);
                    this.zoomSliderXAxis.name = "zoomSliderXAxis";
                    this.agb(this.zoomSliderXAxis, (i) => i.visibility = 1);
                    this.apv();
                    if (this.ajb == 1) {
                        this.aq5();
                    }
                    break;
                case "YAxisMode":
                    this.yAxis = this.aj2(this.ajd);
                    this.yAxis.name = "yAxis";
                    this.zoomSliderAxis = this.aj2(this.ajd);
                    this.zoomSliderAxis.name = "zoomSliderAxis";
                    this.volumeAxis = this.aj2(this.ajd);
                    this.volumeAxis.name = "volumeAxis";
                    break;
                case "Toolbar":
                    let i = typeCast(FinancialChartToolbar.$, b);
                    if (i != null) {
                        i.rangeChanged = delegateRemove(i.rangeChanged, runOn(this, this.aqb));
                        i.indicatorTypesChanged = delegateRemove(i.indicatorTypesChanged, runOn(this, this.aqe));
                        i.overlayTypesChanged = delegateRemove(i.overlayTypesChanged, runOn(this, this.aqf));
                    }
                    if (this.ai2 != null) {
                        this.ai2.ae = this.aji;
                        this.ai2.ag = this.ajk;
                        this.ai2.u = this.aiz;
                        this.aq9(true);
                        let j = this.ai2;
                        j.rangeChanged = delegateCombine(j.rangeChanged, runOn(this, this.aqb));
                        let k = this.ai2;
                        k.indicatorTypesChanged = delegateCombine(k.indicatorTypesChanged, runOn(this, this.aqe));
                        let l = this.ai2;
                        l.overlayTypesChanged = delegateCombine(l.overlayTypesChanged, runOn(this, this.aqf));
                    }
                    break;
                case "XAxis":
                    let m = typeCast(CategoryAxisBase.$, b);
                    if (m != null) {
                        if (this.dataChart != null) {
                            this.dataChart.axes.remove(m);
                        }
                    }
                    let n = typeCast(ITimeRangeSelectorAxis_$type, b);
                    if (n != null) {
                        n.visibleRangeChanged = delegateRemove(n.visibleRangeChanged, runOn(this, this.aqi));
                    }
                    if (this.dataChart != null) {
                        this.dataChart.axes.add(this.xAxis);
                    }
                    if (this.gm) {
                        this.agd(this.xAxis);
                        this.va();
                    }
                    this.aq9(false);
                    this.ara();
                    this.aqw();
                    let o = this.xAxis;
                    o.visibleRangeChanged = delegateCombine(o.visibleRangeChanged, runOn(this, this.aqi));
                    break;
                case "XAxisZoomMaximumCategoryRange":
                    this.aqp((p) => p.zoomMaximumCategoryRange = this.amc);
                    break;
                case "XAxisZoomMaximumItemSpan":
                    this.aqp((p) => p.zoomMaximumItemSpan = this.amd);
                    break;
                case "XAxisZoomToCategoryRange":
                    this.aqp((p) => p.zoomToCategoryRange = this.ame);
                    break;
                case "XAxisZoomToCategoryStart":
                    this.aqp((p) => p.zoomToCategoryStart = this.amf);
                    break;
                case "XAxisZoomToItemSpan":
                    this.aqp((p) => p.zoomToItemSpan = this.amg);
                    break;
                case "ChartType":
                    this.ve();
                    break;
                case "VolumeXAxis":
                    this.aq2(this.volumeChart, typeCast(Axis.$, b), this.volumeXAxis);
                    break;
                case "ZoomSliderXAxis":
                    this.aq2(this.zoomSliderChart, typeCast(Axis.$, b), this.zoomSliderXAxis);
                    break;
                case "IndicatorXAxis":
                    this.aq6();
                    break;
                case "YAxis":
                    let 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.gm) {
                        this.agf(this.yAxis);
                        this.agf(this.yAxis);
                    }
                    let q = this.yAxis;
                    q.rangeChanged = delegateCombine(q.rangeChanged, runOn(this, this.aqj));
                    break;
                case "VolumeAxis":
                    let 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.aqs();
                    }
                    if (this.gm) {
                        this.agf(this.volumeAxis);
                    }
                    let s = this.volumeAxis;
                    s.rangeChanged = delegateCombine(s.rangeChanged, runOn(this, this.aqj));
                    break;
                case "IndicatorAxis":
                    if (this.indicatorCharts != null) {
                        for (let t = 0; t < this.indicatorCharts.count; t++) {
                            let u = this.indicatorCharts._inner[t];
                            let v = new List$1(Axis.$, 0);
                            for (let w of fromEnum(u.axes)) {
                                if (typeCast(NumericYAxis.$, w) !== null) {
                                    v.add(w);
                                }
                            }
                            for (let x of fromEnum(v)) {
                                u.axes.remove(x);
                            }
                            let y = null;
                            if (t == 0) {
                                y = this.indicatorAxis;
                            }
                            else if (this.ajd == 1) {
                                y = this.aj2(this.ajd);
                            }
                            else if (typeCast(NumericYAxis.$, this.indicatorAxis) !== null) {
                                y = new NumericYAxis();
                            }
                            if (y != null) {
                                u.axes.add(y);
                            }
                            if (this.gm) {
                                this.agf(y);
                            }
                        }
                    }
                    break;
                case "IsWindowSyncedToVisibleRange":
                    if (this.dataChart != null) {
                        this.dataChart.ya = this.hi && this.hh;
                    }
                    if (this.volumeChart != null) {
                        this.volumeChart.ya = this.hi && this.hh;
                    }
                    if (this.ak3) {
                        this.aq3(this.dataChart);
                    }
                    else {
                        this.volumeChart.zh = 1;
                    }
                    break;
                case "IndicatorTypes":
                    let z = typeCast(ObservableCollection$1.$.specialize(FinancialIndicatorType_$type), b);
                    if (z != null) {
                        z.collectionChanged = delegateRemove(z.collectionChanged, runOn(this, this.ap8));
                    }
                    let aa = typeCast(ObservableCollection$1.$.specialize(FinancialIndicatorType_$type), c);
                    if (aa != null) {
                        aa.collectionChanged = delegateCombine(aa.collectionChanged, runOn(this, this.ap8));
                    }
                    this.aq6();
                    break;
                case "OverlayTypes":
                    let ab = typeCast(ObservableCollection$1.$.specialize(FinancialOverlayType_$type), b);
                    if (ab != null) {
                        ab.collectionChanged = delegateRemove(ab.collectionChanged, runOn(this, this.ap9));
                    }
                    let ac = typeCast(ObservableCollection$1.$.specialize(FinancialOverlayType_$type), c);
                    if (ac != null) {
                        ac.collectionChanged = delegateCombine(ac.collectionChanged, runOn(this, this.ap9));
                    }
                    this.aq8();
                    break;
                case "YAxisAbbreviateLargeNumbers":
                    this.agm((ad) => ad.lf = this.ak7);
                    break;
                case "YAxisMinimumValue":
                    this.agn((ad) => ad.mc = this.aml, false);
                    break;
                case "YAxisMaximumValue":
                    this.agn((ad) => ad.mb = this.amk, false);
                    break;
                case "YAxisInterval":
                    this.agn((ad) => ad.l8 = this.amj, false);
                    break;
                case "Thickness":
                case "ZoomSliderType":
                    this.arb();
                    break;
                case "ZoomSliderChart":
                    if (!this.ala) {
                        return;
                    }
                    this.are(typeCast(XamDataChart.$, b), typeCast(XamDataChart.$, c));
                    break;
                case "NegativeBrushes":
                case "NegativeOutlines":
                    this.ap1((ad, ae) => {
                        if (ad.fn) {
                            ad.r7(this.aid != null ? ArrayExtension.getModulus$1(Brush.$, this.aid, ae) : null, this.aie != null ? ArrayExtension.getModulus$1(Brush.$, this.aie, ae) : null);
                        }
                    }, true);
                    break;
                case "OverlayBrushes":
                    this.ap0((ad, ae) => ad.vk = this.aif != null ? ArrayExtension.getModulus$1(Brush.$, this.aif, ae) : null);
                    break;
                case "OverlayOutlines":
                    this.ap0((ad, ae) => ad.v0 = this.aig != null ? ArrayExtension.getModulus$1(Brush.$, this.aig, ae) : null);
                    break;
                case "OverlayThickness":
                    this.ap0((ad, ae) => ad.jq = this.al9);
                    break;
                case "OverlayMultiplier":
                    this.ap0((ad, ae) => this.ajx.setMultiplier(ad, this.al8));
                    break;
                case "VolumeBrushes":
                    this.ap2((ad, ae) => ad.vk = ArrayExtension.getModulus$1(Brush.$, this.aih, ae));
                    break;
                case "VolumeOutlines":
                    this.ap2((ad, ae) => ad.v0 = ArrayExtension.getModulus$1(Brush.$, this.aii, ae));
                    break;
                case "VolumeThickness":
                    this.ap2((ad, ae) => ad.jq = this.amb);
                    break;
                case "IndicatorNegativeBrushes":
                    this.apz((ad, ae) => this.ajs.setNegativeBrush(ad, ArrayExtension.getModulus$1(Brush.$, this.aic, ae)));
                    break;
                case "IndicatorBrushes":
                    this.apz((ad, ae) => ad.vk = ArrayExtension.getModulus$1(Brush.$, this.aib, ae));
                    break;
                case "IndicatorThickness":
                    this.apz((ad, ae) => ad.jq = this.al7);
                    break;
                case "IndicatorDisplayTypes":
                    this.apz((ad, ae) => this.ajs.setDisplayType(ad, ArrayExtension.getModulus$1(IndicatorDisplayType_$type, this.aju, ae)));
                    break;
                case "IndicatorPeriod":
                    this.apz((ad, ae) => {
                        if (this.am2 == -2147483648) {
                            return;
                        }
                        this.ajs.setPeriodOverride(ad, this.am2);
                    });
                    break;
                case "IndicatorMultiplier":
                    this.apz((ad, ae) => this.ajs.setMultiplier(ad, this.al6));
                    break;
                case "IndicatorSmoothingPeriod":
                    this.apz((ad, ae) => this.ajs.setSmoothingPeriod(ad, this.am5));
                    break;
                case "IndicatorShortPeriod":
                    this.apz((ad, ae) => this.ajs.setShortPeriod(ad, this.am3));
                    break;
                case "IndicatorLongPeriod":
                    this.apz((ad, ae) => this.ajs.setLongPeriod(ad, this.am1));
                    break;
                case "IndicatorSignalPeriod":
                    this.apz((ad, ae) => this.ajs.setSignalPeriod(ad, this.am4));
                    break;
                case "RangeSelectorOptions":
                    let ad = typeCast(FinancialChartRangeSelectorOptionCollection.$, b);
                    if (ad != null) {
                        ad.collectionChanged = delegateRemove(ad.collectionChanged, runOn(this, this.aqa));
                    }
                    if (this.ai0 != null) {
                        let ae = this.ai0;
                        ae.collectionChanged = delegateCombine(ae.collectionChanged, runOn(this, this.aqa));
                    }
                    this.aqw();
                    break;
                case "CustomIndicatorNames":
                    let af = typeCast(ObservableCollection$1.$.specialize(String_$type), b);
                    if (af != null) {
                        af.collectionChanged = delegateRemove(af.collectionChanged, runOn(this, this.ap6));
                    }
                    if (this.customIndicatorNames != null) {
                        let ag = this.customIndicatorNames;
                        ag.collectionChanged = delegateCombine(ag.collectionChanged, runOn(this, this.ap6));
                    }
                    this.aq6();
                    break;
                case "Legend":
                    if (this.zoomSliderChart != null) {
                        this.zoomSliderChart.legend = null;
                    }
                    break;
                case "Brushes":
                    this.ap1((ah, ai) => ah.vk = this.z != null ? ArrayExtension.getModulus$1(Brush.$, this.z, ai) : null, true);
                    break;
                case "Outlines":
                    this.ap1((ah, ai) => ah.v0 = this.ad != null ? ArrayExtension.getModulus$1(Brush.$, this.ad, ai) : null, true);
                    break;
                case "XAxisLabelVisibility":
                    if (this.ah1 == 0 && this.zoomSliderXAxis != null) {
                        this.agb(this.zoomSliderXAxis, (ah) => ah.visibility = 1);
                    }
                    this.apv();
                    break;
                case "YAxisLabelVisibility":
                    if (this.ah2 != 0 || this.zoomSliderAxis == null) {
                        break;
                    }
                    this.agb(this.zoomSliderAxis, (ah) => ah.visibility = 1);
                    break;
                case "ZoomSliderXAxisMajorStroke":
                    this.zoomSliderXAxis.jz = this.arh;
                    break;
                case "ZoomSliderXAxisMajorStrokeThickness":
                    this.zoomSliderXAxis.et = this.amn;
                    break;
                case "FinancialChartLegend":
                case "IsLegendVisible":
                    let ah = this.aky && this.legend == null;
                    {
                        let ai = (aj, ak) => {
                            if (aj.isUsableInLegend) {
                                aj.legend = ah ? this.ajm : null;
                            }
                        };
                        this.ap1(ai, false);
                        this.ap0(ai);
                    }
                    break;
                case "ZoomSliderAxis":
                    let 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.aqt();
                            this.zoomSliderXAxis.itemsSource = this.xAxis.itemsSource;
                        }
                        if (this.gm) {
                            this.agf(this.zoomSliderAxis);
                        }
                        this.agb(this.zoomSliderAxis, (ak) => ak.visibility = 1);
                    }
                    break;
                case "XAxisMinimumValue":
                    this.agh((ak) => {
                        let al = typeCast(ITimeRangeSelectorAxis_$type, ak);
                        if (al != null) {
                            al.minimumValue = this.alo;
                        }
                    });
                    break;
                case "XAxisMaximumValue":
                    this.agh((ak) => {
                        let al = typeCast(ITimeRangeSelectorAxis_$type, ak);
                        if (al != null) {
                            al.maximumValue = this.aln;
                        }
                    });
                    break;
                case FinancialChart.ao2:
                    this.agi((ak) => ak.b1 = this.ak6, a);
                    break;
                case FinancialChart.apd:
                    this.agm((ak) => ak.b1 = this.ak8);
                    break;
            }
        }
        get_cb() {
            return 1;
        }
        get cb() {
            return this.get_cb();
        }
        get ak9() {
            return this.akr;
        }
        set ak9(a) {
            let b = this.ak9;
            if (a != b) {
                this.akr = a;
                this.wj("YAxisIsLogarithmic", b, this.ak9);
            }
        }
        get am7() {
            return this.amz;
        }
        set am7(a) {
            let b = this.am7;
            if (a != b) {
                this.amz = a;
                this.wj("YAxisLogarithmBase", b, this.am7);
            }
        }
        get amj() {
            return this.al0;
        }
        set amj(a) {
            let b = this.amj;
            if (a != b) {
                this.al0 = a;
                this.wj("YAxisInterval", b, this.amj);
            }
        }
        get aml() {
            return this.al2;
        }
        set aml(a) {
            let b = this.aml;
            if (a != b) {
                this.al2 = a;
                this.wj("YAxisMinimumValue", b, this.aml);
            }
        }
        get amk() {
            return this.al1;
        }
        set amk(a) {
            let b = this.amk;
            if (a != b) {
                this.al1 = a;
                this.wj("YAxisMaximumValue", b, this.amk);
            }
        }
        get amm() {
            return this.al3;
        }
        set amm(a) {
            let b = this.amm;
            if (a != b) {
                this.al3 = a;
                this.wj("YAxisMinorInterval", b, this.amm);
            }
        }
        get ami() {
            return this.yAxis.l4;
        }
        get amh() {
            return this.yAxis.l3;
        }
        get ai9() {
            return this.ai7;
        }
        set ai9(a) {
            let b = this.ai9;
            if (a != b) {
                this.ai7 = a;
                this.wj("VolumeType", enumGetBox(FinancialChartVolumeType_$type, b), enumGetBox(FinancialChartVolumeType_$type, this.ai9));
            }
        }
        get ajb() {
            return this.aja;
        }
        set ajb(a) {
            let b = this.ajb;
            if (a != b) {
                this.aja = a;
                this.wj("XAxisMode", enumGetBox(FinancialChartXAxisMode_$type, b), enumGetBox(FinancialChartXAxisMode_$type, this.ajb));
            }
        }
        get amc() {
            return this.alv;
        }
        set amc(a) {
            let b = this.amc;
            if (a != b) {
                this.alv = a;
                this.wj("XAxisZoomMaximumCategoryRange", b, this.amc);
            }
        }
        get amf() {
            return this.aly;
        }
        set amf(a) {
            let b = this.amf;
            if (a != b) {
                this.aly = a;
                this.wj("XAxisZoomToCategoryStart", b, this.amf);
            }
        }
        get amd() {
            return this.alw;
        }
        set amd(a) {
            let b = this.amd;
            if (a != b) {
                this.alw = a;
                this.wj("XAxisZoomMaximumItemSpan", b, this.amd);
            }
        }
        get ame() {
            return this.alx;
        }
        set ame(a) {
            let b = this.ame;
            if (a != b) {
                this.alx = a;
                this.wj("XAxisZoomToCategoryRange", b, this.ame);
            }
        }
        get amg() {
            return this.alz;
        }
        set amg(a) {
            let b = this.amg;
            if (a != b) {
                this.alz = a;
                this.wj("XAxisZoomToItemSpan", b, this.amg);
            }
        }
        get ajd() {
            return this.ajc;
        }
        set ajd(a) {
            let b = this.ajd;
            if (a != b) {
                this.ajc = a;
                this.wj("YAxisMode", enumGetBox(FinancialChartYAxisMode_$type, b), enumGetBox(FinancialChartYAxisMode_$type, this.ajd));
            }
        }
        get ak2() {
            return this.akm;
        }
        set ak2(a) {
            let b = this.ak2;
            if (a != b) {
                this.akm = a;
                this.wj("IsToolbarVisible", b, this.ak2);
            }
        }
        get ai4() {
            return this.ai3;
        }
        set ai4(a) {
            let b = this.ai4;
            if (a != b) {
                this.ai3 = a;
                this.wj("ChartType", enumGetBox(FinancialChartType_$type, b), enumGetBox(FinancialChartType_$type, this.ai4));
            }
        }
        get_agw() {
            return super.get_agw();
        }
        set_agw(a) {
            super.set_agw(a);
        }
        get ak3() {
            return this.akn;
        }
        set ak3(a) {
            let b = this.ak3;
            if (a != b) {
                this.akn = a;
                this.wj("IsWindowSyncedToVisibleRange", b, this.ak3);
            }
        }
        get aji() {
            return this.ajh;
        }
        set aji(a) {
            let b = this.aji;
            if (a != b) {
                this.ajh = a;
                this.wj("IndicatorTypes", b, this.aji);
            }
        }
        get ajk() {
            return this.ajj;
        }
        set ajk(a) {
            let b = this.ajk;
            if (a != b) {
                this.ajj = a;
                this.wj("OverlayTypes", b, this.ajk);
            }
        }
        get indicatorCharts() {
            return this.ale;
        }
        set indicatorCharts(a) {
            let b = this.indicatorCharts;
            if (a != b) {
                this.ale = a;
                this.wj("IndicatorCharts", b, this.indicatorCharts);
            }
        }
        get ak7() {
            return this.akp;
        }
        set ak7(a) {
            let b = this.ak7;
            if (a != b) {
                this.akp = a;
                this.wj("YAxisAbbreviateLargeNumbers", b, this.ak7);
            }
        }
        get_ke() {
            return super.get_ke();
        }
        set_ke(a) {
            super.set_ke(a);
        }
        get ak6() {
            return this.ako;
        }
        set ak6(a) {
            let b = this.ak6;
            if (a != b) {
                this.ako = a;
                this.wj(FinancialChart.ao2, b, this.ak6);
            }
        }
        get ak8() {
            return this.akq;
        }
        set ak8(a) {
            let b = this.ak8;
            if (a != b) {
                this.akq = a;
                this.wj(FinancialChart.apd, b, this.ak8);
            }
        }
        get zoomSliderChart() {
            return this.akg;
        }
        set zoomSliderChart(a) {
            let b = this.zoomSliderChart;
            if (a != b) {
                this.akg = a;
                this.wj("ZoomSliderChart", b, this.zoomSliderChart);
            }
        }
        get zoomSliderAxis() {
            return this.aj1;
        }
        set zoomSliderAxis(a) {
            let b = this.zoomSliderAxis;
            if (a != b) {
                this.aj1 = a;
                this.wj("ZoomSliderAxis", b, this.zoomSliderAxis);
            }
        }
        get zoomSliderXAxis() {
            return this.aim;
        }
        set zoomSliderXAxis(a) {
            let b = this.zoomSliderXAxis;
            if (a != b) {
                this.aim = a;
                this.wj("ZoomSliderXAxis", b, this.zoomSliderXAxis);
            }
        }
        get ajg() {
            return this.aje;
        }
        set ajg(a) {
            let b = this.ajg;
            if (a != b) {
                this.aje = a;
                this.wj("ZoomSliderType", enumGetBox(FinancialChartZoomSliderType_$type, b), enumGetBox(FinancialChartZoomSliderType_$type, this.ajg));
            }
        }
        get aid() {
            return this.ah5;
        }
        set aid(a) {
            let b = this.aid;
            if (a != b) {
                this.ah5 = a;
                this.wj("NegativeBrushes", b, this.aid);
            }
        }
        get aie() {
            return this.ah6;
        }
        set aie(a) {
            let b = this.aie;
            if (a != b) {
                this.ah6 = a;
                this.wj("NegativeOutlines", b, this.aie);
            }
        }
        get aif() {
            return this.ah7;
        }
        set aif(a) {
            let b = this.aif;
            if (a != b) {
                this.ah7 = a;
                this.wj("OverlayBrushes", b, this.aif);
            }
        }
        get aig() {
            return this.ah8;
        }
        set aig(a) {
            let b = this.aig;
            if (a != b) {
                this.ah8 = a;
                this.wj("OverlayOutlines", b, this.aig);
            }
        }
        get aii() {
            return this.aia;
        }
        set aii(a) {
            let b = this.aii;
            if (a != b) {
                this.aia = a;
                this.wj("VolumeOutlines", b, this.aii);
            }
        }
        get aih() {
            return this.ah9;
        }
        set aih(a) {
            let b = this.aih;
            if (a != b) {
                this.ah9 = a;
                this.wj("VolumeBrushes", b, this.aih);
            }
        }
        get aic() {
            return this.ah4;
        }
        set aic(a) {
            let b = this.aic;
            if (a != b) {
                this.ah4 = a;
                this.wj("IndicatorNegativeBrushes", b, this.aic);
            }
        }
        get aib() {
            return this.ah3;
        }
        set aib(a) {
            let b = this.aib;
            if (a != b) {
                this.ah3 = a;
                this.wj("IndicatorBrushes", b, this.aib);
            }
        }
        get amb() {
            return this.alu;
        }
        set amb(a) {
            let b = this.amb;
            if (a != b) {
                this.alu = a;
                this.wj("VolumeThickness", b, this.amb);
            }
        }
        get al9() {
            return this.als;
        }
        set al9(a) {
            let b = this.al9;
            if (a != b) {
                this.als = a;
                this.wj("OverlayThickness", b, this.al9);
            }
        }
        get al8() {
            return this.alr;
        }
        set al8(a) {
            let b = this.al8;
            if (a != b) {
                this.alr = a;
                this.wj("OverlayMultiplier", b, this.al8);
            }
        }
        get al7() {
            return this.alq;
        }
        set al7(a) {
            let b = this.al7;
            if (a != b) {
                this.alq = a;
                this.wj("IndicatorThickness", b, this.al7);
            }
        }
        get aju() {
            return this.ajt;
        }
        set aju(a) {
            let b = this.aju;
            if (a != b) {
                this.ajt = a;
                this.wj("IndicatorDisplayTypes", b, this.aju);
            }
        }
        get am2() {
            return this.amv;
        }
        set am2(a) {
            let b = this.am2;
            if (a != b) {
                this.amv = a;
                this.wj("IndicatorPeriod", b, this.am2);
            }
        }
        get al6() {
            return this.alp;
        }
        set al6(a) {
            let b = this.al6;
            if (a != b) {
                this.alp = a;
                this.wj("IndicatorMultiplier", b, this.al6);
            }
        }
        get am5() {
            return this.amy;
        }
        set am5(a) {
            let b = this.am5;
            if (a != b) {
                this.amy = a;
                this.wj("IndicatorSmoothingPeriod", b, this.am5);
            }
        }
        get am3() {
            return this.amw;
        }
        set am3(a) {
            let b = this.am3;
            if (a != b) {
                this.amw = a;
                this.wj("IndicatorShortPeriod", b, this.am3);
            }
        }
        get am1() {
            return this.amu;
        }
        set am1(a) {
            let b = this.am1;
            if (a != b) {
                this.amu = a;
                this.wj("IndicatorLongPeriod", b, this.am1);
            }
        }
        get am4() {
            return this.amx;
        }
        set am4(a) {
            let b = this.am4;
            if (a != b) {
                this.amx = a;
                this.wj("IndicatorSignalPeriod", b, this.am4);
            }
        }
        get ai0() {
            return this.aiy;
        }
        set ai0(a) {
            let b = this.ai0;
            if (a != b) {
                this.aiy = a;
                this.wj("RangeSelectorOptions", b, this.ai0);
            }
        }
        get customIndicatorNames() {
            return this.aiu;
        }
        set customIndicatorNames(a) {
            let b = this.aiu;
            if (a != b) {
                this.aiu = a;
                this.wj("CustomIndicatorNames", b, this.customIndicatorNames);
            }
        }
        get_hi() {
            return super.get_hi();
        }
        set_hi(a) {
            super.set_hi(a);
        }
        get arh() {
            return this.arg;
        }
        set arh(a) {
            let b = this.arh;
            if (a != b) {
                this.arg = a;
                this.wj("ZoomSliderXAxisMajorStroke", b, this.arh);
            }
        }
        get amn() {
            return this.al4;
        }
        set amn(a) {
            let b = this.amn;
            if (a != b) {
                this.al4 = a;
                this.wj("ZoomSliderXAxisMajorStrokeThickness", b, this.amn);
            }
        }
        get aky() {
            return this.akl;
        }
        set aky(a) {
            let b = this.aky;
            if (a != b) {
                this.akl = a;
                this.wj("IsLegendVisible", b, this.aky);
            }
        }
        get ajm() {
            return this.ajl;
        }
        set ajm(a) {
            let b = this.ajm;
            if (a != b) {
                this.ajl = a;
                this.wj("FinancialChartLegend", b, this.ajm);
            }
        }
        get xAxis() {
            return this.ail;
        }
        set xAxis(a) {
            let b = this.xAxis;
            if (a != b) {
                this.ail = a;
                this.wj("XAxis", b, this.xAxis);
            }
        }
        get yAxis() {
            return this.aj0;
        }
        set yAxis(a) {
            let b = this.yAxis;
            if (a != b) {
                this.aj0 = a;
                this.wj("YAxis", b, this.yAxis);
            }
        }
        get volumeAxis() {
            return this.ajz;
        }
        set volumeAxis(a) {
            let b = this.volumeAxis;
            if (a != b) {
                this.ajz = a;
                this.wj("VolumeAxis", b, this.volumeAxis);
            }
        }
        get volumeXAxis() {
            return this.aik;
        }
        set volumeXAxis(a) {
            let b = this.volumeXAxis;
            if (a != b) {
                this.aik = a;
                this.wj("VolumeXAxis", b, this.volumeXAxis);
            }
        }
        get indicatorAxis() {
            return this.ajy;
        }
        set indicatorAxis(a) {
            let b = this.indicatorAxis;
            if (a != b) {
                this.ajy = a;
                this.wj("IndicatorAxis", b, this.indicatorAxis);
            }
        }
        get indicatorXAxis() {
            return this.aij;
        }
        set indicatorXAxis(a) {
            let b = this.indicatorXAxis;
            if (a != b) {
                this.aij = a;
                this.wj("IndicatorXAxis", b, this.indicatorXAxis);
            }
        }
        get alg() {
            return this.ald;
        }
        set alg(a) {
            let b = this.alg;
            if (a != b) {
                this.ald = a;
                this.wj("IndicatorAxes", b, this.alg);
            }
        }
        get ali() {
            return this.alf;
        }
        set ali(a) {
            let b = this.ali;
            if (a != b) {
                this.alf = a;
                this.wj("IndicatorXAxes", b, this.ali);
            }
        }
        get alo() {
            return this.alm;
        }
        set alo(a) {
            let b = this.alo;
            if (+a != +b) {
                this.alm = a;
                this.wj("XAxisMinimumValue", b, this.alo);
            }
        }
        get aln() {
            return this.all;
        }
        set aln(a) {
            let b = this.aln;
            if (+a != +b) {
                this.all = a;
                this.wj("XAxisMaximumValue", b, this.aln);
            }
        }
        get xAxisBreaks() {
            return this.alj;
        }
    }
    FinancialChart.$t = markType(FinancialChart, 'FinancialChart', XYChart.$);
    FinancialChart.am6 = 0;
    FinancialChart.ao2 = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    FinancialChart.apd = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return FinancialChart;
})();
/**
 * @hidden
 */
export let FinancialChartToolbar = /*@__PURE__*/ (() => {
    class FinancialChartToolbar extends TemplatedHtmlControl {
        constructor(a, b) {
            super("financialChartToolbar", b, "");
            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.ani : null);
            this.aa = new FinancialChartTypePicker(a != null ? a.anf : null);
            this.q = new FinancialChartIndicatorMenu(1, a != null ? a.ang : null);
        }
        bg(a) {
            let b = a.querySelectorAll(".financialChartToolbarArea");
            if (b != null && b.length > 0) {
                this.g = b[0];
                if (!this.al) {
                    this.g.hide();
                }
            }
            let c = a.querySelectorAll(".financialChartIndicatorMenu");
            if (c != null && c.length > 0) {
                this.q.g = c[0];
            }
            let d = a.querySelectorAll(".financialChartRangeSelector");
            if (d != null && d.length > 0) {
                this.s.g = d[0];
            }
            let e = a.querySelectorAll(".financialChartTypePicker");
            if (e != null && e.length > 0) {
                this.aa.g = e[0];
            }
        }
        bl(a) {
            this.q.u(a);
            this.aa.u(a);
        }
        get s() {
            return this.r;
        }
        set s(a) {
            let b = this.s;
            if (a != b) {
                this.r = a;
                this.bm("RangeSelector", b, this.s);
            }
        }
        get aa() {
            return this.z;
        }
        set aa(a) {
            let b = this.aa;
            if (a != b) {
                this.z = a;
                this.bm("ChartTypePicker", b, this.aa);
            }
        }
        get q() {
            return this.p;
        }
        set q(a) {
            let b = this.q;
            if (a != b) {
                this.p = a;
                this.bm("IndicatorMenu", b, this.q);
            }
        }
        bm(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":
                    let 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;
                        let e = this.s;
                        e.rangeChanged = delegateCombine(e.rangeChanged, runOn(this, this.bj));
                    }
                    break;
                case "ChartTypePicker":
                    let f = b;
                    if (f != null) {
                        f.selectionChanged = delegateRemove(f.selectionChanged, runOn(this, this.bi));
                    }
                    if (this.aa != null) {
                        this.aa.w = this.y;
                        let 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":
                    let h = typeCast(FinancialChartIndicatorMenu.$, b);
                    if (h != null) {
                        h.selectionChanged = delegateRemove(h.selectionChanged, runOn(this, this.bh));
                    }
                    if (this.q != null) {
                        let 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;
            }
        }
        bh(a, b) {
            this.ag = this.q.z;
            this.ae = this.q.y;
            this.ai = this.q.aa;
            this.ac = this.q.x;
        }
        bi(a, b) {
            this.y = this.aa.w;
            if (this.chartTypeChanged != null) {
                this.chartTypeChanged(this, b);
            }
        }
        bj(a, b) {
            this.au = this.s.v;
            this.at = this.s.u;
            if (this.rangeChanged != null) {
                this.rangeChanged(this, b);
            }
        }
        v() {
            let a = new FinancialChartToolbarContext();
            a.container = this.d;
            a.vm = this.w;
            a.vm.financialChartIndicatorMenu = ((() => {
                let $ret = new FinancialChartIndicatorMenuContext();
                $ret.vm = this.q.p;
                return $ret;
            })());
            a.vm.financialChartTypePicker = ((() => {
                let $ret = new FinancialChartTypePickerContext();
                $ret.vm = this.aa.p;
                return $ret;
            })());
            a.vm.financialChartRangeSelector = ((() => {
                let $ret = new FinancialChartRangeSelectorContext();
                $ret.vm = this.s.q;
                return $ret;
            })());
            return a;
        }
        l(a) {
            super.l(a);
            if (a == null) {
                return;
            }
            this.s.l(a);
            this.aa.l(a);
            this.q.l(a);
            this.bk();
        }
        bk() {
        }
        get au() {
            return this.aq;
        }
        set au(a) {
            let b = this.au;
            if (+a != +b) {
                this.aq = a;
                this.bm("SelectionStart", b, this.au);
            }
        }
        get at() {
            return this.ap;
        }
        set at(a) {
            let b = this.at;
            if (+a != +b) {
                this.ap = a;
                this.bm("SelectionEnd", b, this.at);
            }
        }
        get as() {
            return this.ao;
        }
        set as(a) {
            let b = this.as;
            if (+a != +b) {
                this.ao = a;
                this.bm("RangeStart", b, this.as);
            }
        }
        get ar() {
            return this.an;
        }
        set ar(a) {
            let b = this.ar;
            if (+a != +b) {
                this.an = a;
                this.bm("RangeEnd", b, this.ar);
            }
        }
        bn() {
            if (this.s != null) {
                this.s.ab();
            }
        }
        get y() {
            return this.x;
        }
        set y(a) {
            let b = this.y;
            if (a != b) {
                this.x = a;
                this.bm("ChartType", enumGetBox(FinancialChartType_$type, b), enumGetBox(FinancialChartType_$type, this.y));
            }
        }
        get ai() {
            return this.ah;
        }
        set ai(a) {
            let b = this.ai;
            if (a != b) {
                this.ah = a;
                this.bm("TrendLineType", enumGetBox(TrendLineType_$type, b), enumGetBox(TrendLineType_$type, this.ai));
            }
        }
        get ac() {
            return this.ab;
        }
        set ac(a) {
            let b = this.ac;
            if (a != b) {
                this.ab = a;
                this.bm("VolumeType", enumGetBox(FinancialChartVolumeType_$type, b), enumGetBox(FinancialChartVolumeType_$type, this.ac));
            }
        }
        get ae() {
            return this.ad;
        }
        set ae(a) {
            let b = this.ae;
            if (!FinancialChartToolbar.am(b, a)) {
                this.ad = a;
                this.bm("IndicatorTypes", b, this.ae);
            }
        }
        get ag() {
            return this.af;
        }
        set ag(a) {
            let b = this.ag;
            if (!FinancialChartToolbar.am(b, a)) {
                this.af = a;
                this.bm("OverlayTypes", b, this.ag);
            }
        }
        static am(a, b) {
            if (a == b) {
                return true;
            }
            if ((a == null && b != null) || (a != null && b == null)) {
                return false;
            }
            if (a.count != b.count) {
                return false;
            }
            for (let c of fromEn(a)) {
                if (!b.contains(c)) {
                    return false;
                }
            }
            return true;
        }
        aj() {
            return ((() => {
                let $ret = new FinancialChartToolbarVisualData();
                $ret.rangeSelector = this.s == null ? null : this.s.r();
                return $ret;
            })());
        }
        get u() {
            return this.t;
        }
        set u(a) {
            let b = this.u;
            if (a != b) {
                this.t = a;
                this.bm("RangeSelectorOptions", b, this.u);
            }
        }
        get al() {
            return this.ak;
        }
        set al(a) {
            let b = this.al;
            if (a != b) {
                this.ak = a;
                this.bm("IsToolbarVisible", b, this.al);
            }
        }
    }
    FinancialChartToolbar.$t = markType(FinancialChartToolbar, 'FinancialChartToolbar', TemplatedHtmlControl.$);
    return FinancialChartToolbar;
})();
/**
 * @hidden
 */
export let FinancialChartRangeSelector = /*@__PURE__*/ (() => {
    class FinancialChartRangeSelector extends TemplatedHtmlControl {
        constructor(a) {
            super("financialChartRangeSelector", a, "");
            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;
        }
        get v() {
            return this.q.selectionStart;
        }
        set v(a) {
            this.q.selectionStart = a;
        }
        get u() {
            return this.q.selectionEnd;
        }
        set u(a) {
            this.q.selectionEnd = a;
        }
        get t() {
            return this.q.rangeStart;
        }
        set t(a) {
            this.q.rangeStart = a;
        }
        get s() {
            return this.q.rangeEnd;
        }
        set s(a) {
            this.q.rangeEnd = a;
        }
        ab() {
            if (this.q.onPropertiesChanged()) {
                this.p.g(this.q);
            }
        }
        l(a) {
            super.l(a);
            this.p.f(this.d, this.q);
        }
        z() {
            if (this.rangeChanged != null) {
                this.rangeChanged(this, EventArgs.empty);
            }
        }
        r() {
            return this.p.d(this.g);
        }
        get o() {
            return this.q.options;
        }
        set o(a) {
            let b = !FinancialChartToolbar.am(this.q.options, a);
            if (b) {
                this.q.options = a;
                this.aa();
            }
        }
        aa() {
            let 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;
})();