/*
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.ajh = 1000;
        _this.aji = 1000;
        _this.ahk = null;
        _this.ahl = null;
        _this.ag4 = 9;
        _this.ag6 = 1;
        _this.ahq = false;
        _this.ahr = true;
        _this.ag8 = 0;
        _this.ahi = 0;
        _this.aie = 0;
        _this.aih = 0;
        _this.aid = 0;
        _this.aig = 0;
        _this.aif = 1;
        _this.aii = 0;
        _this.aio = NaN;
        _this.ag0 = 1;
        _this.ahs = true;
        _this.aht = true;
        _this.aib = DeviceUtils.g(2);
        _this.aic = DeviceUtils.g(60);
        _this.ahx = true;
        _this.ahu = true;
        _this.ahw = false;
        _this.ag2 = 0;
        _this.ahy = false;
        _this.ajj = 10;
        _this.aiq = NaN;
        _this.aip = NaN;
        _this.air = 0;
        _this.agw = null;
        _this.agx = null;
        _this.ahv = true;
        _this.aij = 3;
        _this.aik = NaN;
        _this.ail = NaN;
        _this.aim = NaN;
        _this.ain = NaN;
        _this.aho = false;
        _this.ahp = false;
        _this.aia = null;
        DVContainer.instance.registerIfLoaded("CategoryChartToolbarFactoryManager");
        _this.ui();
        return _this;
    }
    CategoryChart.prototype.u2 = function () {
        _super.prototype.u2.call(this);
        if (this.dataChart == null) {
            return;
        }
        var a = this.dataChart.c9.j.e();
        this.agy = a.d;
        this.agz = a.e;
        if (this.af8 == null) {
            this.af8 = a.k;
        }
        if (this.agf == null) {
            this.agf = a.k;
        }
        this.ab7 = 0;
        this.agg = AxisDefaults.h;
        this.agj = null;
        this.agc = AxisDefaults.g;
        this.af9 = null;
        this.abq = AxisDefaults.f;
        this.agd = AxisDefaults.j;
        this.abr = AxisDefaults.e;
        this.crosshairsAnnotationEnabled = true;
        this.gl = true;
        this.crosshairsDisplayMode = 0;
        this.jj = Defaults.j;
        this.x9 = Defaults.ae;
        this.x4 = Defaults.af;
        this.x5 = Defaults.ag;
        this.ah2 = true;
    };
    CategoryChart.prototype.u4 = function (a, b) {
        _super.prototype.u4.call(this, a, b);
        a.ke = this.ajk;
        a.kf = this.ajl;
        a.de = this.ahm;
        a.df = this.ahn;
    };
    CategoryChart.prototype.vu = function (a, b, c) {
        var _this = this;
        _super.prototype.vu.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.ur(function (d) { return d.ke = _this.ajk; });
                break;
            case "TransitionOutDuration":
                this.ur(function (d) { return d.kf = _this.ajl; });
                break;
            case "TransitionInEasingFunction":
                this.ur(function (d) { return d.de = _this.ahm; });
                break;
            case "TransitionOutEasingFunction":
                this.ur(function (d) { return d.df = _this.ahn; });
                break;
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ajk", {
        get: function () {
            return this.ajh;
        },
        set: function (a) {
            var b = this.ajk;
            if (a != b) {
                this.ajh = a;
                this.vr("TransitionInDuration", b, this.ajk);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajl", {
        get: function () {
            return this.aji;
        },
        set: function (a) {
            var b = this.ajl;
            if (a != b) {
                this.aji = a;
                this.vr("TransitionOutDuration", b, this.ajl);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahm", {
        get: function () {
            return this.ahk;
        },
        set: function (a) {
            var b = this.ahm;
            if (a != b) {
                this.ahk = a;
                this.vr("TransitionInEasingFunction", b, this.ahm);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahn", {
        get: function () {
            return this.ahl;
        },
        set: function (a) {
            var b = this.ahn;
            if (a != b) {
                this.ahl = a;
                this.vr("TransitionOutEasingFunction", b, this.ahn);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ajr = function () {
        var cvd_ = this.ls();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    CategoryChart.prototype.ux = function (a, b) {
        _super.prototype.ux.call(this, a, b);
        a.ek = this.ge;
        a.xl = this.ah3;
        a.xo = this.ah4;
        a.yb = this.ais;
        a.yc = this.ait;
        a.wq = this.ag1;
    };
    CategoryChart.prototype.u3 = function (a, b) {
        _super.prototype.u3.call(this, a, b);
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c == null) {
            return;
        }
        c.aav = this.ag7;
        c.zj = this.ah2;
        c.y3 = this.ag9;
        c.c5 = this.ahj;
        c.trendLineBrush = ArrayExtension.getModulus$1(Brush.$, this.af, b);
        c.trendLineType = this.trendLineType;
        c.trendLineThickness = this.kf;
        c.w8 = this.c2(a, b);
        if (a.fm) {
            a.r1(ArrayExtension.getModulus$1(Brush.$, this.agy, b), ArrayExtension.getModulus$1(Brush.$, this.agz, b));
        }
    };
    CategoryChart.prototype.aha = function () {
        return new CategoryXAxis();
    };
    CategoryChart.prototype.ahe = function () {
        return new NumericYAxis();
    };
    CategoryChart.prototype.ud = function () {
        this.xAxis = this.aha();
        this.xAxis.name = "xAxis";
        var a = this.xAxis;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.akv));
        this.yAxis = this.ahe();
        this.yAxis.name = "yAxis";
        var b = this.yAxis;
        b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.akw));
        if (this.xAxis.az == null) {
            this.xAxis.az = new AxisLabelSettings();
        }
        if (this.yAxis.az == null) {
            this.yAxis.az = new AxisLabelSettings();
        }
    };
    CategoryChart.prototype.ae8 = function (a) {
        _super.prototype.ae8.call(this, a);
        a.lf = this.ah6;
        a.lj = this.ah8;
        a.b1 = this.ah7;
    };
    CategoryChart.prototype.ae6 = function (a) {
        _super.prototype.ae6.call(this, a);
        a.b1 = this.ah5;
        a.zoomMaximumCategoryRange = this.ai6;
        a.zoomToCategoryRange = this.ai8;
        a.zoomToCategoryStart = this.ai9;
        a.zoomMaximumItemSpan = this.ai7;
        a.zoomToItemSpan = this.aja;
    };
    CategoryChart.prototype.get_cb = function () {
        return 0;
    };
    Object.defineProperty(CategoryChart.prototype, "cb", {
        get: function () {
            return this.get_cb();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag5", {
        get: function () {
            return this.ag4;
        },
        set: function (a) {
            if (a != this.ag4) {
                var b = this.ag5;
                this.ag4 = a;
                this.vr("ChartType", enumGetBox(CategoryChartType_$type, b), enumGetBox(CategoryChartType_$type, this.ag5));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag7", {
        get: function () {
            return this.ag6;
        },
        set: function (a) {
            var b = this.ag7;
            if (a != b) {
                this.ag6 = a;
                this.vr("MarkerCollisionAvoidance", enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, b), enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, this.ag7));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah1", {
        get: function () {
            return this.ahq;
        },
        set: function (a) {
            var b = this.ah1;
            if (a != b) {
                this.ahq = a;
                this.vr("IsSplineShapePartOfRange", b, this.ah1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah2", {
        get: function () {
            return this.ahr;
        },
        set: function (a) {
            var b = this.ah2;
            if (a != b) {
                this.ahr = a;
                this.vr("IsTransitionInEnabled", b, this.ah2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag9", {
        get: function () {
            return this.ag8;
        },
        set: function (a) {
            var b = this.ag9;
            if (a != b) {
                this.ag8 = a;
                this.vr("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.ag9));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahj", {
        get: function () {
            return this.ahi;
        },
        set: function (a) {
            var b = this.ahj;
            if (a != b) {
                this.ahi = a;
                this.vr("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.ahj));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai1", {
        get: function () {
            return this.aie;
        },
        set: function (a) {
            var b = this.ai1;
            if (a != b) {
                this.aie = a;
                this.vr("XAxisInterval", b, this.ai1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai4", {
        get: function () {
            return this.aih;
        },
        set: function (a) {
            var b = this.ai4;
            if (a != b) {
                this.aih = a;
                this.vr("XAxisMinorInterval", b, this.ai4);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai0", {
        get: function () {
            return this.aid;
        },
        set: function (a) {
            var b = this.ai0;
            if (a != b) {
                this.aid = a;
                this.vr("XAxisGap", b, this.ai0);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai3", {
        get: function () {
            return this.aig;
        },
        set: function (a) {
            var b = this.ai3;
            if (a != b) {
                this.aig = a;
                this.vr("XAxisMinimumGapSize", b, this.ai3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai2", {
        get: function () {
            return this.aif;
        },
        set: function (a) {
            var b = this.ai2;
            if (a != b) {
                this.aif = a;
                this.vr("XAxisMaximumGap", b, this.ai2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai5", {
        get: function () {
            return this.aii;
        },
        set: function (a) {
            var b = this.ai5;
            if (a != b) {
                this.aii = a;
                this.vr("XAxisOverlap", b, this.ai5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajd", {
        get: function () {
            return this.aio;
        },
        set: function (a) {
            var b = this.ajd;
            if (a != b) {
                this.aio = a;
                this.vr("YAxisInterval", b, this.ajd);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag1", {
        get: function () {
            return this.ag0;
        },
        set: function (a) {
            var b = this.ag1;
            if (a != b) {
                this.ag0 = a;
                this.vr("AutoMarginAndAngleUpdateMode", enumGetBox(AutoMarginsAndAngleUpdateMode_$type, b), enumGetBox(AutoMarginsAndAngleUpdateMode_$type, this.ag1));
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.akx = function () {
        if (this.dataChart != null) {
            this.dataChart.zw();
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ah3", {
        get: function () {
            return this.ahs;
        },
        set: function (a) {
            var b = this.ah3;
            if (a != b) {
                this.ahs = a;
                this.vr("ShouldAutoExpandMarginForInitialLabels", b, this.ah3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah4", {
        get: function () {
            return this.aht;
        },
        set: function (a) {
            var b = this.ah4;
            if (a != b) {
                this.aht = a;
                this.vr(CategoryChart.aj0, b, this.ah4);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ais", {
        get: function () {
            return this.aib;
        },
        set: function (a) {
            var b = this.ais;
            if (a != b) {
                this.aib = a;
                this.vr("AutoExpandMarginExtraPadding", b, this.ais);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ait", {
        get: function () {
            return this.aic;
        },
        set: function (a) {
            var b = this.ait;
            if (a != b) {
                this.aic = a;
                this.vr("AutoExpandMarginMaximumValue", b, this.ait);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah8", {
        get: function () {
            return this.ahx;
        },
        set: function (a) {
            var b = this.ah8;
            if (a != b) {
                this.ahx = a;
                this.vr("YAxisFavorLabellingScaleEnd", b, this.ah8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah5", {
        get: function () {
            return this.ahu;
        },
        set: function (a) {
            var b = this.ah5;
            if (a != b) {
                this.ahu = a;
                this.vr(CategoryChart.aj7, b, this.ah5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah7", {
        get: function () {
            return this.ahw;
        },
        set: function (a) {
            var b = this.ah7;
            if (a != b) {
                this.ahw = a;
                this.vr(CategoryChart.akl, b, this.ah7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag3", {
        get: function () {
            return this.ag2;
        },
        set: function (a) {
            var b = this.ag3;
            if (a != b) {
                this.ag2 = a;
                this.vr("YAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ag3));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah9", {
        get: function () {
            return this.ahy;
        },
        set: function (a) {
            var b = this.ah9;
            if (a != b) {
                this.ahy = a;
                this.vr("YAxisIsLogarithmic", b, this.ah9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajm", {
        get: function () {
            return this.ajj;
        },
        set: function (a) {
            var b = this.ajm;
            if (a != b) {
                this.ajj = a;
                this.vr("YAxisLogarithmBase", b, this.ajm);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajf", {
        get: function () {
            return this.aiq;
        },
        set: function (a) {
            var b = this.ajf;
            if (a != b) {
                this.aiq = a;
                this.vr("YAxisMinimumValue", b, this.ajf);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aje", {
        get: function () {
            return this.aip;
        },
        set: function (a) {
            var b = this.aje;
            if (a != b) {
                this.aip = a;
                this.vr("YAxisMaximumValue", b, this.aje);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajg", {
        get: function () {
            return this.air;
        },
        set: function (a) {
            var b = this.ajg;
            if (a != b) {
                this.air = a;
                this.vr("YAxisMinorInterval", b, this.ajg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiz", {
        get: function () {
            return this.xAxis.m1;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiy", {
        get: function () {
            return this.xAxis.m0;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.aiv = function () {
        return this.aiz;
    };
    CategoryChart.prototype.aix = function () {
        return this.ajc;
    };
    CategoryChart.prototype.aiu = function () {
        return this.aiy;
    };
    CategoryChart.prototype.aiw = function () {
        return this.ajb;
    };
    Object.defineProperty(CategoryChart.prototype, "ajc", {
        get: function () {
            return this.yAxis.l4;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajb", {
        get: function () {
            return this.yAxis.l3;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agy", {
        get: function () {
            return this.agw;
        },
        set: function (a) {
            var b = this.agy;
            if (a != b) {
                this.agw = a;
                this.vr("NegativeBrushes", b, this.agy);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agz", {
        get: function () {
            return this.agx;
        },
        set: function (a) {
            var b = this.agz;
            if (a != b) {
                this.agx = a;
                this.vr("NegativeOutlines", b, this.agz);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah6", {
        get: function () {
            return this.ahv;
        },
        set: function (a) {
            var b = this.ah6;
            if (a != b) {
                this.ahv = a;
                this.vr("YAxisAbbreviateLargeNumbers", b, this.ah6);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai6", {
        get: function () {
            return this.aij;
        },
        set: function (a) {
            var b = this.ai6;
            if (a != b) {
                this.aij = a;
                this.vr("XAxisZoomMaximumCategoryRange", b, this.ai6);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai7", {
        get: function () {
            return this.aik;
        },
        set: function (a) {
            var b = this.ai7;
            if (a != b) {
                this.aik = a;
                this.vr("XAxisZoomMaximumItemSpan", b, this.ai7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai8", {
        get: function () {
            return this.ail;
        },
        set: function (a) {
            var b = this.ai8;
            if (a != b) {
                this.ail = a;
                this.vr("XAxisZoomToCategoryRange", b, this.ai8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai9", {
        get: function () {
            return this.aim;
        },
        set: function (a) {
            var b = this.ai9;
            if (a != b) {
                this.aim = a;
                this.vr("XAxisZoomToCategoryStart", b, this.ai9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aja", {
        get: function () {
            return this.ain;
        },
        set: function (a) {
            var b = this.aja;
            if (a != b) {
                this.ain = a;
                this.vr("XAxisZoomToItemSpan", b, this.aja);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahz", {
        get: function () {
            return this.aho;
        },
        set: function (a) {
            var b = this.ahz;
            if (a != b) {
                this.aho = a;
                this.vr("IsCategoryHighlightingEnabled", b, this.ahz);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah0", {
        get: function () {
            return this.ahp;
        },
        set: function (a) {
            var b = this.ah0;
            if (a != b) {
                this.ahp = a;
                this.vr("IsItemHighlightingEnabled", b, this.ah0);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.get_hv = 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, "hv", {
        get: function () {
            return this.get_hv();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.h1 = function () {
        if (this.aia == null) {
            this.aia = CategoryChartMockDataGenerator.a();
        }
        return this.aia;
    };
    CategoryChart.prototype.c1 = function (a) {
        if (a != null) {
            var b = _super.prototype.c1.call(this, a);
            if (b == 2) {
                if (a.fl && this.gw) {
                    return 13;
                }
            }
        }
        return _super.prototype.c1.call(this, a);
    };
    CategoryChart.prototype.c3 = function (a) {
        if (a != null) {
            var b = _super.prototype.c1.call(this, a);
            if (b == 2) {
                if (a.fl && this.gw) {
                    return 13;
                }
            }
        }
        return _super.prototype.c3.call(this, a);
    };
    CategoryChart.prototype.get_hf = function () {
        return true;
    };
    CategoryChart.prototype.akv = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimum":
                this.v8("XAxisActualMinimum");
                break;
            case "ActualMaximum":
                this.v8("XAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.akw = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimumValue":
                this.v8("YAxisActualMinimum");
                break;
            case "ActualMaximumValue":
                this.v8("YAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.wm = function () {
        _super.prototype.wm.call(this);
        this.xAxis.f2 = this.ach == null ? XYChart.act(this.xAxis, this.bf.dataSeries) : this.ach;
        this.xAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        if (this.ah3) {
            this.vh(function (a) { return a.zw(); });
        }
    };
    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.ahd = function (a, b) {
        switch (a) {
            case 2: return this.de(1);
            case 3: return this.de(10);
            case 0: return this.de(0);
            case 1: return this.de(2);
            case 6: return this.de(6);
            case 7: return this.de(7);
            case 4: return this.de(4);
            case 5: return this.de(5);
            case 8: return this.de(8);
            case 9: return this.ahc(b);
            default: return this.de(1);
        }
    };
    CategoryChart.prototype.ahc = function (a) {
        return this.de(a);
    };
    CategoryChart.prototype.be = function (a) {
        switch (this.ag5) {
            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.dc = function (a, b) {
        var c = this.ahd(this.ag5, a.suggestedSeries);
        c.abl = a.findMatchingHint(0).path;
        c.xAxis = this.xAxis;
        c.yAxis = this.yAxis;
        return c;
    };
    CategoryChart.prototype.wk = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.lo = true;
            this.yAxis.mm = 10;
        }
    };
    CategoryChart.prototype.wn = function () {
        this.yAxis.lo = this.ah9;
        this.yAxis.mm = this.ajm;
    };
    CategoryChart.prototype.get_hu = 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, "hu", {
        get: function () {
            return this.get_hu();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.t7 = function (a, b) {
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c != null) {
            c.aav = this.ag7;
            c.w8 = this.c2(a, b);
        }
    };
    CategoryChart.prototype.akt = function (a) {
        this.aku(function (b, c) { return a(b); });
    };
    CategoryChart.prototype.aku = 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.zz = function () {
        return this.xAxis;
    };
    CategoryChart.prototype.z0 = function () {
        return this.yAxis;
    };
    CategoryChart.prototype.ahg = function () {
        return this.de(30);
    };
    CategoryChart.prototype.ahh = function () {
        return this.de(31);
    };
    CategoryChart.prototype.hr = function (a, b) {
        var c = _super.prototype.hr.call(this, a, b);
        if (c != null) {
            var d = new List$1(Series.$, 0);
            if (this.aho) {
                d.add(this.ahg());
            }
            if (this.ahp) {
                d.add(this.ahh());
            }
            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.ba = function () {
        if (this.a9 == 0) {
            return 1;
        }
        else {
            return this.a9;
        }
    };
    CategoryChart.prototype.wr = function (a, b, c) {
        _super.prototype.wr.call(this, a, b, c);
        if (this.bf.dataSeries.count > 0) {
            if (stringIsNullOrEmpty(this.nl)) {
                this.ce.setXMemberPath(a, c.getMemberPathFor(16));
            }
            if (stringIsNullOrEmpty(this.nn)) {
                this.ce.setYMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.m9)) {
                this.ce.setLabelMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.m5)) {
                this.ce.setContentMemberPath(a, c.getMemberPathFor(0));
            }
        }
    };
    CategoryChart.prototype.gz = function () {
        if (this.crosshairsDisplayMode == 4 || this.crosshairsDisplayMode == 3) {
            return true;
        }
        else if (this.crosshairsDisplayMode == 0) {
            if (this.ag5 == 2 || this.ag5 == 8) {
                return false;
            }
            else if (this.ag5 == 9 && this.bf != null && this.bf.dataSeries != null && this.bf.dataSeries.count > 0) {
                var a = this.bf.dataSeries._inner[0].suggestedSeries;
                if (a == 1 || a == 8) {
                    return false;
                }
            }
            return true;
        }
        return false;
    };
    CategoryChart.prototype.get_g6 = function () {
        return DVContainer.instance.checkLoaded("CategoryChartToolbarFactoryManager");
    };
    CategoryChart.prototype.vr = function (a, b, c) {
        var _this = this;
        _super.prototype.vr.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.uo();
                break;
            case "MarkerCollisionAvoidance":
                this.akt(function (d) { return d.aav = _this.ag7; });
                break;
            case "IsTransitionInEnabled":
                this.akt(function (d) { return d.zj = _this.ah2; });
                break;
            case "IsSplineShapePartOfRange":
                this.akt(function (d) {
                    if (d.f0) {
                        d.r2(_this.ah1);
                    }
                });
                break;
            case "TransitionInMode":
                this.akt(function (d) { return d.y3 = _this.ag9; });
                break;
            case "TransitionInSpeedType":
                this.akt(function (d) { return d.c5 = _this.ahj; });
                break;
            case "XAxisInterval":
                this.xAxis.mw = this.ai1;
                break;
            case "XAxisMinorInterval":
                this.xAxis.mx = this.ai4;
                break;
            case "XAxisGap":
                this.xAxis.k5 = this.ai0;
                break;
            case "XAxisOverlap":
                this.xAxis.le = this.ai5;
                break;
            case "XAxisMinimumGapSize":
                this.xAxis.ld = this.ai3;
                break;
            case "XAxisMaximumGap":
                this.xAxis.lc = this.ai2;
                break;
            case "XAxisZoomMaximumCategoryRange":
                this.xAxis.zoomMaximumCategoryRange = this.ai6;
                break;
            case "XAxisZoomMaximumItemSpan":
                this.xAxis.zoomMaximumItemSpan = this.ai7;
                break;
            case "XAxisZoomToCategoryRange":
                this.xAxis.zoomToCategoryRange = this.ai8;
                break;
            case "XAxisZoomToCategoryStart":
                this.xAxis.zoomToCategoryStart = this.ai9;
                break;
            case "XAxisZoomToItemSpan":
                this.xAxis.zoomToItemSpan = this.aja;
                break;
            case "YAxisInterval":
                this.yAxis.l8 = this.ajd;
                break;
            case "YAxisFavorLabellingScaleEnd":
                this.yAxis.lj = this.ah8;
                break;
            case "YAxisAutoRangeBufferMode":
                this.yAxis.ky = this.ag3;
                break;
            case "YAxisIsLogarithmic":
                this.yAxis.lo = this.ah9;
                break;
            case "YAxisLogarithmBase":
                this.yAxis.mm = this.ajm;
                break;
            case "YAxisMinimumValue":
                this.yAxis.mc = this.ajf;
                break;
            case "YAxisMaximumValue":
                this.yAxis.mb = this.aje;
                break;
            case "YAxisMinorInterval":
                this.yAxis.md = this.ajg;
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.aku(function (d, e) {
                    if (d.fm) {
                        d.r1(ArrayExtension.getModulus$1(Brush.$, _this.agy, e), ArrayExtension.getModulus$1(Brush.$, _this.agz, e));
                    }
                });
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.aff(function (d) { return d.lf = _this.ah6; });
                break;
            case "IsCategoryHighlightingEnabled":
            case "IsItemHighlightingEnabled":
                this.uo();
                break;
            case "AutoMarginAndAngleUpdateMode":
                this.vh(function (d) { return d.wq = _this.ag1; });
                break;
            case "ShouldAutoExpandMarginForInitialLabels":
                this.vh(function (d) { return d.xl = _this.ah3; });
                break;
            case CategoryChart.aj0:
                this.vh(function (d) { return d.xo = _this.ah4; });
                break;
            case "AutoExpandMarginExtraPadding":
                this.vh(function (d) { return d.yb = _this.ais; });
                break;
            case "AutoExpandMarginMaximumValue":
                this.vh(function (d) { return d.yc = _this.ait; });
                break;
            case CategoryChart.aj7:
                this.afb(function (d) { return d.b1 = _this.ah5; }, a);
                break;
            case CategoryChart.akl:
                this.aff(function (d) { return d.b1 = _this.ah7; });
                break;
        }
    };
    CategoryChart.$t = markType(CategoryChart, 'CategoryChart', XYChart.$);
    CategoryChart.aj0 = "ShouldConsiderAutoRotationForInitialLabels";
    CategoryChart.aj7 = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    CategoryChart.akl = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return CategoryChart;
}(XYChart));
export { CategoryChart };
