/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { XYChart } from "./XYChart";
import { typeCast, runOn, delegateCombine, enumGetBox, markType, TypeRegistrar, getInstanceType } from "igniteui-react-core";
import { CategoryChartType_$type } from "./CategoryChartType";
import { CategorySeriesMarkerCollisionAvoidance_$type } from "./CategorySeriesMarkerCollisionAvoidance";
import { CategoryTransitionInMode_$type } from "./CategoryTransitionInMode";
import { TransitionInSpeedType_$type } from "./TransitionInSpeedType";
import { AutoMarginsAndAngleUpdateMode_$type } from "./AutoMarginsAndAngleUpdateMode";
import { AxisRangeBufferMode_$type } from "./AxisRangeBufferMode";
import { CategoryXAxis } from "./CategoryXAxis";
import { List$1 } from "igniteui-react-core";
import { DataSeriesType_$type } from "igniteui-react-core";
import { NumericYAxis } from "./NumericYAxis";
import { IDataSeriesAdapterRule_$type } from "igniteui-react-core";
import { SimpleCategorySeriesRule } from "igniteui-react-core";
import { SubCollectionsRule } from "igniteui-react-core";
import { DVContainer } from "igniteui-react-core";
import { Brush } from "igniteui-react-core";
import { AxisDefaults } from "./AxisDefaults";
import { Defaults } from "./Defaults";
import { Series } from "./Series";
import { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries";
import { ArrayExtension } from "igniteui-react-core";
import { AxisLabelSettings } from "./AxisLabelSettings";
import { DeviceUtils } from "igniteui-react-core";
import { CategoryChartMockDataGenerator } from "./CategoryChartMockDataGenerator";
import { stringIsNullOrEmpty } from "igniteui-react-core";
/**
 * @hidden
 */
var CategoryChart = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CategoryChart, _super);
    function CategoryChart() {
        var _this = _super.call(this) || this;
        _this.ai2 = 1000;
        _this.ai3 = 1000;
        _this.ag5 = null;
        _this.ag6 = null;
        _this.agp = 9;
        _this.agr = 1;
        _this.ahb = false;
        _this.ahc = true;
        _this.agt = 0;
        _this.ag3 = 0;
        _this.ahz = 0;
        _this.ah2 = 0;
        _this.ahy = 0;
        _this.ah1 = 0;
        _this.ah0 = 1;
        _this.ah3 = 0;
        _this.ah9 = NaN;
        _this.agl = 1;
        _this.ahd = true;
        _this.ahe = true;
        _this.ahw = DeviceUtils.g(2);
        _this.ahx = DeviceUtils.g(60);
        _this.ahi = true;
        _this.ahf = true;
        _this.ahh = false;
        _this.agn = 0;
        _this.ahj = false;
        _this.ai4 = 10;
        _this.aib = NaN;
        _this.aia = NaN;
        _this.aic = 0;
        _this.agh = null;
        _this.agi = null;
        _this.ahg = true;
        _this.ah4 = 3;
        _this.ah5 = NaN;
        _this.ah6 = NaN;
        _this.ah7 = NaN;
        _this.ah8 = NaN;
        _this.ag9 = false;
        _this.aha = false;
        _this.ahv = null;
        DVContainer.instance.registerIfLoaded("CategoryChartToolbarFactoryManager");
        _this.ue();
        return _this;
    }
    CategoryChart.prototype.ux = function () {
        _super.prototype.ux.call(this);
        if (this.dataChart == null) {
            return;
        }
        var a = this.dataChart.c8.j.e();
        this.agj = a.d;
        this.agk = a.e;
        if (this.aft == null) {
            this.aft = a.k;
        }
        if (this.af0 == null) {
            this.af0 = a.k;
        }
        this.abs = 0;
        this.af1 = AxisDefaults.h;
        this.af4 = null;
        this.afx = AxisDefaults.g;
        this.afu = null;
        this.abb = AxisDefaults.f;
        this.afy = AxisDefaults.j;
        this.abc = AxisDefaults.e;
        this.go = true;
        this.gp = true;
        this.bf = 0;
        this.jm = Defaults.j;
        this.xw = Defaults.ae;
        this.xr = Defaults.af;
        this.xs = Defaults.ag;
        this.ahn = true;
    };
    CategoryChart.prototype.uz = function (a, b) {
        _super.prototype.uz.call(this, a, b);
        a.kc = this.ai5;
        a.kd = this.ai6;
        a.dc = this.ag7;
        a.dd = this.ag8;
    };
    CategoryChart.prototype.vo = function (a, b, c) {
        var _this = this;
        _super.prototype.vo.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.um(function (d) { return d.kc = _this.ai5; });
                break;
            case "TransitionOutDuration":
                this.um(function (d) { return d.kd = _this.ai6; });
                break;
            case "TransitionInEasingFunction":
                this.um(function (d) { return d.dc = _this.ag7; });
                break;
            case "TransitionOutEasingFunction":
                this.um(function (d) { return d.dd = _this.ag8; });
                break;
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ai5", {
        get: function () {
            return this.ai2;
        },
        set: function (a) {
            var b = this.ai5;
            if (a != b) {
                this.ai2 = a;
                this.vl("TransitionInDuration", b, this.ai5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai6", {
        get: function () {
            return this.ai3;
        },
        set: function (a) {
            var b = this.ai6;
            if (a != b) {
                this.ai3 = a;
                this.vl("TransitionOutDuration", b, this.ai6);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag7", {
        get: function () {
            return this.ag5;
        },
        set: function (a) {
            var b = this.ag7;
            if (a != b) {
                this.ag5 = a;
                this.vl("TransitionInEasingFunction", b, this.ag7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag8", {
        get: function () {
            return this.ag6;
        },
        set: function (a) {
            var b = this.ag8;
            if (a != b) {
                this.ag6 = a;
                this.vl("TransitionOutEasingFunction", b, this.ag8);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ajc = function () {
        var cvd_ = this.lv();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    CategoryChart.prototype.us = function (a, b) {
        _super.prototype.us.call(this, a, b);
        a.eh = this.gg;
        a.w2 = this.aho;
        a.w5 = this.ahp;
        a.xs = this.aid;
        a.xt = this.aie;
        a.v7 = this.agm;
    };
    CategoryChart.prototype.uy = function (a, b) {
        _super.prototype.uy.call(this, a, b);
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c == null) {
            return;
        }
        c.aag = this.ags;
        c.zc = this.ahn;
        c.yw = this.agu;
        c.c3 = this.ag4;
        c.trendLineBrush = ArrayExtension.getModulus$1(Brush.$, this.ah, b);
        c.trendLineType = this.ef;
        c.trendLineThickness = this.ki;
        c.w2 = this.c6(a, b);
        if (a.fk) {
            a.rx(ArrayExtension.getModulus$1(Brush.$, this.agj, b), ArrayExtension.getModulus$1(Brush.$, this.agk, b));
        }
    };
    CategoryChart.prototype.agv = function () {
        return new CategoryXAxis();
    };
    CategoryChart.prototype.agz = function () {
        return new NumericYAxis();
    };
    CategoryChart.prototype.t9 = function () {
        this.xAxis = this.agv();
        this.xAxis.name = "xAxis";
        var a = this.xAxis;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.akg));
        this.yAxis = this.agz();
        this.yAxis.name = "yAxis";
        var b = this.yAxis;
        b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.akh));
        if (this.xAxis.az == null) {
            this.xAxis.az = new AxisLabelSettings();
        }
        if (this.yAxis.az == null) {
            this.yAxis.az = new AxisLabelSettings();
        }
    };
    CategoryChart.prototype.aet = function (a) {
        _super.prototype.aet.call(this, a);
        a.lb = this.ahr;
        a.le = this.aht;
        a.b1 = this.ahs;
    };
    CategoryChart.prototype.aer = function (a) {
        _super.prototype.aer.call(this, a);
        a.b1 = this.ahq;
        a.zoomMaximumCategoryRange = this.air;
        a.zoomToCategoryRange = this.ait;
        a.zoomToCategoryStart = this.aiu;
        a.zoomMaximumItemSpan = this.ais;
        a.zoomToItemSpan = this.aiv;
    };
    CategoryChart.prototype.get_cf = function () {
        return 0;
    };
    Object.defineProperty(CategoryChart.prototype, "cf", {
        get: function () {
            return this.get_cf();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agq", {
        get: function () {
            return this.agp;
        },
        set: function (a) {
            if (a != this.agp) {
                var b = this.agq;
                this.agp = a;
                this.vl("ChartType", enumGetBox(CategoryChartType_$type, b), enumGetBox(CategoryChartType_$type, this.agq));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ags", {
        get: function () {
            return this.agr;
        },
        set: function (a) {
            var b = this.ags;
            if (a != b) {
                this.agr = a;
                this.vl("MarkerCollisionAvoidance", enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, b), enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, this.ags));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahm", {
        get: function () {
            return this.ahb;
        },
        set: function (a) {
            var b = this.ahm;
            if (a != b) {
                this.ahb = a;
                this.vl("IsSplineShapePartOfRange", b, this.ahm);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahn", {
        get: function () {
            return this.ahc;
        },
        set: function (a) {
            var b = this.ahn;
            if (a != b) {
                this.ahc = a;
                this.vl("IsTransitionInEnabled", b, this.ahn);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agu", {
        get: function () {
            return this.agt;
        },
        set: function (a) {
            var b = this.agu;
            if (a != b) {
                this.agt = a;
                this.vl("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.agu));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag4", {
        get: function () {
            return this.ag3;
        },
        set: function (a) {
            var b = this.ag4;
            if (a != b) {
                this.ag3 = a;
                this.vl("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.ag4));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aim", {
        get: function () {
            return this.ahz;
        },
        set: function (a) {
            var b = this.aim;
            if (a != b) {
                this.ahz = a;
                this.vl("XAxisInterval", b, this.aim);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aip", {
        get: function () {
            return this.ah2;
        },
        set: function (a) {
            var b = this.aip;
            if (a != b) {
                this.ah2 = a;
                this.vl("XAxisMinorInterval", b, this.aip);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ail", {
        get: function () {
            return this.ahy;
        },
        set: function (a) {
            var b = this.ail;
            if (a != b) {
                this.ahy = a;
                this.vl("XAxisGap", b, this.ail);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aio", {
        get: function () {
            return this.ah1;
        },
        set: function (a) {
            var b = this.aio;
            if (a != b) {
                this.ah1 = a;
                this.vl("XAxisMinimumGapSize", b, this.aio);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ain", {
        get: function () {
            return this.ah0;
        },
        set: function (a) {
            var b = this.ain;
            if (a != b) {
                this.ah0 = a;
                this.vl("XAxisMaximumGap", b, this.ain);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiq", {
        get: function () {
            return this.ah3;
        },
        set: function (a) {
            var b = this.aiq;
            if (a != b) {
                this.ah3 = a;
                this.vl("XAxisOverlap", b, this.aiq);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiy", {
        get: function () {
            return this.ah9;
        },
        set: function (a) {
            var b = this.aiy;
            if (a != b) {
                this.ah9 = a;
                this.vl("YAxisInterval", b, this.aiy);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agm", {
        get: function () {
            return this.agl;
        },
        set: function (a) {
            var b = this.agm;
            if (a != b) {
                this.agl = a;
                this.vl("AutoMarginAndAngleUpdateMode", enumGetBox(AutoMarginsAndAngleUpdateMode_$type, b), enumGetBox(AutoMarginsAndAngleUpdateMode_$type, this.agm));
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.aki = function () {
        if (this.dataChart != null) {
            this.dataChart.zd();
        }
    };
    Object.defineProperty(CategoryChart.prototype, "aho", {
        get: function () {
            return this.ahd;
        },
        set: function (a) {
            var b = this.aho;
            if (a != b) {
                this.ahd = a;
                this.vl("ShouldAutoExpandMarginForInitialLabels", b, this.aho);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahp", {
        get: function () {
            return this.ahe;
        },
        set: function (a) {
            var b = this.ahp;
            if (a != b) {
                this.ahe = a;
                this.vl(CategoryChart.ajl, b, this.ahp);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aid", {
        get: function () {
            return this.ahw;
        },
        set: function (a) {
            var b = this.aid;
            if (a != b) {
                this.ahw = a;
                this.vl("AutoExpandMarginExtraPadding", b, this.aid);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aie", {
        get: function () {
            return this.ahx;
        },
        set: function (a) {
            var b = this.aie;
            if (a != b) {
                this.ahx = a;
                this.vl("AutoExpandMarginMaximumValue", b, this.aie);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aht", {
        get: function () {
            return this.ahi;
        },
        set: function (a) {
            var b = this.aht;
            if (a != b) {
                this.ahi = a;
                this.vl("YAxisFavorLabellingScaleEnd", b, this.aht);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahq", {
        get: function () {
            return this.ahf;
        },
        set: function (a) {
            var b = this.ahq;
            if (a != b) {
                this.ahf = a;
                this.vl(CategoryChart.ajs, b, this.ahq);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahs", {
        get: function () {
            return this.ahh;
        },
        set: function (a) {
            var b = this.ahs;
            if (a != b) {
                this.ahh = a;
                this.vl(CategoryChart.aj6, b, this.ahs);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ago", {
        get: function () {
            return this.agn;
        },
        set: function (a) {
            var b = this.ago;
            if (a != b) {
                this.agn = a;
                this.vl("YAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ago));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahu", {
        get: function () {
            return this.ahj;
        },
        set: function (a) {
            var b = this.ahu;
            if (a != b) {
                this.ahj = a;
                this.vl("YAxisIsLogarithmic", b, this.ahu);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai7", {
        get: function () {
            return this.ai4;
        },
        set: function (a) {
            var b = this.ai7;
            if (a != b) {
                this.ai4 = a;
                this.vl("YAxisLogarithmBase", b, this.ai7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai0", {
        get: function () {
            return this.aib;
        },
        set: function (a) {
            var b = this.ai0;
            if (a != b) {
                this.aib = a;
                this.vl("YAxisMinimumValue", b, this.ai0);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiz", {
        get: function () {
            return this.aia;
        },
        set: function (a) {
            var b = this.aiz;
            if (a != b) {
                this.aia = a;
                this.vl("YAxisMaximumValue", b, this.aiz);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai1", {
        get: function () {
            return this.aic;
        },
        set: function (a) {
            var b = this.ai1;
            if (a != b) {
                this.aic = a;
                this.vl("YAxisMinorInterval", b, this.ai1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aik", {
        get: function () {
            return this.xAxis.my;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aij", {
        get: function () {
            return this.xAxis.mx;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.aig = function () {
        return this.aik;
    };
    CategoryChart.prototype.aii = function () {
        return this.aix;
    };
    CategoryChart.prototype.aif = function () {
        return this.aij;
    };
    CategoryChart.prototype.aih = function () {
        return this.aiw;
    };
    Object.defineProperty(CategoryChart.prototype, "aix", {
        get: function () {
            return this.yAxis.ly;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiw", {
        get: function () {
            return this.yAxis.lx;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agj", {
        get: function () {
            return this.agh;
        },
        set: function (a) {
            var b = this.agj;
            if (a != b) {
                this.agh = a;
                this.vl("NegativeBrushes", b, this.agj);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agk", {
        get: function () {
            return this.agi;
        },
        set: function (a) {
            var b = this.agk;
            if (a != b) {
                this.agi = a;
                this.vl("NegativeOutlines", b, this.agk);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahr", {
        get: function () {
            return this.ahg;
        },
        set: function (a) {
            var b = this.ahr;
            if (a != b) {
                this.ahg = a;
                this.vl("YAxisAbbreviateLargeNumbers", b, this.ahr);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "air", {
        get: function () {
            return this.ah4;
        },
        set: function (a) {
            var b = this.air;
            if (a != b) {
                this.ah4 = a;
                this.vl("XAxisZoomMaximumCategoryRange", b, this.air);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ais", {
        get: function () {
            return this.ah5;
        },
        set: function (a) {
            var b = this.ais;
            if (a != b) {
                this.ah5 = a;
                this.vl("XAxisZoomMaximumItemSpan", b, this.ais);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ait", {
        get: function () {
            return this.ah6;
        },
        set: function (a) {
            var b = this.ait;
            if (a != b) {
                this.ah6 = a;
                this.vl("XAxisZoomToCategoryRange", b, this.ait);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiu", {
        get: function () {
            return this.ah7;
        },
        set: function (a) {
            var b = this.aiu;
            if (a != b) {
                this.ah7 = a;
                this.vl("XAxisZoomToCategoryStart", b, this.aiu);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiv", {
        get: function () {
            return this.ah8;
        },
        set: function (a) {
            var b = this.aiv;
            if (a != b) {
                this.ah8 = a;
                this.vl("XAxisZoomToItemSpan", b, this.aiv);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahk", {
        get: function () {
            return this.ag9;
        },
        set: function (a) {
            var b = this.ahk;
            if (a != b) {
                this.ag9 = a;
                this.vl("IsCategoryHighlightingEnabled", b, this.ahk);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahl", {
        get: function () {
            return this.aha;
        },
        set: function (a) {
            var b = this.ahl;
            if (a != b) {
                this.aha = a;
                this.vl("IsItemHighlightingEnabled", b, this.ahl);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.get_hy = function () {
        var a = new List$1(DataSeriesType_$type, 0);
        if (TypeRegistrar.isRegistered("AreaSeries")) {
            a.add(2);
        }
        if (TypeRegistrar.isRegistered("ColumnSeries")) {
            a.add(1);
        }
        if (TypeRegistrar.isRegistered("LineSeries")) {
            a.add(0);
        }
        if (TypeRegistrar.isRegistered("PointSeries")) {
            a.add(10);
        }
        if (TypeRegistrar.isRegistered("SplineSeries")) {
            a.add(6);
        }
        if (TypeRegistrar.isRegistered("SplineAreaSeries")) {
            a.add(7);
        }
        if (TypeRegistrar.isRegistered("StepAreaSeries")) {
            a.add(5);
        }
        if (TypeRegistrar.isRegistered("StepLineSeries")) {
            a.add(4);
        }
        if (TypeRegistrar.isRegistered("WaterfallSeries")) {
            a.add(8);
        }
        return a;
    };
    Object.defineProperty(CategoryChart.prototype, "hy", {
        get: function () {
            return this.get_hy();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.h4 = function () {
        if (this.ahv == null) {
            this.ahv = CategoryChartMockDataGenerator.a();
        }
        return this.ahv;
    };
    CategoryChart.prototype.c5 = function (a) {
        if (a != null) {
            var b = _super.prototype.c5.call(this, a);
            if (b == 2) {
                if (a.fj && this.g1) {
                    return 13;
                }
            }
        }
        return _super.prototype.c5.call(this, a);
    };
    CategoryChart.prototype.c7 = function (a) {
        if (a != null) {
            var b = _super.prototype.c5.call(this, a);
            if (b == 2) {
                if (a.fj && this.g1) {
                    return 13;
                }
            }
        }
        return _super.prototype.c7.call(this, a);
    };
    CategoryChart.prototype.get_hj = function () {
        return this.xAxis != null && this.xAxis.categoryMode != 0;
    };
    CategoryChart.prototype.akg = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimum":
                this.v2("XAxisActualMinimum");
                break;
            case "ActualMaximum":
                this.v2("XAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.akh = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimumValue":
                this.v2("YAxisActualMinimum");
                break;
            case "ActualMaximumValue":
                this.v2("YAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.wg = function () {
        _super.prototype.wg.call(this);
        this.xAxis.f1 = this.ab2 == null ? XYChart.ace(this.xAxis, this.bj.dataSeries) : this.ab2;
        this.xAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        if (this.aho) {
            this.vc(function (a) { return a.zd(); });
        }
    };
    Object.defineProperty(CategoryChart.prototype, "xAxis", {
        get: function () {
            return this._xAxis;
        },
        set: function (a) {
            this._xAxis = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "yAxis", {
        get: function () {
            return this._yAxis;
        },
        set: function (a) {
            this._yAxis = a;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.agy = function (a, b) {
        switch (a) {
            case 2: return this.di(1);
            case 3: return this.di(10);
            case 0: return this.di(0);
            case 1: return this.di(2);
            case 6: return this.di(6);
            case 7: return this.di(7);
            case 4: return this.di(4);
            case 5: return this.di(5);
            case 8: return this.di(8);
            case 9: return this.agx(b);
            default: return this.di(1);
        }
    };
    CategoryChart.prototype.agx = function (a) {
        return this.di(a);
    };
    CategoryChart.prototype.bi = function (a) {
        switch (this.agq) {
            case 1: return 2;
            case 0: return 0;
            case 3: return 10;
            case 6: return 6;
            case 7: return 7;
            case 5: return 5;
            case 4: return 4;
            case 8: return 8;
            case 9: return a.suggestedSeries;
            default:
            case 2: return 1;
        }
    };
    CategoryChart.prototype.dg = function (a, b) {
        var c = this.agy(this.agq, a.suggestedSeries);
        c.aa4 = a.findMatchingHint(0).path;
        c.xAxis = this.xAxis;
        c.yAxis = this.yAxis;
        return c;
    };
    CategoryChart.prototype.we = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.lj = true;
            this.yAxis.ma = 10;
        }
    };
    CategoryChart.prototype.wh = function () {
        this.yAxis.lj = this.ahu;
        this.yAxis.ma = this.ai7;
    };
    CategoryChart.prototype.get_hx = function () {
        return ((function () {
            var $ret = new List$1(IDataSeriesAdapterRule_$type, 0);
            $ret.add(new SimpleCategorySeriesRule());
            $ret.add(new SubCollectionsRule());
            return $ret;
        })());
    };
    Object.defineProperty(CategoryChart.prototype, "hx", {
        get: function () {
            return this.get_hx();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.t3 = function (a, b) {
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c != null) {
            c.aag = this.ags;
            c.w2 = this.c6(a, b);
        }
    };
    CategoryChart.prototype.ake = function (a) {
        this.akf(function (b, c) { return a(b); });
    };
    CategoryChart.prototype.akf = function (a) {
        if (this.dataChart == null) {
            return;
        }
        for (var b = 0; b < this.dataChart.series.count; b++) {
            var c = typeCast(HorizontalAnchoredCategorySeries.$, this.dataChart.series._inner[b]);
            if (c == null) {
                continue;
            }
            a(c, b);
        }
    };
    CategoryChart.prototype.zk = function () {
        return this.xAxis;
    };
    CategoryChart.prototype.zl = function () {
        return this.yAxis;
    };
    CategoryChart.prototype.ag1 = function () {
        return this.di(30);
    };
    CategoryChart.prototype.ag2 = function () {
        return this.di(31);
    };
    CategoryChart.prototype.hu = function (a, b) {
        var c = _super.prototype.hu.call(this, a, b);
        if (c != null) {
            var d = new List$1(Series.$, 0);
            if (this.ag9) {
                d.add(this.ag1());
            }
            if (this.aha) {
                d.add(this.ag2());
            }
            for (var e = 0; e < d.count; e++) {
                var f = d._inner[e];
                f.name = a + getInstanceType(f).typeName;
                c.add(f);
            }
        }
        return c;
    };
    CategoryChart.prototype.bd = function () {
        if (this.bc == 0) {
            return 1;
        }
        else {
            return this.bc;
        }
    };
    CategoryChart.prototype.wm = function (a, b, c) {
        _super.prototype.wm.call(this, a, b, c);
        if (this.bj.dataSeries.count > 0) {
            if (stringIsNullOrEmpty(this.nk)) {
                this.ci.setXMemberPath(a, c.getMemberPathFor(16));
            }
            if (stringIsNullOrEmpty(this.nm)) {
                this.ci.setYMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.nc)) {
                this.ci.setLabelMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.m9)) {
                this.ci.setContentMemberPath(a, c.getMemberPathFor(0));
            }
        }
    };
    CategoryChart.prototype.g4 = function () {
        if (this.bf == 4 || this.bf == 3) {
            return true;
        }
        else if (this.bf == 0) {
            if (this.agq == 2 || this.agq == 8) {
                return false;
            }
            else if (this.agq == 9 && this.bj != null && this.bj.dataSeries != null && this.bj.dataSeries.count > 0) {
                var a = this.bj.dataSeries._inner[0].suggestedSeries;
                if (a == 1 || a == 8) {
                    return false;
                }
            }
            return true;
        }
        return false;
    };
    CategoryChart.prototype.get_hb = function () {
        return DVContainer.instance.checkLoaded("CategoryChartToolbarFactoryManager");
    };
    CategoryChart.prototype.vl = function (a, b, c) {
        var _this = this;
        _super.prototype.vl.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.ud();
                break;
            case "MarkerCollisionAvoidance":
                this.ake(function (d) { return d.aag = _this.ags; });
                break;
            case "IsTransitionInEnabled":
                this.ake(function (d) { return d.zc = _this.ahn; });
                break;
            case "IsSplineShapePartOfRange":
                this.ake(function (d) {
                    if (d.fy) {
                        d.ry(_this.ahm);
                    }
                });
                break;
            case "TransitionInMode":
                this.ake(function (d) { return d.yw = _this.agu; });
                break;
            case "TransitionInSpeedType":
                this.ake(function (d) { return d.c3 = _this.ag4; });
                break;
            case "XAxisInterval":
                this.xAxis.mt = this.aim;
                break;
            case "XAxisMinorInterval":
                this.xAxis.mu = this.aip;
                break;
            case "XAxisGap":
                this.xAxis.k2 = this.ail;
                break;
            case "XAxisOverlap":
                this.xAxis.lb = this.aiq;
                break;
            case "XAxisMinimumGapSize":
                this.xAxis.la = this.aio;
                break;
            case "XAxisMaximumGap":
                this.xAxis.k9 = this.ain;
                break;
            case "XAxisZoomMaximumCategoryRange":
                this.xAxis.zoomMaximumCategoryRange = this.air;
                break;
            case "XAxisZoomMaximumItemSpan":
                this.xAxis.zoomMaximumItemSpan = this.ais;
                break;
            case "XAxisZoomToCategoryRange":
                this.xAxis.zoomToCategoryRange = this.ait;
                break;
            case "XAxisZoomToCategoryStart":
                this.xAxis.zoomToCategoryStart = this.aiu;
                break;
            case "XAxisZoomToItemSpan":
                this.xAxis.zoomToItemSpan = this.aiv;
                break;
            case "YAxisInterval":
                this.yAxis.l2 = this.aiy;
                break;
            case "YAxisFavorLabellingScaleEnd":
                this.yAxis.le = this.aht;
                break;
            case "YAxisAutoRangeBufferMode":
                this.yAxis.kv = this.ago;
                break;
            case "YAxisIsLogarithmic":
                this.yAxis.lj = this.ahu;
                break;
            case "YAxisLogarithmBase":
                this.yAxis.ma = this.ai7;
                break;
            case "YAxisMinimumValue":
                this.yAxis.l6 = this.ai0;
                break;
            case "YAxisMaximumValue":
                this.yAxis.l5 = this.aiz;
                break;
            case "YAxisMinorInterval":
                this.yAxis.l7 = this.ai1;
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.akf(function (d, e) {
                    if (d.fk) {
                        d.rx(ArrayExtension.getModulus$1(Brush.$, _this.agj, e), ArrayExtension.getModulus$1(Brush.$, _this.agk, e));
                    }
                });
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.ae0(function (d) { return d.lb = _this.ahr; });
                break;
            case "IsCategoryHighlightingEnabled":
            case "IsItemHighlightingEnabled":
                this.ud();
                break;
            case "AutoMarginAndAngleUpdateMode":
                this.vc(function (d) { return d.v7 = _this.agm; });
                break;
            case "ShouldAutoExpandMarginForInitialLabels":
                this.vc(function (d) { return d.w2 = _this.aho; });
                break;
            case CategoryChart.ajl:
                this.vc(function (d) { return d.w5 = _this.ahp; });
                break;
            case "AutoExpandMarginExtraPadding":
                this.vc(function (d) { return d.xs = _this.aid; });
                break;
            case "AutoExpandMarginMaximumValue":
                this.vc(function (d) { return d.xt = _this.aie; });
                break;
            case CategoryChart.ajs:
                this.aew(function (d) { return d.b1 = _this.ahq; }, a);
                break;
            case CategoryChart.aj6:
                this.ae0(function (d) { return d.b1 = _this.ahs; });
                break;
        }
    };
    CategoryChart.$t = markType(CategoryChart, 'CategoryChart', XYChart.$);
    CategoryChart.ajl = "ShouldConsiderAutoRotationForInitialLabels";
    CategoryChart.ajs = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    CategoryChart.aj6 = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return CategoryChart;
}(XYChart));
export { CategoryChart };
