/*
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-angular-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-angular-core";
import { DataSeriesType_$type } from "igniteui-angular-core";
import { NumericYAxis } from "./NumericYAxis";
import { IDataSeriesAdapterRule_$type } from "igniteui-angular-core";
import { SimpleCategorySeriesRule } from "igniteui-angular-core";
import { SubCollectionsRule } from "igniteui-angular-core";
import { DVContainer } from "igniteui-angular-core";
import { Brush } from "igniteui-angular-core";
import { AxisDefaults } from "./AxisDefaults";
import { Defaults } from "./Defaults";
import { Series } from "./Series";
import { HorizontalAnchoredCategorySeries } from "./HorizontalAnchoredCategorySeries";
import { ArrayExtension } from "igniteui-angular-core";
import { AxisLabelSettings } from "./AxisLabelSettings";
import { DeviceUtils } from "igniteui-angular-core";
import { CategoryChartMockDataGenerator } from "./CategoryChartMockDataGenerator";
import { stringIsNullOrEmpty } from "igniteui-angular-core";
/**
 * @hidden
 */
var CategoryChart = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(CategoryChart, _super);
    function CategoryChart() {
        var _this = _super.call(this) || this;
        _this.ajk = 1000;
        _this.ajl = 1000;
        _this.ahn = null;
        _this.aho = null;
        _this.ag7 = 9;
        _this.ag9 = 1;
        _this.aht = false;
        _this.ahu = true;
        _this.ahb = 0;
        _this.ahl = 0;
        _this.aih = 0;
        _this.aik = 0;
        _this.aig = 0;
        _this.aij = 0;
        _this.aii = 1;
        _this.ail = 0;
        _this.air = NaN;
        _this.ag3 = 1;
        _this.ahv = true;
        _this.ahw = true;
        _this.aie = DeviceUtils.g(2);
        _this.aif = DeviceUtils.g(60);
        _this.ah0 = true;
        _this.ahx = true;
        _this.ahz = false;
        _this.ag5 = 0;
        _this.ah1 = false;
        _this.ajm = 10;
        _this.ait = NaN;
        _this.ais = NaN;
        _this.aiu = 0;
        _this.agz = null;
        _this.ag0 = null;
        _this.ahy = true;
        _this.aim = 3;
        _this.ain = NaN;
        _this.aio = NaN;
        _this.aip = NaN;
        _this.aiq = NaN;
        _this.ahr = false;
        _this.ahs = false;
        _this.aid = null;
        DVContainer.instance.registerIfLoaded("CategoryChartToolbarFactoryManager");
        _this.ul();
        return _this;
    }
    CategoryChart.prototype.u5 = function () {
        _super.prototype.u5.call(this);
        if (this.dataChart == null) {
            return;
        }
        var a = this.dataChart.c9.j.e();
        this.ag1 = a.d;
        this.ag2 = a.e;
        if (this.agb == null) {
            this.agb = a.k;
        }
        if (this.agi == null) {
            this.agi = a.k;
        }
        this.aca = 0;
        this.agj = AxisDefaults.h;
        this.agm = null;
        this.agf = AxisDefaults.g;
        this.agc = null;
        this.abt = AxisDefaults.f;
        this.agg = AxisDefaults.j;
        this.abu = AxisDefaults.e;
        this.crosshairsAnnotationEnabled = true;
        this.gn = true;
        this.crosshairsDisplayMode = 0;
        this.jl = Defaults.j;
        this.yc = Defaults.ae;
        this.x7 = Defaults.af;
        this.x8 = Defaults.ag;
        this.ah5 = true;
    };
    CategoryChart.prototype.u7 = function (a, b) {
        _super.prototype.u7.call(this, a, b);
        a.ke = this.ajn;
        a.kf = this.ajo;
        a.de = this.ahp;
        a.df = this.ahq;
    };
    CategoryChart.prototype.vx = function (a, b, c) {
        var _this = this;
        _super.prototype.vx.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.uu(function (d) { return d.ke = _this.ajn; });
                break;
            case "TransitionOutDuration":
                this.uu(function (d) { return d.kf = _this.ajo; });
                break;
            case "TransitionInEasingFunction":
                this.uu(function (d) { return d.de = _this.ahp; });
                break;
            case "TransitionOutEasingFunction":
                this.uu(function (d) { return d.df = _this.ahq; });
                break;
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ajn", {
        get: function () {
            return this.ajk;
        },
        set: function (a) {
            var b = this.ajn;
            if (a != b) {
                this.ajk = a;
                this.vu("TransitionInDuration", b, this.ajn);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajo", {
        get: function () {
            return this.ajl;
        },
        set: function (a) {
            var b = this.ajo;
            if (a != b) {
                this.ajl = a;
                this.vu("TransitionOutDuration", b, this.ajo);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahp", {
        get: function () {
            return this.ahn;
        },
        set: function (a) {
            var b = this.ahp;
            if (a != b) {
                this.ahn = a;
                this.vu("TransitionInEasingFunction", b, this.ahp);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahq", {
        get: function () {
            return this.aho;
        },
        set: function (a) {
            var b = this.ahq;
            if (a != b) {
                this.aho = a;
                this.vu("TransitionOutEasingFunction", b, this.ahq);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.aju = function () {
        var cvd_ = this.lu();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    CategoryChart.prototype.u0 = function (a, b) {
        _super.prototype.u0.call(this, a, b);
        a.ek = this.gg;
        a.xm = this.ah6;
        a.xp = this.ah7;
        a.yc = this.aiv;
        a.yd = this.aiw;
        a.wr = this.ag4;
    };
    CategoryChart.prototype.u6 = function (a, b) {
        _super.prototype.u6.call(this, a, b);
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c == null) {
            return;
        }
        c.aax = this.aha;
        c.zl = this.ah5;
        c.y5 = this.ahc;
        c.c5 = this.ahm;
        c.trendLineBrush = ArrayExtension.getModulus$1(Brush.$, this.af, b);
        c.trendLineType = this.trendLineType;
        c.trendLineThickness = this.kh;
        c.xa = this.c2(a, b);
        if (a.fm) {
            a.r3(ArrayExtension.getModulus$1(Brush.$, this.ag1, b), ArrayExtension.getModulus$1(Brush.$, this.ag2, b));
        }
    };
    CategoryChart.prototype.ahd = function () {
        return new CategoryXAxis();
    };
    CategoryChart.prototype.ahh = function () {
        return new NumericYAxis();
    };
    CategoryChart.prototype.ug = function () {
        this.xAxis = this.ahd();
        this.xAxis.name = "xAxis";
        var a = this.xAxis;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.aky));
        this.yAxis = this.ahh();
        this.yAxis.name = "yAxis";
        var b = this.yAxis;
        b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.akz));
        if (this.xAxis.az == null) {
            this.xAxis.az = new AxisLabelSettings();
        }
        if (this.yAxis.az == null) {
            this.yAxis.az = new AxisLabelSettings();
        }
    };
    CategoryChart.prototype.afb = function (a) {
        _super.prototype.afb.call(this, a);
        a.lf = this.ah9;
        a.lj = this.aib;
        a.b1 = this.aia;
    };
    CategoryChart.prototype.ae9 = function (a) {
        _super.prototype.ae9.call(this, a);
        a.b1 = this.ah8;
        a.zoomMaximumCategoryRange = this.ai9;
        a.zoomToCategoryRange = this.ajb;
        a.zoomToCategoryStart = this.ajc;
        a.zoomMaximumItemSpan = this.aja;
        a.zoomToItemSpan = this.ajd;
    };
    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, "ag8", {
        get: function () {
            return this.ag7;
        },
        set: function (a) {
            if (a != this.ag7) {
                var b = this.ag8;
                this.ag7 = a;
                this.vu("ChartType", enumGetBox(CategoryChartType_$type, b), enumGetBox(CategoryChartType_$type, this.ag8));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aha", {
        get: function () {
            return this.ag9;
        },
        set: function (a) {
            var b = this.aha;
            if (a != b) {
                this.ag9 = a;
                this.vu("MarkerCollisionAvoidance", enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, b), enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, this.aha));
            }
        },
        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.vu("IsSplineShapePartOfRange", b, this.ah4);
            }
        },
        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.vu("IsTransitionInEnabled", b, this.ah5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahc", {
        get: function () {
            return this.ahb;
        },
        set: function (a) {
            var b = this.ahc;
            if (a != b) {
                this.ahb = a;
                this.vu("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.ahc));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahm", {
        get: function () {
            return this.ahl;
        },
        set: function (a) {
            var b = this.ahm;
            if (a != b) {
                this.ahl = a;
                this.vu("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.ahm));
            }
        },
        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.vu("XAxisInterval", b, this.ai4);
            }
        },
        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.vu("XAxisMinorInterval", b, this.ai7);
            }
        },
        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.vu("XAxisGap", b, this.ai3);
            }
        },
        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.vu("XAxisMinimumGapSize", b, this.ai6);
            }
        },
        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.vu("XAxisMaximumGap", b, this.ai5);
            }
        },
        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.vu("XAxisOverlap", b, this.ai8);
            }
        },
        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.vu("YAxisInterval", b, this.ajg);
            }
        },
        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.vu("AutoMarginAndAngleUpdateMode", enumGetBox(AutoMarginsAndAngleUpdateMode_$type, b), enumGetBox(AutoMarginsAndAngleUpdateMode_$type, this.ag4));
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ak0 = function () {
        if (this.dataChart != null) {
            this.dataChart.zx();
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ah6", {
        get: function () {
            return this.ahv;
        },
        set: function (a) {
            var b = this.ah6;
            if (a != b) {
                this.ahv = a;
                this.vu("ShouldAutoExpandMarginForInitialLabels", b, this.ah6);
            }
        },
        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.vu(CategoryChart.aj3, b, this.ah7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiv", {
        get: function () {
            return this.aie;
        },
        set: function (a) {
            var b = this.aiv;
            if (a != b) {
                this.aie = a;
                this.vu("AutoExpandMarginExtraPadding", b, this.aiv);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiw", {
        get: function () {
            return this.aif;
        },
        set: function (a) {
            var b = this.aiw;
            if (a != b) {
                this.aif = a;
                this.vu("AutoExpandMarginMaximumValue", b, this.aiw);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aib", {
        get: function () {
            return this.ah0;
        },
        set: function (a) {
            var b = this.aib;
            if (a != b) {
                this.ah0 = a;
                this.vu("YAxisFavorLabellingScaleEnd", b, this.aib);
            }
        },
        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.vu(CategoryChart.aka, b, this.ah8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aia", {
        get: function () {
            return this.ahz;
        },
        set: function (a) {
            var b = this.aia;
            if (a != b) {
                this.ahz = a;
                this.vu(CategoryChart.ako, b, this.aia);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag6", {
        get: function () {
            return this.ag5;
        },
        set: function (a) {
            var b = this.ag6;
            if (a != b) {
                this.ag5 = a;
                this.vu("YAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ag6));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aic", {
        get: function () {
            return this.ah1;
        },
        set: function (a) {
            var b = this.aic;
            if (a != b) {
                this.ah1 = a;
                this.vu("YAxisIsLogarithmic", b, this.aic);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajp", {
        get: function () {
            return this.ajm;
        },
        set: function (a) {
            var b = this.ajp;
            if (a != b) {
                this.ajm = a;
                this.vu("YAxisLogarithmBase", b, this.ajp);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aji", {
        get: function () {
            return this.ait;
        },
        set: function (a) {
            var b = this.aji;
            if (a != b) {
                this.ait = a;
                this.vu("YAxisMinimumValue", b, this.aji);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajh", {
        get: function () {
            return this.ais;
        },
        set: function (a) {
            var b = this.ajh;
            if (a != b) {
                this.ais = a;
                this.vu("YAxisMaximumValue", b, this.ajh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajj", {
        get: function () {
            return this.aiu;
        },
        set: function (a) {
            var b = this.ajj;
            if (a != b) {
                this.aiu = a;
                this.vu("YAxisMinorInterval", b, this.ajj);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai2", {
        get: function () {
            return this.xAxis.m1;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ai1", {
        get: function () {
            return this.xAxis.m0;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.aiy = function () {
        return this.ai2;
    };
    CategoryChart.prototype.ai0 = function () {
        return this.ajf;
    };
    CategoryChart.prototype.aix = function () {
        return this.ai1;
    };
    CategoryChart.prototype.aiz = function () {
        return this.aje;
    };
    Object.defineProperty(CategoryChart.prototype, "ajf", {
        get: function () {
            return this.yAxis.l4;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aje", {
        get: function () {
            return this.yAxis.l3;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag1", {
        get: function () {
            return this.agz;
        },
        set: function (a) {
            var b = this.ag1;
            if (a != b) {
                this.agz = a;
                this.vu("NegativeBrushes", b, this.ag1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag2", {
        get: function () {
            return this.ag0;
        },
        set: function (a) {
            var b = this.ag2;
            if (a != b) {
                this.ag0 = a;
                this.vu("NegativeOutlines", b, this.ag2);
            }
        },
        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.vu("YAxisAbbreviateLargeNumbers", b, this.ah9);
            }
        },
        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.vu("XAxisZoomMaximumCategoryRange", 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.vu("XAxisZoomMaximumItemSpan", b, this.aja);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajb", {
        get: function () {
            return this.aio;
        },
        set: function (a) {
            var b = this.ajb;
            if (a != b) {
                this.aio = a;
                this.vu("XAxisZoomToCategoryRange", b, this.ajb);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajc", {
        get: function () {
            return this.aip;
        },
        set: function (a) {
            var b = this.ajc;
            if (a != b) {
                this.aip = a;
                this.vu("XAxisZoomToCategoryStart", b, this.ajc);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ajd", {
        get: function () {
            return this.aiq;
        },
        set: function (a) {
            var b = this.ajd;
            if (a != b) {
                this.aiq = a;
                this.vu("XAxisZoomToItemSpan", b, this.ajd);
            }
        },
        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.vu("IsCategoryHighlightingEnabled", b, this.ah2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah3", {
        get: function () {
            return this.ahs;
        },
        set: function (a) {
            var b = this.ah3;
            if (a != b) {
                this.ahs = a;
                this.vu("IsItemHighlightingEnabled", b, this.ah3);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.get_hx = 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, "hx", {
        get: function () {
            return this.get_hx();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.h3 = function () {
        if (this.aid == null) {
            this.aid = CategoryChartMockDataGenerator.a();
        }
        return this.aid;
    };
    CategoryChart.prototype.c1 = function (a) {
        if (a != null) {
            var b = _super.prototype.c1.call(this, a);
            if (b == 2) {
                if (a.fl && this.gy) {
                    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.gy) {
                    return 13;
                }
            }
        }
        return _super.prototype.c3.call(this, a);
    };
    CategoryChart.prototype.get_hh = function () {
        return true;
    };
    CategoryChart.prototype.aky = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimum":
                this.wb("XAxisActualMinimum");
                break;
            case "ActualMaximum":
                this.wb("XAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.akz = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimumValue":
                this.wb("YAxisActualMinimum");
                break;
            case "ActualMaximumValue":
                this.wb("YAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.wp = function () {
        _super.prototype.wp.call(this);
        this.xAxis.f2 = this.ack == null ? XYChart.acw(this.xAxis, this.bf.dataSeries) : this.ack;
        this.xAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        if (this.ah6) {
            this.vk(function (a) { return a.zx(); });
        }
    };
    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.ahg = 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.ahf(b);
            default: return this.de(1);
        }
    };
    CategoryChart.prototype.ahf = function (a) {
        return this.de(a);
    };
    CategoryChart.prototype.be = function (a) {
        switch (this.ag8) {
            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.ahg(this.ag8, a.suggestedSeries);
        c.abn = a.findMatchingHint(0).path;
        c.xAxis = this.xAxis;
        c.yAxis = this.yAxis;
        return c;
    };
    CategoryChart.prototype.wn = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.lo = true;
            this.yAxis.mm = 10;
        }
    };
    CategoryChart.prototype.wq = function () {
        this.yAxis.lo = this.aic;
        this.yAxis.mm = this.ajp;
    };
    CategoryChart.prototype.get_hw = 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, "hw", {
        get: function () {
            return this.get_hw();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ua = function (a, b) {
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c != null) {
            c.aax = this.aha;
            c.xa = this.c2(a, b);
        }
    };
    CategoryChart.prototype.akw = function (a) {
        this.akx(function (b, c) { return a(b); });
    };
    CategoryChart.prototype.akx = 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.z2 = function () {
        return this.xAxis;
    };
    CategoryChart.prototype.z3 = function () {
        return this.yAxis;
    };
    CategoryChart.prototype.ahj = function () {
        return this.de(30);
    };
    CategoryChart.prototype.ahk = function () {
        return this.de(31);
    };
    CategoryChart.prototype.ht = function (a, b) {
        var c = _super.prototype.ht.call(this, a, b);
        if (c != null) {
            var d = new List$1(Series.$, 0);
            if (this.ahr) {
                d.add(this.ahj());
            }
            if (this.ahs) {
                d.add(this.ahk());
            }
            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.wu = function (a, b, c) {
        _super.prototype.wu.call(this, a, b, c);
        if (this.bf.dataSeries.count > 0) {
            if (stringIsNullOrEmpty(this.no)) {
                this.ce.setXMemberPath(a, c.getMemberPathFor(16));
            }
            if (stringIsNullOrEmpty(this.nq)) {
                this.ce.setYMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.nb)) {
                this.ce.setLabelMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.m7)) {
                this.ce.setContentMemberPath(a, c.getMemberPathFor(0));
            }
        }
    };
    CategoryChart.prototype.g1 = function () {
        if (this.crosshairsDisplayMode == 4 || this.crosshairsDisplayMode == 3) {
            return true;
        }
        else if (this.crosshairsDisplayMode == 0) {
            if (this.ag8 == 2 || this.ag8 == 8) {
                return false;
            }
            else if (this.ag8 == 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_g8 = function () {
        return DVContainer.instance.checkLoaded("CategoryChartToolbarFactoryManager");
    };
    CategoryChart.prototype.vu = function (a, b, c) {
        var _this = this;
        _super.prototype.vu.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.ur();
                break;
            case "MarkerCollisionAvoidance":
                this.akw(function (d) { return d.aax = _this.aha; });
                break;
            case "IsTransitionInEnabled":
                this.akw(function (d) { return d.zl = _this.ah5; });
                break;
            case "IsSplineShapePartOfRange":
                this.akw(function (d) {
                    if (d.f0) {
                        d.r4(_this.ah4);
                    }
                });
                break;
            case "TransitionInMode":
                this.akw(function (d) { return d.y5 = _this.ahc; });
                break;
            case "TransitionInSpeedType":
                this.akw(function (d) { return d.c5 = _this.ahm; });
                break;
            case "XAxisInterval":
                this.xAxis.mw = this.ai4;
                break;
            case "XAxisMinorInterval":
                this.xAxis.mx = this.ai7;
                break;
            case "XAxisGap":
                this.xAxis.k5 = this.ai3;
                break;
            case "XAxisOverlap":
                this.xAxis.le = this.ai8;
                break;
            case "XAxisMinimumGapSize":
                this.xAxis.ld = this.ai6;
                break;
            case "XAxisMaximumGap":
                this.xAxis.lc = this.ai5;
                break;
            case "XAxisZoomMaximumCategoryRange":
                this.xAxis.zoomMaximumCategoryRange = this.ai9;
                break;
            case "XAxisZoomMaximumItemSpan":
                this.xAxis.zoomMaximumItemSpan = this.aja;
                break;
            case "XAxisZoomToCategoryRange":
                this.xAxis.zoomToCategoryRange = this.ajb;
                break;
            case "XAxisZoomToCategoryStart":
                this.xAxis.zoomToCategoryStart = this.ajc;
                break;
            case "XAxisZoomToItemSpan":
                this.xAxis.zoomToItemSpan = this.ajd;
                break;
            case "YAxisInterval":
                this.yAxis.l8 = this.ajg;
                break;
            case "YAxisFavorLabellingScaleEnd":
                this.yAxis.lj = this.aib;
                break;
            case "YAxisAutoRangeBufferMode":
                this.yAxis.ky = this.ag6;
                break;
            case "YAxisIsLogarithmic":
                this.yAxis.lo = this.aic;
                break;
            case "YAxisLogarithmBase":
                this.yAxis.mm = this.ajp;
                break;
            case "YAxisMinimumValue":
                this.yAxis.mc = this.aji;
                break;
            case "YAxisMaximumValue":
                this.yAxis.mb = this.ajh;
                break;
            case "YAxisMinorInterval":
                this.yAxis.md = this.ajj;
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.akx(function (d, e) {
                    if (d.fm) {
                        d.r3(ArrayExtension.getModulus$1(Brush.$, _this.ag1, e), ArrayExtension.getModulus$1(Brush.$, _this.ag2, e));
                    }
                });
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.afi(function (d) { return d.lf = _this.ah9; });
                break;
            case "IsCategoryHighlightingEnabled":
            case "IsItemHighlightingEnabled":
                this.ur();
                break;
            case "AutoMarginAndAngleUpdateMode":
                this.vk(function (d) { return d.wr = _this.ag4; });
                break;
            case "ShouldAutoExpandMarginForInitialLabels":
                this.vk(function (d) { return d.xm = _this.ah6; });
                break;
            case CategoryChart.aj3:
                this.vk(function (d) { return d.xp = _this.ah7; });
                break;
            case "AutoExpandMarginExtraPadding":
                this.vk(function (d) { return d.yc = _this.aiv; });
                break;
            case "AutoExpandMarginMaximumValue":
                this.vk(function (d) { return d.yd = _this.aiw; });
                break;
            case CategoryChart.aka:
                this.afe(function (d) { return d.b1 = _this.ah8; }, a);
                break;
            case CategoryChart.ako:
                this.afi(function (d) { return d.b1 = _this.aia; });
                break;
        }
    };
    CategoryChart.$t = markType(CategoryChart, 'CategoryChart', XYChart.$);
    CategoryChart.aj3 = "ShouldConsiderAutoRotationForInitialLabels";
    CategoryChart.aka = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    CategoryChart.ako = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return CategoryChart;
}(XYChart));
export { CategoryChart };
