/*
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.af4 = 1000;
        _this.af5 = 1000;
        _this.ad7 = null;
        _this.ad8 = null;
        _this.adr = 9;
        _this.adt = 1;
        _this.aed = false;
        _this.aee = true;
        _this.adv = 0;
        _this.ad5 = 0;
        _this.ae1 = 0;
        _this.ae4 = 0;
        _this.ae0 = 0;
        _this.ae3 = 0;
        _this.ae2 = 1;
        _this.ae5 = 0;
        _this.afb = NaN;
        _this.adn = 1;
        _this.aef = true;
        _this.aeg = true;
        _this.aey = DeviceUtils.g(2);
        _this.aez = DeviceUtils.g(60);
        _this.aek = true;
        _this.aeh = true;
        _this.aej = false;
        _this.adp = 0;
        _this.ael = false;
        _this.af6 = 10;
        _this.afd = NaN;
        _this.afc = NaN;
        _this.afe = 0;
        _this.adj = null;
        _this.adk = null;
        _this.aei = true;
        _this.ae6 = 3;
        _this.ae7 = NaN;
        _this.ae8 = NaN;
        _this.ae9 = NaN;
        _this.afa = NaN;
        _this.aeb = false;
        _this.aec = false;
        _this.aex = null;
        DVContainer.instance.registerIfLoaded("CategoryChartToolbarFactoryManager");
        _this.r9();
        return _this;
    }
    CategoryChart.prototype.sr = function () {
        _super.prototype.sr.call(this);
        if (this.dataChart == null) {
            return;
        }
        var a = this.dataChart.cu.j.e();
        this.adl = a.d;
        this.adm = a.e;
        if (this.acv == null) {
            this.acv = a.k;
        }
        if (this.ac2 == null) {
            this.ac2 = a.k;
        }
        this.yu = 0;
        this.ac3 = AxisDefaults.h;
        this.ac6 = null;
        this.acz = AxisDefaults.g;
        this.acw = null;
        this.yd = AxisDefaults.f;
        this.ac0 = AxisDefaults.j;
        this.ye = AxisDefaults.e;
        this.fx = true;
        this.fy = true;
        this.a9 = 0;
        this.il = Defaults.j;
        this.u7 = Defaults.ae;
        this.u2 = Defaults.af;
        this.u3 = Defaults.ag;
        this.aep = true;
    };
    CategoryChart.prototype.st = function (a, b) {
        _super.prototype.st.call(this, a, b);
        a.jk = this.af7;
        a.jl = this.af8;
        a.cy = this.ad9;
        a.cz = this.aea;
    };
    CategoryChart.prototype.th = function (a, b, c) {
        var _this = this;
        _super.prototype.th.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.sg(function (d) { return d.jk = _this.af7; });
                break;
            case "TransitionOutDuration":
                this.sg(function (d) { return d.jl = _this.af8; });
                break;
            case "TransitionInEasingFunction":
                this.sg(function (d) { return d.cy = _this.ad9; });
                break;
            case "TransitionOutEasingFunction":
                this.sg(function (d) { return d.cz = _this.aea; });
                break;
        }
    };
    Object.defineProperty(CategoryChart.prototype, "af7", {
        get: function () {
            return this.af4;
        },
        set: function (a) {
            var b = this.af7;
            if (a != b) {
                this.af4 = a;
                this.te("TransitionInDuration", b, this.af7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "af8", {
        get: function () {
            return this.af5;
        },
        set: function (a) {
            var b = this.af8;
            if (a != b) {
                this.af5 = a;
                this.te("TransitionOutDuration", b, this.af8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad9", {
        get: function () {
            return this.ad7;
        },
        set: function (a) {
            var b = this.ad9;
            if (a != b) {
                this.ad7 = a;
                this.te("TransitionInEasingFunction", b, this.ad9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aea", {
        get: function () {
            return this.ad8;
        },
        set: function (a) {
            var b = this.aea;
            if (a != b) {
                this.ad8 = a;
                this.te("TransitionOutEasingFunction", b, this.aea);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.age = function () {
        var cvd_ = this.kk();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    CategoryChart.prototype.sm = function (a) {
        _super.prototype.sm.call(this, a);
        a.dw = this.fs;
        a.u8 = this.aeq;
        a.vb = this.aer;
        a.vy = this.aff;
        a.vz = this.afg;
        a.ud = this.ado;
    };
    CategoryChart.prototype.ss = function (a, b) {
        _super.prototype.ss.call(this, a, b);
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c == null) {
            return;
        }
        c.xj = this.adu;
        c.wf = this.aep;
        c.vz = this.adw;
        c.cq = this.ad6;
        c.trendLineBrush = ArrayExtension.getModulus$1(Brush.$, this.ah, b);
        c.trendLineType = this.dt;
        c.trendLineThickness = this.ji;
        c.uc = this.cs(a, b);
        if (a.e0) {
            a.p1(ArrayExtension.getModulus$1(Brush.$, this.adl, b), ArrayExtension.getModulus$1(Brush.$, this.adm, b));
        }
    };
    CategoryChart.prototype.adx = function () {
        return new CategoryXAxis();
    };
    CategoryChart.prototype.ad1 = function () {
        return new NumericYAxis();
    };
    CategoryChart.prototype.r5 = function () {
        this.xAxis = this.adx();
        this.xAxis.name = "xAxis";
        var a = this.xAxis;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.ahi));
        this.yAxis = this.ad1();
        this.yAxis.name = "yAxis";
        var b = this.yAxis;
        b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.ahj));
        if (this.xAxis.az == null) {
            this.xAxis.az = new AxisLabelSettings();
        }
        if (this.yAxis.az == null) {
            this.yAxis.az = new AxisLabelSettings();
        }
    };
    CategoryChart.prototype.abv = function (a) {
        _super.prototype.abv.call(this, a);
        a.la = this.aet;
        a.ld = this.aev;
        a.b1 = this.aeu;
    };
    CategoryChart.prototype.abt = function (a) {
        _super.prototype.abt.call(this, a);
        a.b1 = this.aes;
        a.zoomMaximumCategoryRange = this.aft;
        a.zoomToCategoryRange = this.afv;
        a.zoomToCategoryStart = this.afw;
        a.zoomMaximumItemSpan = this.afu;
        a.zoomToItemSpan = this.afx;
    };
    CategoryChart.prototype.get_b1 = function () {
        return 0;
    };
    Object.defineProperty(CategoryChart.prototype, "b1", {
        get: function () {
            return this.get_b1();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ads", {
        get: function () {
            return this.adr;
        },
        set: function (a) {
            if (a != this.adr) {
                var b = this.ads;
                this.adr = a;
                this.te("ChartType", enumGetBox(CategoryChartType_$type, b), enumGetBox(CategoryChartType_$type, this.ads));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adu", {
        get: function () {
            return this.adt;
        },
        set: function (a) {
            var b = this.adu;
            if (a != b) {
                this.adt = a;
                this.te("MarkerCollisionAvoidance", enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, b), enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, this.adu));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aeo", {
        get: function () {
            return this.aed;
        },
        set: function (a) {
            var b = this.aeo;
            if (a != b) {
                this.aed = a;
                this.te("IsSplineShapePartOfRange", b, this.aeo);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aep", {
        get: function () {
            return this.aee;
        },
        set: function (a) {
            var b = this.aep;
            if (a != b) {
                this.aee = a;
                this.te("IsTransitionInEnabled", b, this.aep);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adw", {
        get: function () {
            return this.adv;
        },
        set: function (a) {
            var b = this.adw;
            if (a != b) {
                this.adv = a;
                this.te("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.adw));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad6", {
        get: function () {
            return this.ad5;
        },
        set: function (a) {
            var b = this.ad6;
            if (a != b) {
                this.ad5 = a;
                this.te("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.ad6));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afo", {
        get: function () {
            return this.ae1;
        },
        set: function (a) {
            var b = this.afo;
            if (a != b) {
                this.ae1 = a;
                this.te("XAxisInterval", b, this.afo);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afr", {
        get: function () {
            return this.ae4;
        },
        set: function (a) {
            var b = this.afr;
            if (a != b) {
                this.ae4 = a;
                this.te("XAxisMinorInterval", b, this.afr);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afn", {
        get: function () {
            return this.ae0;
        },
        set: function (a) {
            var b = this.afn;
            if (a != b) {
                this.ae0 = a;
                this.te("XAxisGap", b, this.afn);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afq", {
        get: function () {
            return this.ae3;
        },
        set: function (a) {
            var b = this.afq;
            if (a != b) {
                this.ae3 = a;
                this.te("XAxisMinimumGapSize", b, this.afq);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afp", {
        get: function () {
            return this.ae2;
        },
        set: function (a) {
            var b = this.afp;
            if (a != b) {
                this.ae2 = a;
                this.te("XAxisMaximumGap", b, this.afp);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afs", {
        get: function () {
            return this.ae5;
        },
        set: function (a) {
            var b = this.afs;
            if (a != b) {
                this.ae5 = a;
                this.te("XAxisOverlap", b, this.afs);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "af0", {
        get: function () {
            return this.afb;
        },
        set: function (a) {
            var b = this.af0;
            if (a != b) {
                this.afb = a;
                this.te("YAxisInterval", b, this.af0);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ado", {
        get: function () {
            return this.adn;
        },
        set: function (a) {
            var b = this.ado;
            if (a != b) {
                this.adn = a;
                this.te("AutoMarginAndAngleUpdateMode", enumGetBox(AutoMarginsAndAngleUpdateMode_$type, b), enumGetBox(AutoMarginsAndAngleUpdateMode_$type, this.ado));
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ahk = function () {
        if (this.dataChart != null) {
            this.dataChart.xj();
        }
    };
    Object.defineProperty(CategoryChart.prototype, "aeq", {
        get: function () {
            return this.aef;
        },
        set: function (a) {
            var b = this.aeq;
            if (a != b) {
                this.aef = a;
                this.te("ShouldAutoExpandMarginForInitialLabels", b, this.aeq);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aer", {
        get: function () {
            return this.aeg;
        },
        set: function (a) {
            var b = this.aer;
            if (a != b) {
                this.aeg = a;
                this.te(CategoryChart.agn, b, this.aer);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aff", {
        get: function () {
            return this.aey;
        },
        set: function (a) {
            var b = this.aff;
            if (a != b) {
                this.aey = a;
                this.te("AutoExpandMarginExtraPadding", b, this.aff);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afg", {
        get: function () {
            return this.aez;
        },
        set: function (a) {
            var b = this.afg;
            if (a != b) {
                this.aez = a;
                this.te("AutoExpandMarginMaximumValue", b, this.afg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aev", {
        get: function () {
            return this.aek;
        },
        set: function (a) {
            var b = this.aev;
            if (a != b) {
                this.aek = a;
                this.te("YAxisFavorLabellingScaleEnd", b, this.aev);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aes", {
        get: function () {
            return this.aeh;
        },
        set: function (a) {
            var b = this.aes;
            if (a != b) {
                this.aeh = a;
                this.te(CategoryChart.agu, b, this.aes);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aeu", {
        get: function () {
            return this.aej;
        },
        set: function (a) {
            var b = this.aeu;
            if (a != b) {
                this.aej = a;
                this.te(CategoryChart.ag8, b, this.aeu);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adq", {
        get: function () {
            return this.adp;
        },
        set: function (a) {
            var b = this.adq;
            if (a != b) {
                this.adp = a;
                this.te("YAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.adq));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aew", {
        get: function () {
            return this.ael;
        },
        set: function (a) {
            var b = this.aew;
            if (a != b) {
                this.ael = a;
                this.te("YAxisIsLogarithmic", b, this.aew);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "af9", {
        get: function () {
            return this.af6;
        },
        set: function (a) {
            var b = this.af9;
            if (a != b) {
                this.af6 = a;
                this.te("YAxisLogarithmBase", b, this.af9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "af2", {
        get: function () {
            return this.afd;
        },
        set: function (a) {
            var b = this.af2;
            if (a != b) {
                this.afd = a;
                this.te("YAxisMinimumValue", b, this.af2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "af1", {
        get: function () {
            return this.afc;
        },
        set: function (a) {
            var b = this.af1;
            if (a != b) {
                this.afc = a;
                this.te("YAxisMaximumValue", b, this.af1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "af3", {
        get: function () {
            return this.afe;
        },
        set: function (a) {
            var b = this.af3;
            if (a != b) {
                this.afe = a;
                this.te("YAxisMinorInterval", b, this.af3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afm", {
        get: function () {
            return this.xAxis.mw;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afl", {
        get: function () {
            return this.xAxis.mv;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.afi = function () {
        return this.afm;
    };
    CategoryChart.prototype.afk = function () {
        return this.afz;
    };
    CategoryChart.prototype.afh = function () {
        return this.afl;
    };
    CategoryChart.prototype.afj = function () {
        return this.afy;
    };
    Object.defineProperty(CategoryChart.prototype, "afz", {
        get: function () {
            return this.yAxis.lx;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afy", {
        get: function () {
            return this.yAxis.lw;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adl", {
        get: function () {
            return this.adj;
        },
        set: function (a) {
            var b = this.adl;
            if (a != b) {
                this.adj = a;
                this.te("NegativeBrushes", b, this.adl);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adm", {
        get: function () {
            return this.adk;
        },
        set: function (a) {
            var b = this.adm;
            if (a != b) {
                this.adk = a;
                this.te("NegativeOutlines", b, this.adm);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aet", {
        get: function () {
            return this.aei;
        },
        set: function (a) {
            var b = this.aet;
            if (a != b) {
                this.aei = a;
                this.te("YAxisAbbreviateLargeNumbers", b, this.aet);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aft", {
        get: function () {
            return this.ae6;
        },
        set: function (a) {
            var b = this.aft;
            if (a != b) {
                this.ae6 = a;
                this.te("XAxisZoomMaximumCategoryRange", b, this.aft);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afu", {
        get: function () {
            return this.ae7;
        },
        set: function (a) {
            var b = this.afu;
            if (a != b) {
                this.ae7 = a;
                this.te("XAxisZoomMaximumItemSpan", b, this.afu);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afv", {
        get: function () {
            return this.ae8;
        },
        set: function (a) {
            var b = this.afv;
            if (a != b) {
                this.ae8 = a;
                this.te("XAxisZoomToCategoryRange", b, this.afv);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afw", {
        get: function () {
            return this.ae9;
        },
        set: function (a) {
            var b = this.afw;
            if (a != b) {
                this.ae9 = a;
                this.te("XAxisZoomToCategoryStart", b, this.afw);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afx", {
        get: function () {
            return this.afa;
        },
        set: function (a) {
            var b = this.afx;
            if (a != b) {
                this.afa = a;
                this.te("XAxisZoomToItemSpan", b, this.afx);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aem", {
        get: function () {
            return this.aeb;
        },
        set: function (a) {
            var b = this.aem;
            if (a != b) {
                this.aeb = a;
                this.te("IsCategoryHighlightingEnabled", b, this.aem);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aen", {
        get: function () {
            return this.aec;
        },
        set: function (a) {
            var b = this.aen;
            if (a != b) {
                this.aec = a;
                this.te("IsItemHighlightingEnabled", b, this.aen);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.get_g2 = 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, "g2", {
        get: function () {
            return this.get_g2();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.g6 = function () {
        if (this.aex == null) {
            this.aex = CategoryChartMockDataGenerator.a();
        }
        return this.aex;
    };
    CategoryChart.prototype.cr = function (a) {
        if (a != null) {
            var b = _super.prototype.cr.call(this, a);
            if (b == 2) {
                if (a.ez && this.f8) {
                    return 13;
                }
            }
        }
        return _super.prototype.cr.call(this, a);
    };
    CategoryChart.prototype.ct = function (a) {
        if (a != null) {
            var b = _super.prototype.cr.call(this, a);
            if (b == 2) {
                if (a.ez && this.f8) {
                    return 13;
                }
            }
        }
        return _super.prototype.ct.call(this, a);
    };
    CategoryChart.prototype.get_gp = function () {
        return this.xAxis != null && this.xAxis.categoryMode != 0;
    };
    CategoryChart.prototype.ahi = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimum":
                this.to("XAxisActualMinimum");
                break;
            case "ActualMaximum":
                this.to("XAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.ahj = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimumValue":
                this.to("YAxisActualMinimum");
                break;
            case "ActualMaximumValue":
                this.to("YAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.t0 = function () {
        _super.prototype.t0.call(this);
        this.xAxis.f0 = this.y4 == null ? XYChart.zg(this.xAxis, this.bd.dataSeries) : this.y4;
        this.xAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        if (this.aeq) {
            this.s6(function (a) { return a.xj(); });
        }
    };
    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.ad0 = function (a, b) {
        switch (a) {
            case 2: return this.c4(1);
            case 3: return this.c4(10);
            case 0: return this.c4(0);
            case 1: return this.c4(2);
            case 6: return this.c4(6);
            case 7: return this.c4(7);
            case 4: return this.c4(4);
            case 5: return this.c4(5);
            case 8: return this.c4(8);
            case 9: return this.adz(b);
            default: return this.c4(1);
        }
    };
    CategoryChart.prototype.adz = function (a) {
        return this.c4(a);
    };
    CategoryChart.prototype.bc = function (a) {
        switch (this.ads) {
            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.c2 = function (a, b) {
        var c = this.ad0(this.ads, a.suggestedSeries);
        c.x7 = a.findMatchingHint(0).path;
        c.xAxis = this.xAxis;
        c.yAxis = this.yAxis;
        return c;
    };
    CategoryChart.prototype.ty = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.li = true;
            this.yAxis.l9 = 10;
        }
    };
    CategoryChart.prototype.t1 = function () {
        this.yAxis.li = this.aew;
        this.yAxis.l9 = this.af9;
    };
    CategoryChart.prototype.get_g1 = 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, "g1", {
        get: function () {
            return this.get_g1();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.r1 = function (a, b) {
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c != null) {
            c.xj = this.adu;
            c.uc = this.cs(a, b);
        }
    };
    CategoryChart.prototype.ahg = function (a) {
        this.ahh(function (b, c) { return a(b); });
    };
    CategoryChart.prototype.ahh = 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.wm = function () {
        return this.xAxis;
    };
    CategoryChart.prototype.wn = function () {
        return this.yAxis;
    };
    CategoryChart.prototype.ad3 = function () {
        return this.c4(30);
    };
    CategoryChart.prototype.ad4 = function () {
        return this.c4(31);
    };
    CategoryChart.prototype.gy = function (a, b) {
        var c = _super.prototype.gy.call(this, a, b);
        if (c != null) {
            var d = new List$1(Series.$, 0);
            if (this.aeb) {
                d.add(this.ad3());
            }
            if (this.aec) {
                d.add(this.ad4());
            }
            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.a7 = function () {
        if (this.a6 == 0) {
            return 1;
        }
        else {
            return this.a6;
        }
    };
    CategoryChart.prototype.t6 = function (a, b, c) {
        _super.prototype.t6.call(this, a, b, c);
        if (this.bd.dataSeries.count > 0) {
            if (stringIsNullOrEmpty(this.lz)) {
                this.b4.setXMemberPath(a, c.getMemberPathFor(16));
            }
            if (stringIsNullOrEmpty(this.l1)) {
                this.b4.setYMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.lv)) {
                this.b4.setLabelMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.ls)) {
                this.b4.setContentMemberPath(a, c.getMemberPathFor(0));
            }
        }
    };
    CategoryChart.prototype.gb = function () {
        if (this.a9 == 4 || this.a9 == 3) {
            return true;
        }
        else if (this.a9 == 0) {
            if (this.ads == 2 || this.ads == 8) {
                return false;
            }
            else if (this.ads == 9 && this.bd != null && this.bd.dataSeries != null && this.bd.dataSeries.count > 0) {
                var a = this.bd.dataSeries._inner[0].suggestedSeries;
                if (a == 1 || a == 8) {
                    return false;
                }
            }
            return true;
        }
        return false;
    };
    CategoryChart.prototype.get_gh = function () {
        return DVContainer.instance.checkLoaded("CategoryChartToolbarFactoryManager");
    };
    CategoryChart.prototype.te = function (a, b, c) {
        var _this = this;
        _super.prototype.te.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.t0();
                break;
            case "MarkerCollisionAvoidance":
                this.ahg(function (d) { return d.xj = _this.adu; });
                break;
            case "IsTransitionInEnabled":
                this.ahg(function (d) { return d.wf = _this.aep; });
                break;
            case "IsSplineShapePartOfRange":
                this.ahg(function (d) {
                    if (d.fe) {
                        d.p2(_this.aeo);
                    }
                });
                break;
            case "TransitionInMode":
                this.ahg(function (d) { return d.vz = _this.adw; });
                break;
            case "TransitionInSpeedType":
                this.ahg(function (d) { return d.cq = _this.ad6; });
                break;
            case "XAxisInterval":
                this.xAxis.mr = this.afo;
                break;
            case "XAxisMinorInterval":
                this.xAxis.ms = this.afr;
                break;
            case "XAxisGap":
                this.xAxis.k1 = this.afn;
                break;
            case "XAxisOverlap":
                this.xAxis.la = this.afs;
                break;
            case "XAxisMinimumGapSize":
                this.xAxis.k9 = this.afq;
                break;
            case "XAxisMaximumGap":
                this.xAxis.k8 = this.afp;
                break;
            case "XAxisZoomMaximumCategoryRange":
                this.xAxis.zoomMaximumCategoryRange = this.aft;
                break;
            case "XAxisZoomMaximumItemSpan":
                this.xAxis.zoomMaximumItemSpan = this.afu;
                break;
            case "XAxisZoomToCategoryRange":
                this.xAxis.zoomToCategoryRange = this.afv;
                break;
            case "XAxisZoomToCategoryStart":
                this.xAxis.zoomToCategoryStart = this.afw;
                break;
            case "XAxisZoomToItemSpan":
                this.xAxis.zoomToItemSpan = this.afx;
                break;
            case "YAxisInterval":
                this.yAxis.l1 = this.af0;
                break;
            case "YAxisFavorLabellingScaleEnd":
                this.yAxis.ld = this.aev;
                break;
            case "YAxisAutoRangeBufferMode":
                this.yAxis.ku = this.adq;
                break;
            case "YAxisIsLogarithmic":
                this.yAxis.li = this.aew;
                break;
            case "YAxisLogarithmBase":
                this.yAxis.l9 = this.af9;
                break;
            case "YAxisMinimumValue":
                this.yAxis.l5 = this.af2;
                break;
            case "YAxisMaximumValue":
                this.yAxis.l4 = this.af1;
                break;
            case "YAxisMinorInterval":
                this.yAxis.l6 = this.af3;
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.ahh(function (d, e) {
                    if (d.e0) {
                        d.p1(ArrayExtension.getModulus$1(Brush.$, _this.adl, e), ArrayExtension.getModulus$1(Brush.$, _this.adm, e));
                    }
                });
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.ab2(function (d) { return d.la = _this.aet; });
                break;
            case "IsCategoryHighlightingEnabled":
            case "IsItemHighlightingEnabled":
                this.t0();
                break;
            case "AutoMarginAndAngleUpdateMode":
                this.s6(function (d) { return d.ud = _this.ado; });
                break;
            case "ShouldAutoExpandMarginForInitialLabels":
                this.s6(function (d) { return d.u8 = _this.aeq; });
                break;
            case CategoryChart.agn:
                this.s6(function (d) { return d.vb = _this.aer; });
                break;
            case "AutoExpandMarginExtraPadding":
                this.s6(function (d) { return d.vy = _this.aff; });
                break;
            case "AutoExpandMarginMaximumValue":
                this.s6(function (d) { return d.vz = _this.afg; });
                break;
            case CategoryChart.agu:
                this.aby(function (d) { return d.b1 = _this.aes; }, a);
                break;
            case CategoryChart.ag8:
                this.ab2(function (d) { return d.b1 = _this.aeu; });
                break;
        }
    };
    CategoryChart.$t = markType(CategoryChart, 'CategoryChart', XYChart.$);
    CategoryChart.agn = "ShouldConsiderAutoRotationForInitialLabels";
    CategoryChart.agu = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    CategoryChart.ag8 = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return CategoryChart;
}(XYChart));
export { CategoryChart };
