/*
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.aiq = 1000;
        _this.air = 1000;
        _this.agt = null;
        _this.agu = null;
        _this.agd = 9;
        _this.agf = 1;
        _this.agz = false;
        _this.ag0 = true;
        _this.agh = 0;
        _this.agr = 0;
        _this.ahn = 0;
        _this.ahq = 0;
        _this.ahm = 0;
        _this.ahp = 0;
        _this.aho = 1;
        _this.ahr = 0;
        _this.ahx = NaN;
        _this.af9 = 1;
        _this.ag1 = true;
        _this.ag2 = true;
        _this.ahk = DeviceUtils.g(2);
        _this.ahl = DeviceUtils.g(60);
        _this.ag6 = true;
        _this.ag3 = true;
        _this.ag5 = false;
        _this.agb = 0;
        _this.ag7 = false;
        _this.ais = 10;
        _this.ahz = NaN;
        _this.ahy = NaN;
        _this.ah0 = 0;
        _this.af5 = null;
        _this.af6 = null;
        _this.ag4 = true;
        _this.ahs = 3;
        _this.aht = NaN;
        _this.ahu = NaN;
        _this.ahv = NaN;
        _this.ahw = NaN;
        _this.agx = false;
        _this.agy = false;
        _this.ahj = null;
        DVContainer.instance.registerIfLoaded("CategoryChartToolbarFactoryManager");
        _this.t8();
        return _this;
    }
    CategoryChart.prototype.ur = function () {
        _super.prototype.ur.call(this);
        if (this.dataChart == null) {
            return;
        }
        var a = this.dataChart.c8.j.e();
        this.af7 = a.d;
        this.af8 = a.e;
        if (this.afh == null) {
            this.afh = a.k;
        }
        if (this.afo == null) {
            this.afo = a.k;
        }
        this.abg = 0;
        this.afp = AxisDefaults.h;
        this.afs = null;
        this.afl = AxisDefaults.g;
        this.afi = null;
        this.aaz = AxisDefaults.f;
        this.afm = AxisDefaults.j;
        this.aa0 = AxisDefaults.e;
        this.gi = true;
        this.gj = true;
        this.bf = 0;
        this.jg = Defaults.j;
        this.xk = Defaults.ae;
        this.xf = Defaults.af;
        this.xg = Defaults.ag;
        this.ahb = true;
    };
    CategoryChart.prototype.ut = function (a, b) {
        _super.prototype.ut.call(this, a, b);
        a.kc = this.ait;
        a.kd = this.aiu;
        a.dc = this.agv;
        a.dd = this.agw;
    };
    CategoryChart.prototype.vi = function (a, b, c) {
        var _this = this;
        _super.prototype.vi.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.ug(function (d) { return d.kc = _this.ait; });
                break;
            case "TransitionOutDuration":
                this.ug(function (d) { return d.kd = _this.aiu; });
                break;
            case "TransitionInEasingFunction":
                this.ug(function (d) { return d.dc = _this.agv; });
                break;
            case "TransitionOutEasingFunction":
                this.ug(function (d) { return d.dd = _this.agw; });
                break;
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ait", {
        get: function () {
            return this.aiq;
        },
        set: function (a) {
            var b = this.ait;
            if (a != b) {
                this.aiq = a;
                this.vf("TransitionInDuration", b, this.ait);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiu", {
        get: function () {
            return this.air;
        },
        set: function (a) {
            var b = this.aiu;
            if (a != b) {
                this.air = a;
                this.vf("TransitionOutDuration", b, this.aiu);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agv", {
        get: function () {
            return this.agt;
        },
        set: function (a) {
            var b = this.agv;
            if (a != b) {
                this.agt = a;
                this.vf("TransitionInEasingFunction", b, this.agv);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agw", {
        get: function () {
            return this.agu;
        },
        set: function (a) {
            var b = this.agw;
            if (a != b) {
                this.agu = a;
                this.vf("TransitionOutEasingFunction", b, this.agw);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ai0 = function () {
        var cvd_ = this.lp();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    CategoryChart.prototype.um = function (a, b) {
        _super.prototype.um.call(this, a, b);
        a.eh = this.ga;
        a.w2 = this.ahc;
        a.w5 = this.ahd;
        a.xs = this.ah1;
        a.xt = this.ah2;
        a.v7 = this.aga;
    };
    CategoryChart.prototype.us = function (a, b) {
        _super.prototype.us.call(this, a, b);
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c == null) {
            return;
        }
        c.aaf = this.agg;
        c.zb = this.ahb;
        c.yv = this.agi;
        c.c3 = this.ags;
        c.trendLineBrush = ArrayExtension.getModulus$1(Brush.$, this.ah, b);
        c.trendLineType = this.d9;
        c.trendLineThickness = this.kc;
        c.w1 = this.c0(a, b);
        if (a.fk) {
            a.rw(ArrayExtension.getModulus$1(Brush.$, this.af7, b), ArrayExtension.getModulus$1(Brush.$, this.af8, b));
        }
    };
    CategoryChart.prototype.agj = function () {
        return new CategoryXAxis();
    };
    CategoryChart.prototype.agn = function () {
        return new NumericYAxis();
    };
    CategoryChart.prototype.t3 = function () {
        this.xAxis = this.agj();
        this.xAxis.name = "xAxis";
        var a = this.xAxis;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.aj4));
        this.yAxis = this.agn();
        this.yAxis.name = "yAxis";
        var b = this.yAxis;
        b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.aj5));
        if (this.xAxis.az == null) {
            this.xAxis.az = new AxisLabelSettings();
        }
        if (this.yAxis.az == null) {
            this.yAxis.az = new AxisLabelSettings();
        }
    };
    CategoryChart.prototype.aeh = function (a) {
        _super.prototype.aeh.call(this, a);
        a.lb = this.ahf;
        a.le = this.ahh;
        a.b1 = this.ahg;
    };
    CategoryChart.prototype.aef = function (a) {
        _super.prototype.aef.call(this, a);
        a.b1 = this.ahe;
        a.zoomMaximumCategoryRange = this.aif;
        a.zoomToCategoryRange = this.aih;
        a.zoomToCategoryStart = this.aii;
        a.zoomMaximumItemSpan = this.aig;
        a.zoomToItemSpan = this.aij;
    };
    CategoryChart.prototype.get_b9 = function () {
        return 0;
    };
    Object.defineProperty(CategoryChart.prototype, "b9", {
        get: function () {
            return this.get_b9();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "age", {
        get: function () {
            return this.agd;
        },
        set: function (a) {
            if (a != this.agd) {
                var b = this.age;
                this.agd = a;
                this.vf("ChartType", enumGetBox(CategoryChartType_$type, b), enumGetBox(CategoryChartType_$type, this.age));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agg", {
        get: function () {
            return this.agf;
        },
        set: function (a) {
            var b = this.agg;
            if (a != b) {
                this.agf = a;
                this.vf("MarkerCollisionAvoidance", enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, b), enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, this.agg));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aha", {
        get: function () {
            return this.agz;
        },
        set: function (a) {
            var b = this.aha;
            if (a != b) {
                this.agz = a;
                this.vf("IsSplineShapePartOfRange", b, this.aha);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahb", {
        get: function () {
            return this.ag0;
        },
        set: function (a) {
            var b = this.ahb;
            if (a != b) {
                this.ag0 = a;
                this.vf("IsTransitionInEnabled", b, this.ahb);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agi", {
        get: function () {
            return this.agh;
        },
        set: function (a) {
            var b = this.agi;
            if (a != b) {
                this.agh = a;
                this.vf("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.agi));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ags", {
        get: function () {
            return this.agr;
        },
        set: function (a) {
            var b = this.ags;
            if (a != b) {
                this.agr = a;
                this.vf("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.ags));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aia", {
        get: function () {
            return this.ahn;
        },
        set: function (a) {
            var b = this.aia;
            if (a != b) {
                this.ahn = a;
                this.vf("XAxisInterval", b, this.aia);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aid", {
        get: function () {
            return this.ahq;
        },
        set: function (a) {
            var b = this.aid;
            if (a != b) {
                this.ahq = a;
                this.vf("XAxisMinorInterval", b, this.aid);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah9", {
        get: function () {
            return this.ahm;
        },
        set: function (a) {
            var b = this.ah9;
            if (a != b) {
                this.ahm = a;
                this.vf("XAxisGap", b, this.ah9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aic", {
        get: function () {
            return this.ahp;
        },
        set: function (a) {
            var b = this.aic;
            if (a != b) {
                this.ahp = a;
                this.vf("XAxisMinimumGapSize", b, this.aic);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aib", {
        get: function () {
            return this.aho;
        },
        set: function (a) {
            var b = this.aib;
            if (a != b) {
                this.aho = a;
                this.vf("XAxisMaximumGap", b, this.aib);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aie", {
        get: function () {
            return this.ahr;
        },
        set: function (a) {
            var b = this.aie;
            if (a != b) {
                this.ahr = a;
                this.vf("XAxisOverlap", b, this.aie);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aim", {
        get: function () {
            return this.ahx;
        },
        set: function (a) {
            var b = this.aim;
            if (a != b) {
                this.ahx = a;
                this.vf("YAxisInterval", b, this.aim);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aga", {
        get: function () {
            return this.af9;
        },
        set: function (a) {
            var b = this.aga;
            if (a != b) {
                this.af9 = a;
                this.vf("AutoMarginAndAngleUpdateMode", enumGetBox(AutoMarginsAndAngleUpdateMode_$type, b), enumGetBox(AutoMarginsAndAngleUpdateMode_$type, this.aga));
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.aj6 = function () {
        if (this.dataChart != null) {
            this.dataChart.zd();
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ahc", {
        get: function () {
            return this.ag1;
        },
        set: function (a) {
            var b = this.ahc;
            if (a != b) {
                this.ag1 = a;
                this.vf("ShouldAutoExpandMarginForInitialLabels", b, this.ahc);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahd", {
        get: function () {
            return this.ag2;
        },
        set: function (a) {
            var b = this.ahd;
            if (a != b) {
                this.ag2 = a;
                this.vf(CategoryChart.ai9, b, this.ahd);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah1", {
        get: function () {
            return this.ahk;
        },
        set: function (a) {
            var b = this.ah1;
            if (a != b) {
                this.ahk = a;
                this.vf("AutoExpandMarginExtraPadding", b, this.ah1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah2", {
        get: function () {
            return this.ahl;
        },
        set: function (a) {
            var b = this.ah2;
            if (a != b) {
                this.ahl = a;
                this.vf("AutoExpandMarginMaximumValue", b, this.ah2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahh", {
        get: function () {
            return this.ag6;
        },
        set: function (a) {
            var b = this.ahh;
            if (a != b) {
                this.ag6 = a;
                this.vf("YAxisFavorLabellingScaleEnd", b, this.ahh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahe", {
        get: function () {
            return this.ag3;
        },
        set: function (a) {
            var b = this.ahe;
            if (a != b) {
                this.ag3 = a;
                this.vf(CategoryChart.ajg, b, this.ahe);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahg", {
        get: function () {
            return this.ag5;
        },
        set: function (a) {
            var b = this.ahg;
            if (a != b) {
                this.ag5 = a;
                this.vf(CategoryChart.aju, b, this.ahg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "agc", {
        get: function () {
            return this.agb;
        },
        set: function (a) {
            var b = this.agc;
            if (a != b) {
                this.agb = a;
                this.vf("YAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.agc));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahi", {
        get: function () {
            return this.ag7;
        },
        set: function (a) {
            var b = this.ahi;
            if (a != b) {
                this.ag7 = a;
                this.vf("YAxisIsLogarithmic", b, this.ahi);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aiv", {
        get: function () {
            return this.ais;
        },
        set: function (a) {
            var b = this.aiv;
            if (a != b) {
                this.ais = a;
                this.vf("YAxisLogarithmBase", b, this.aiv);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aio", {
        get: function () {
            return this.ahz;
        },
        set: function (a) {
            var b = this.aio;
            if (a != b) {
                this.ahz = a;
                this.vf("YAxisMinimumValue", b, this.aio);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ain", {
        get: function () {
            return this.ahy;
        },
        set: function (a) {
            var b = this.ain;
            if (a != b) {
                this.ahy = a;
                this.vf("YAxisMaximumValue", b, this.ain);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aip", {
        get: function () {
            return this.ah0;
        },
        set: function (a) {
            var b = this.aip;
            if (a != b) {
                this.ah0 = a;
                this.vf("YAxisMinorInterval", b, this.aip);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah8", {
        get: function () {
            return this.xAxis.my;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ah7", {
        get: function () {
            return this.xAxis.mx;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ah4 = function () {
        return this.ah8;
    };
    CategoryChart.prototype.ah6 = function () {
        return this.ail;
    };
    CategoryChart.prototype.ah3 = function () {
        return this.ah7;
    };
    CategoryChart.prototype.ah5 = function () {
        return this.aik;
    };
    Object.defineProperty(CategoryChart.prototype, "ail", {
        get: function () {
            return this.yAxis.ly;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aik", {
        get: function () {
            return this.yAxis.lx;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "af7", {
        get: function () {
            return this.af5;
        },
        set: function (a) {
            var b = this.af7;
            if (a != b) {
                this.af5 = a;
                this.vf("NegativeBrushes", b, this.af7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "af8", {
        get: function () {
            return this.af6;
        },
        set: function (a) {
            var b = this.af8;
            if (a != b) {
                this.af6 = a;
                this.vf("NegativeOutlines", b, this.af8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ahf", {
        get: function () {
            return this.ag4;
        },
        set: function (a) {
            var b = this.ahf;
            if (a != b) {
                this.ag4 = a;
                this.vf("YAxisAbbreviateLargeNumbers", b, this.ahf);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aif", {
        get: function () {
            return this.ahs;
        },
        set: function (a) {
            var b = this.aif;
            if (a != b) {
                this.ahs = a;
                this.vf("XAxisZoomMaximumCategoryRange", b, this.aif);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aig", {
        get: function () {
            return this.aht;
        },
        set: function (a) {
            var b = this.aig;
            if (a != b) {
                this.aht = a;
                this.vf("XAxisZoomMaximumItemSpan", b, this.aig);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aih", {
        get: function () {
            return this.ahu;
        },
        set: function (a) {
            var b = this.aih;
            if (a != b) {
                this.ahu = a;
                this.vf("XAxisZoomToCategoryRange", b, this.aih);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aii", {
        get: function () {
            return this.ahv;
        },
        set: function (a) {
            var b = this.aii;
            if (a != b) {
                this.ahv = a;
                this.vf("XAxisZoomToCategoryStart", b, this.aii);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aij", {
        get: function () {
            return this.ahw;
        },
        set: function (a) {
            var b = this.aij;
            if (a != b) {
                this.ahw = a;
                this.vf("XAxisZoomToItemSpan", b, this.aij);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag8", {
        get: function () {
            return this.agx;
        },
        set: function (a) {
            var b = this.ag8;
            if (a != b) {
                this.agx = a;
                this.vf("IsCategoryHighlightingEnabled", b, this.ag8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ag9", {
        get: function () {
            return this.agy;
        },
        set: function (a) {
            var b = this.ag9;
            if (a != b) {
                this.agy = a;
                this.vf("IsItemHighlightingEnabled", b, this.ag9);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.get_hs = 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, "hs", {
        get: function () {
            return this.get_hs();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.hy = function () {
        if (this.ahj == null) {
            this.ahj = CategoryChartMockDataGenerator.a();
        }
        return this.ahj;
    };
    CategoryChart.prototype.cz = function (a) {
        if (a != null) {
            var b = _super.prototype.cz.call(this, a);
            if (b == 2) {
                if (a.fj && this.gv) {
                    return 13;
                }
            }
        }
        return _super.prototype.cz.call(this, a);
    };
    CategoryChart.prototype.c1 = function (a) {
        if (a != null) {
            var b = _super.prototype.cz.call(this, a);
            if (b == 2) {
                if (a.fj && this.gv) {
                    return 13;
                }
            }
        }
        return _super.prototype.c1.call(this, a);
    };
    CategoryChart.prototype.get_hd = function () {
        return this.xAxis != null && this.xAxis.categoryMode != 0;
    };
    CategoryChart.prototype.aj4 = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimum":
                this.vr("XAxisActualMinimum");
                break;
            case "ActualMaximum":
                this.vr("XAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.aj5 = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimumValue":
                this.vr("YAxisActualMinimum");
                break;
            case "ActualMaximumValue":
                this.vr("YAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.v4 = function () {
        _super.prototype.v4.call(this);
        this.xAxis.f1 = this.abq == null ? XYChart.ab2(this.xAxis, this.bj.dataSeries) : this.abq;
        this.xAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        if (this.ahc) {
            this.u6(function (a) { return a.zd(); });
        }
    };
    Object.defineProperty(CategoryChart.prototype, "xAxis", {
        get: function () {
            return this._xAxis;
        },
        set: function (a) {
            this._xAxis = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "yAxis", {
        get: function () {
            return this._yAxis;
        },
        set: function (a) {
            this._yAxis = a;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.agm = function (a, b) {
        switch (a) {
            case 2: return this.dc(1);
            case 3: return this.dc(10);
            case 0: return this.dc(0);
            case 1: return this.dc(2);
            case 6: return this.dc(6);
            case 7: return this.dc(7);
            case 4: return this.dc(4);
            case 5: return this.dc(5);
            case 8: return this.dc(8);
            case 9: return this.agl(b);
            default: return this.dc(1);
        }
    };
    CategoryChart.prototype.agl = function (a) {
        return this.dc(a);
    };
    CategoryChart.prototype.bi = function (a) {
        switch (this.age) {
            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.da = function (a, b) {
        var c = this.agm(this.age, a.suggestedSeries);
        c.aa3 = a.findMatchingHint(0).path;
        c.xAxis = this.xAxis;
        c.yAxis = this.yAxis;
        return c;
    };
    CategoryChart.prototype.v2 = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.lj = true;
            this.yAxis.ma = 10;
        }
    };
    CategoryChart.prototype.v5 = function () {
        this.yAxis.lj = this.ahi;
        this.yAxis.ma = this.aiv;
    };
    CategoryChart.prototype.get_hr = 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, "hr", {
        get: function () {
            return this.get_hr();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.tx = function (a, b) {
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c != null) {
            c.aaf = this.agg;
            c.w1 = this.c0(a, b);
        }
    };
    CategoryChart.prototype.aj2 = function (a) {
        this.aj3(function (b, c) { return a(b); });
    };
    CategoryChart.prototype.aj3 = 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.y8 = function () {
        return this.xAxis;
    };
    CategoryChart.prototype.y9 = function () {
        return this.yAxis;
    };
    CategoryChart.prototype.agp = function () {
        return this.dc(30);
    };
    CategoryChart.prototype.agq = function () {
        return this.dc(31);
    };
    CategoryChart.prototype.ho = function (a, b) {
        var c = _super.prototype.ho.call(this, a, b);
        if (c != null) {
            var d = new List$1(Series.$, 0);
            if (this.agx) {
                d.add(this.agp());
            }
            if (this.agy) {
                d.add(this.agq());
            }
            for (var e = 0; e < d.count; e++) {
                var f = d._inner[e];
                f.name = a + getInstanceType(f).typeName;
                c.add(f);
            }
        }
        return c;
    };
    CategoryChart.prototype.bd = function () {
        if (this.bc == 0) {
            return 1;
        }
        else {
            return this.bc;
        }
    };
    CategoryChart.prototype.wa = function (a, b, c) {
        _super.prototype.wa.call(this, a, b, c);
        if (this.bj.dataSeries.count > 0) {
            if (stringIsNullOrEmpty(this.ne)) {
                this.cc.setXMemberPath(a, c.getMemberPathFor(16));
            }
            if (stringIsNullOrEmpty(this.ng)) {
                this.cc.setYMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.m6)) {
                this.cc.setLabelMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.m3)) {
                this.cc.setContentMemberPath(a, c.getMemberPathFor(0));
            }
        }
    };
    CategoryChart.prototype.gy = function () {
        if (this.bf == 4 || this.bf == 3) {
            return true;
        }
        else if (this.bf == 0) {
            if (this.age == 2 || this.age == 8) {
                return false;
            }
            else if (this.age == 9 && this.bj != null && this.bj.dataSeries != null && this.bj.dataSeries.count > 0) {
                var a = this.bj.dataSeries._inner[0].suggestedSeries;
                if (a == 1 || a == 8) {
                    return false;
                }
            }
            return true;
        }
        return false;
    };
    CategoryChart.prototype.get_g5 = function () {
        return DVContainer.instance.checkLoaded("CategoryChartToolbarFactoryManager");
    };
    CategoryChart.prototype.vf = function (a, b, c) {
        var _this = this;
        _super.prototype.vf.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.t7();
                break;
            case "MarkerCollisionAvoidance":
                this.aj2(function (d) { return d.aaf = _this.agg; });
                break;
            case "IsTransitionInEnabled":
                this.aj2(function (d) { return d.zb = _this.ahb; });
                break;
            case "IsSplineShapePartOfRange":
                this.aj2(function (d) {
                    if (d.fy) {
                        d.rx(_this.aha);
                    }
                });
                break;
            case "TransitionInMode":
                this.aj2(function (d) { return d.yv = _this.agi; });
                break;
            case "TransitionInSpeedType":
                this.aj2(function (d) { return d.c3 = _this.ags; });
                break;
            case "XAxisInterval":
                this.xAxis.mt = this.aia;
                break;
            case "XAxisMinorInterval":
                this.xAxis.mu = this.aid;
                break;
            case "XAxisGap":
                this.xAxis.k2 = this.ah9;
                break;
            case "XAxisOverlap":
                this.xAxis.lb = this.aie;
                break;
            case "XAxisMinimumGapSize":
                this.xAxis.la = this.aic;
                break;
            case "XAxisMaximumGap":
                this.xAxis.k9 = this.aib;
                break;
            case "XAxisZoomMaximumCategoryRange":
                this.xAxis.zoomMaximumCategoryRange = this.aif;
                break;
            case "XAxisZoomMaximumItemSpan":
                this.xAxis.zoomMaximumItemSpan = this.aig;
                break;
            case "XAxisZoomToCategoryRange":
                this.xAxis.zoomToCategoryRange = this.aih;
                break;
            case "XAxisZoomToCategoryStart":
                this.xAxis.zoomToCategoryStart = this.aii;
                break;
            case "XAxisZoomToItemSpan":
                this.xAxis.zoomToItemSpan = this.aij;
                break;
            case "YAxisInterval":
                this.yAxis.l2 = this.aim;
                break;
            case "YAxisFavorLabellingScaleEnd":
                this.yAxis.le = this.ahh;
                break;
            case "YAxisAutoRangeBufferMode":
                this.yAxis.kv = this.agc;
                break;
            case "YAxisIsLogarithmic":
                this.yAxis.lj = this.ahi;
                break;
            case "YAxisLogarithmBase":
                this.yAxis.ma = this.aiv;
                break;
            case "YAxisMinimumValue":
                this.yAxis.l6 = this.aio;
                break;
            case "YAxisMaximumValue":
                this.yAxis.l5 = this.ain;
                break;
            case "YAxisMinorInterval":
                this.yAxis.l7 = this.aip;
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.aj3(function (d, e) {
                    if (d.fk) {
                        d.rw(ArrayExtension.getModulus$1(Brush.$, _this.af7, e), ArrayExtension.getModulus$1(Brush.$, _this.af8, e));
                    }
                });
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.aeo(function (d) { return d.lb = _this.ahf; });
                break;
            case "IsCategoryHighlightingEnabled":
            case "IsItemHighlightingEnabled":
                this.t7();
                break;
            case "AutoMarginAndAngleUpdateMode":
                this.u6(function (d) { return d.v7 = _this.aga; });
                break;
            case "ShouldAutoExpandMarginForInitialLabels":
                this.u6(function (d) { return d.w2 = _this.ahc; });
                break;
            case CategoryChart.ai9:
                this.u6(function (d) { return d.w5 = _this.ahd; });
                break;
            case "AutoExpandMarginExtraPadding":
                this.u6(function (d) { return d.xs = _this.ah1; });
                break;
            case "AutoExpandMarginMaximumValue":
                this.u6(function (d) { return d.xt = _this.ah2; });
                break;
            case CategoryChart.ajg:
                this.aek(function (d) { return d.b1 = _this.ahe; }, a);
                break;
            case CategoryChart.aju:
                this.aeo(function (d) { return d.b1 = _this.ahg; });
                break;
        }
    };
    CategoryChart.$t = markType(CategoryChart, 'CategoryChart', XYChart.$);
    CategoryChart.ai9 = "ShouldConsiderAutoRotationForInitialLabels";
    CategoryChart.ajg = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    CategoryChart.aju = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return CategoryChart;
}(XYChart));
export { CategoryChart };
