/*
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.afj = 1000;
        _this.ado = null;
        _this.ac8 = 9;
        _this.ada = 1;
        _this.ads = false;
        _this.adt = true;
        _this.adc = 0;
        _this.adm = 0;
        _this.aeg = 0;
        _this.aej = 0;
        _this.aef = 0;
        _this.aei = 0;
        _this.aeh = 1;
        _this.aek = 0;
        _this.aeq = NaN;
        _this.ac4 = 1;
        _this.adu = true;
        _this.adv = true;
        _this.aed = DeviceUtils.g(2);
        _this.aee = DeviceUtils.g(60);
        _this.adz = true;
        _this.adw = true;
        _this.ady = false;
        _this.ac6 = 0;
        _this.ad0 = false;
        _this.afk = 10;
        _this.aes = NaN;
        _this.aer = NaN;
        _this.aet = 0;
        _this.ac0 = null;
        _this.ac1 = null;
        _this.adx = true;
        _this.ael = 3;
        _this.aem = NaN;
        _this.aen = NaN;
        _this.aeo = NaN;
        _this.aep = NaN;
        _this.adq = false;
        _this.adr = false;
        _this.aec = null;
        DVContainer.instance.registerIfLoaded("CategoryChartToolbarFactoryManager");
        _this.rr();
        return _this;
    }
    CategoryChart.prototype.r9 = function () {
        _super.prototype.r9.call(this);
        if (this.dataChart == null) {
            return;
        }
        var a = this.dataChart.cu.j.e();
        this.ac2 = a.d;
        this.ac3 = a.e;
        if (this.acc == null) {
            this.acc = a.k;
        }
        if (this.acj == null) {
            this.acj = a.k;
        }
        this.yb = 0;
        this.ack = AxisDefaults.h;
        this.acn = null;
        this.acg = AxisDefaults.g;
        this.acd = null;
        this.xu = AxisDefaults.f;
        this.ach = AxisDefaults.j;
        this.xv = AxisDefaults.e;
        this.fm = true;
        this.fn = true;
        this.a9 = 0;
        this.h9 = Defaults.j;
        this.uo = Defaults.ae;
        this.uj = Defaults.af;
        this.uk = Defaults.ag;
        this.ad4 = true;
    };
    CategoryChart.prototype.sb = function (a, b) {
        _super.prototype.sb.call(this, a, b);
        a.hs = this.afl;
        a.ch = this.adp;
    };
    CategoryChart.prototype.sy = function (a, b, c) {
        var _this = this;
        _super.prototype.sy.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.ry(function (d) { return d.hs = _this.afl; });
                break;
            case "TransitionInEasingFunction":
                this.ry(function (d) { return d.ch = _this.adp; });
                break;
        }
    };
    Object.defineProperty(CategoryChart.prototype, "afl", {
        get: function () {
            return this.afj;
        },
        set: function (a) {
            var b = this.afl;
            if (a != b) {
                this.afj = a;
                this.sv("TransitionInDuration", b, this.afl);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adp", {
        get: function () {
            return this.ado;
        },
        set: function (a) {
            var b = this.adp;
            if (a != b) {
                this.ado = a;
                this.sv("TransitionInEasingFunction", b, this.adp);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.afr = function () {
        var cvd_ = this.j9();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    CategoryChart.prototype.r4 = function (a) {
        _super.prototype.r4.call(this, a);
        a.ds = this.fh;
        a.ur = this.ad5;
        a.uu = this.ad6;
        a.vh = this.aeu;
        a.vi = this.aev;
        a.tw = this.ac5;
    };
    CategoryChart.prototype.sa = function (a, b) {
        _super.prototype.sa.call(this, a, b);
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c == null) {
            return;
        }
        c.tr = this.adb;
        c.so = this.ad4;
        c.r8 = this.add;
        c.cb = this.adn;
        c.trendLineBrush = ArrayExtension.getModulus$1(Brush.$, this.ah, b);
        c.trendLineType = this.dq;
        c.trendLineThickness = this.i7;
        c.ql = this.cr(a, b);
        if (a.d6) {
            a.ms(ArrayExtension.getModulus$1(Brush.$, this.ac2, b), ArrayExtension.getModulus$1(Brush.$, this.ac3, b));
        }
    };
    CategoryChart.prototype.ade = function () {
        return new CategoryXAxis();
    };
    CategoryChart.prototype.adi = function () {
        return new NumericYAxis();
    };
    CategoryChart.prototype.rn = function () {
        this.xAxis = this.ade();
        this.xAxis.name = "xAxis";
        var a = this.xAxis;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.agt));
        this.yAxis = this.adi();
        this.yAxis.name = "yAxis";
        var b = this.yAxis;
        b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.agu));
        if (this.xAxis.ay == null) {
            this.xAxis.ay = new AxisLabelSettings();
        }
        if (this.yAxis.ay == null) {
            this.yAxis.ay = new AxisLabelSettings();
        }
    };
    CategoryChart.prototype.abc = function (a) {
        _super.prototype.abc.call(this, a);
        a.k9 = this.ad8;
        a.lc = this.aea;
        a.b0 = this.ad9;
    };
    CategoryChart.prototype.aba = function (a) {
        _super.prototype.aba.call(this, a);
        a.b0 = this.ad7;
        a.zoomMaximumCategoryRange = this.ae8;
        a.zoomToCategoryRange = this.afa;
        a.zoomToCategoryStart = this.afb;
        a.zoomMaximumItemSpan = this.ae9;
        a.zoomToItemSpan = this.afc;
    };
    CategoryChart.prototype.get_b1 = function () {
        return 0;
    };
    Object.defineProperty(CategoryChart.prototype, "b1", {
        get: function () {
            return this.get_b1();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac9", {
        get: function () {
            return this.ac8;
        },
        set: function (a) {
            if (a != this.ac8) {
                var b = this.ac9;
                this.ac8 = a;
                this.sv("ChartType", enumGetBox(CategoryChartType_$type, b), enumGetBox(CategoryChartType_$type, this.ac9));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adb", {
        get: function () {
            return this.ada;
        },
        set: function (a) {
            var b = this.adb;
            if (a != b) {
                this.ada = a;
                this.sv("MarkerCollisionAvoidance", enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, b), enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, this.adb));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad3", {
        get: function () {
            return this.ads;
        },
        set: function (a) {
            var b = this.ad3;
            if (a != b) {
                this.ads = a;
                this.sv("IsSplineShapePartOfRange", b, this.ad3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad4", {
        get: function () {
            return this.adt;
        },
        set: function (a) {
            var b = this.ad4;
            if (a != b) {
                this.adt = a;
                this.sv("IsTransitionInEnabled", b, this.ad4);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "add", {
        get: function () {
            return this.adc;
        },
        set: function (a) {
            var b = this.add;
            if (a != b) {
                this.adc = a;
                this.sv("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.add));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adn", {
        get: function () {
            return this.adm;
        },
        set: function (a) {
            var b = this.adn;
            if (a != b) {
                this.adm = a;
                this.sv("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.adn));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae3", {
        get: function () {
            return this.aeg;
        },
        set: function (a) {
            var b = this.ae3;
            if (a != b) {
                this.aeg = a;
                this.sv("XAxisInterval", b, this.ae3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae6", {
        get: function () {
            return this.aej;
        },
        set: function (a) {
            var b = this.ae6;
            if (a != b) {
                this.aej = a;
                this.sv("XAxisMinorInterval", b, this.ae6);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae2", {
        get: function () {
            return this.aef;
        },
        set: function (a) {
            var b = this.ae2;
            if (a != b) {
                this.aef = a;
                this.sv("XAxisGap", b, this.ae2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae5", {
        get: function () {
            return this.aei;
        },
        set: function (a) {
            var b = this.ae5;
            if (a != b) {
                this.aei = a;
                this.sv("XAxisMinimumGapSize", b, this.ae5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae4", {
        get: function () {
            return this.aeh;
        },
        set: function (a) {
            var b = this.ae4;
            if (a != b) {
                this.aeh = a;
                this.sv("XAxisMaximumGap", b, this.ae4);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae7", {
        get: function () {
            return this.aek;
        },
        set: function (a) {
            var b = this.ae7;
            if (a != b) {
                this.aek = a;
                this.sv("XAxisOverlap", b, this.ae7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aff", {
        get: function () {
            return this.aeq;
        },
        set: function (a) {
            var b = this.aff;
            if (a != b) {
                this.aeq = a;
                this.sv("YAxisInterval", b, this.aff);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac5", {
        get: function () {
            return this.ac4;
        },
        set: function (a) {
            var b = this.ac5;
            if (a != b) {
                this.ac4 = a;
                this.sv("AutoMarginAndAngleUpdateMode", enumGetBox(AutoMarginsAndAngleUpdateMode_$type, b), enumGetBox(AutoMarginsAndAngleUpdateMode_$type, this.ac5));
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.agv = function () {
        if (this.dataChart != null) {
            this.dataChart.w2();
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ad5", {
        get: function () {
            return this.adu;
        },
        set: function (a) {
            var b = this.ad5;
            if (a != b) {
                this.adu = a;
                this.sv("ShouldAutoExpandMarginForInitialLabels", b, this.ad5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad6", {
        get: function () {
            return this.adv;
        },
        set: function (a) {
            var b = this.ad6;
            if (a != b) {
                this.adv = a;
                this.sv(CategoryChart.af0, b, this.ad6);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aeu", {
        get: function () {
            return this.aed;
        },
        set: function (a) {
            var b = this.aeu;
            if (a != b) {
                this.aed = a;
                this.sv("AutoExpandMarginExtraPadding", b, this.aeu);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aev", {
        get: function () {
            return this.aee;
        },
        set: function (a) {
            var b = this.aev;
            if (a != b) {
                this.aee = a;
                this.sv("AutoExpandMarginMaximumValue", b, this.aev);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aea", {
        get: function () {
            return this.adz;
        },
        set: function (a) {
            var b = this.aea;
            if (a != b) {
                this.adz = a;
                this.sv("YAxisFavorLabellingScaleEnd", b, this.aea);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad7", {
        get: function () {
            return this.adw;
        },
        set: function (a) {
            var b = this.ad7;
            if (a != b) {
                this.adw = a;
                this.sv(CategoryChart.af5, b, this.ad7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad9", {
        get: function () {
            return this.ady;
        },
        set: function (a) {
            var b = this.ad9;
            if (a != b) {
                this.ady = a;
                this.sv(CategoryChart.agj, b, this.ad9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac7", {
        get: function () {
            return this.ac6;
        },
        set: function (a) {
            var b = this.ac7;
            if (a != b) {
                this.ac6 = a;
                this.sv("YAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ac7));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aeb", {
        get: function () {
            return this.ad0;
        },
        set: function (a) {
            var b = this.aeb;
            if (a != b) {
                this.ad0 = a;
                this.sv("YAxisIsLogarithmic", b, this.aeb);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afm", {
        get: function () {
            return this.afk;
        },
        set: function (a) {
            var b = this.afm;
            if (a != b) {
                this.afk = a;
                this.sv("YAxisLogarithmBase", b, this.afm);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afh", {
        get: function () {
            return this.aes;
        },
        set: function (a) {
            var b = this.afh;
            if (a != b) {
                this.aes = a;
                this.sv("YAxisMinimumValue", b, this.afh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afg", {
        get: function () {
            return this.aer;
        },
        set: function (a) {
            var b = this.afg;
            if (a != b) {
                this.aer = a;
                this.sv("YAxisMaximumValue", b, this.afg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afi", {
        get: function () {
            return this.aet;
        },
        set: function (a) {
            var b = this.afi;
            if (a != b) {
                this.aet = a;
                this.sv("YAxisMinorInterval", b, this.afi);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae1", {
        get: function () {
            return this.xAxis.mv;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae0", {
        get: function () {
            return this.xAxis.mu;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.aex = function () {
        return this.ae1;
    };
    CategoryChart.prototype.aez = function () {
        return this.afe;
    };
    CategoryChart.prototype.aew = function () {
        return this.ae0;
    };
    CategoryChart.prototype.aey = function () {
        return this.afd;
    };
    Object.defineProperty(CategoryChart.prototype, "afe", {
        get: function () {
            return this.yAxis.lw;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afd", {
        get: function () {
            return this.yAxis.lv;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac2", {
        get: function () {
            return this.ac0;
        },
        set: function (a) {
            var b = this.ac2;
            if (a != b) {
                this.ac0 = a;
                this.sv("NegativeBrushes", b, this.ac2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac3", {
        get: function () {
            return this.ac1;
        },
        set: function (a) {
            var b = this.ac3;
            if (a != b) {
                this.ac1 = a;
                this.sv("NegativeOutlines", b, this.ac3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad8", {
        get: function () {
            return this.adx;
        },
        set: function (a) {
            var b = this.ad8;
            if (a != b) {
                this.adx = a;
                this.sv("YAxisAbbreviateLargeNumbers", b, this.ad8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae8", {
        get: function () {
            return this.ael;
        },
        set: function (a) {
            var b = this.ae8;
            if (a != b) {
                this.ael = a;
                this.sv("XAxisZoomMaximumCategoryRange", b, this.ae8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae9", {
        get: function () {
            return this.aem;
        },
        set: function (a) {
            var b = this.ae9;
            if (a != b) {
                this.aem = a;
                this.sv("XAxisZoomMaximumItemSpan", b, this.ae9);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afa", {
        get: function () {
            return this.aen;
        },
        set: function (a) {
            var b = this.afa;
            if (a != b) {
                this.aen = a;
                this.sv("XAxisZoomToCategoryRange", b, this.afa);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afb", {
        get: function () {
            return this.aeo;
        },
        set: function (a) {
            var b = this.afb;
            if (a != b) {
                this.aeo = a;
                this.sv("XAxisZoomToCategoryStart", b, this.afb);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afc", {
        get: function () {
            return this.aep;
        },
        set: function (a) {
            var b = this.afc;
            if (a != b) {
                this.aep = a;
                this.sv("XAxisZoomToItemSpan", b, this.afc);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad1", {
        get: function () {
            return this.adq;
        },
        set: function (a) {
            var b = this.ad1;
            if (a != b) {
                this.adq = a;
                this.sv("IsCategoryHighlightingEnabled", b, this.ad1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad2", {
        get: function () {
            return this.adr;
        },
        set: function (a) {
            var b = this.ad2;
            if (a != b) {
                this.adr = a;
                this.sv("IsItemHighlightingEnabled", b, this.ad2);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.get_gr = 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, "gr", {
        get: function () {
            return this.get_gr();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.gv = function () {
        if (this.aec == null) {
            this.aec = CategoryChartMockDataGenerator.a();
        }
        return this.aec;
    };
    CategoryChart.prototype.cq = function (a) {
        if (a != null) {
            var b = _super.prototype.cq.call(this, a);
            if (b == 2) {
                if (a.d5 && this.fx) {
                    return 13;
                }
            }
        }
        return _super.prototype.cq.call(this, a);
    };
    CategoryChart.prototype.cs = function (a) {
        if (a != null) {
            var b = _super.prototype.cq.call(this, a);
            if (b == 2) {
                if (a.d5 && this.fx) {
                    return 13;
                }
            }
        }
        return _super.prototype.cs.call(this, a);
    };
    CategoryChart.prototype.get_ge = function () {
        return this.xAxis != null && this.xAxis.categoryMode != 0;
    };
    CategoryChart.prototype.agt = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimum":
                this.s5("XAxisActualMinimum");
                break;
            case "ActualMaximum":
                this.s5("XAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.agu = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimumValue":
                this.s5("YAxisActualMinimum");
                break;
            case "ActualMaximumValue":
                this.s5("YAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.th = function () {
        _super.prototype.th.call(this);
        this.xAxis.fz = this.yl == null ? XYChart.yx(this.xAxis, this.bd.dataSeries) : this.yl;
        this.xAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        if (this.ad5) {
            this.sn(function (a) { return a.w2(); });
        }
    };
    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.adh = function (a, b) {
        switch (a) {
            case 2: return this.c3(1);
            case 3: return this.c3(10);
            case 0: return this.c3(0);
            case 1: return this.c3(2);
            case 6: return this.c3(6);
            case 7: return this.c3(7);
            case 4: return this.c3(4);
            case 5: return this.c3(5);
            case 8: return this.c3(8);
            case 9: return this.adg(b);
            default: return this.c3(1);
        }
    };
    CategoryChart.prototype.adg = function (a) {
        return this.c3(a);
    };
    CategoryChart.prototype.bc = function (a) {
        switch (this.ac9) {
            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.c1 = function (a, b) {
        var c = this.adh(this.ac9, a.suggestedSeries);
        c.uc = a.findMatchingHint(0).path;
        c.xAxis = this.xAxis;
        c.yAxis = this.yAxis;
        return c;
    };
    CategoryChart.prototype.tf = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.lh = true;
            this.yAxis.l8 = 10;
        }
    };
    CategoryChart.prototype.ti = function () {
        this.yAxis.lh = this.aeb;
        this.yAxis.l8 = this.afm;
    };
    CategoryChart.prototype.get_gq = 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, "gq", {
        get: function () {
            return this.get_gq();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.rj = function (a, b) {
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c != null) {
            c.tr = this.adb;
            c.ql = this.cr(a, b);
        }
    };
    CategoryChart.prototype.agr = function (a) {
        this.ags(function (b, c) { return a(b); });
    };
    CategoryChart.prototype.ags = 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.v3 = function () {
        return this.xAxis;
    };
    CategoryChart.prototype.v4 = function () {
        return this.yAxis;
    };
    CategoryChart.prototype.adk = function () {
        return this.c3(30);
    };
    CategoryChart.prototype.adl = function () {
        return this.c3(31);
    };
    CategoryChart.prototype.gn = function (a, b) {
        var c = _super.prototype.gn.call(this, a, b);
        if (c != null) {
            var d = new List$1(Series.$, 0);
            if (this.adq) {
                d.add(this.adk());
            }
            if (this.adr) {
                d.add(this.adl());
            }
            for (var e = 0; e < d.count; e++) {
                var f = d._inner[e];
                f.name = a + getInstanceType(f).typeName;
                c.add(f);
            }
        }
        return c;
    };
    CategoryChart.prototype.a7 = function () {
        if (this.a6 == 0) {
            return 1;
        }
        else {
            return this.a6;
        }
    };
    CategoryChart.prototype.tn = function (a, b, c) {
        _super.prototype.tn.call(this, a, b, c);
        if (this.bd.dataSeries.count > 0) {
            if (stringIsNullOrEmpty(this.lm)) {
                this.b3.setXMemberPath(a, c.getMemberPathFor(16));
            }
            if (stringIsNullOrEmpty(this.lo)) {
                this.b3.setYMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.li)) {
                this.b3.setLabelMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.lf)) {
                this.b3.setContentMemberPath(a, c.getMemberPathFor(0));
            }
        }
    };
    CategoryChart.prototype.f0 = function () {
        if (this.a9 == 4 || this.a9 == 3) {
            return true;
        }
        else if (this.a9 == 0) {
            if (this.ac9 == 2 || this.ac9 == 8) {
                return false;
            }
            else if (this.ac9 == 9 && this.bd != null && this.bd.dataSeries != null && this.bd.dataSeries.count > 0) {
                var a = this.bd.dataSeries._inner[0].suggestedSeries;
                if (a == 1 || a == 8) {
                    return false;
                }
            }
            return true;
        }
        return false;
    };
    CategoryChart.prototype.get_f6 = function () {
        return DVContainer.instance.checkLoaded("CategoryChartToolbarFactoryManager");
    };
    CategoryChart.prototype.sv = function (a, b, c) {
        var _this = this;
        _super.prototype.sv.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.th();
                break;
            case "MarkerCollisionAvoidance":
                this.agr(function (d) { return d.tr = _this.adb; });
                break;
            case "IsTransitionInEnabled":
                this.agr(function (d) { return d.so = _this.ad4; });
                break;
            case "IsSplineShapePartOfRange":
                this.agr(function (d) {
                    if (d.ej) {
                        d.mt(_this.ad3);
                    }
                });
                break;
            case "TransitionInMode":
                this.agr(function (d) { return d.r8 = _this.add; });
                break;
            case "TransitionInSpeedType":
                this.agr(function (d) { return d.cb = _this.adn; });
                break;
            case "XAxisInterval":
                this.xAxis.mq = this.ae3;
                break;
            case "XAxisMinorInterval":
                this.xAxis.mr = this.ae6;
                break;
            case "XAxisGap":
                this.xAxis.k0 = this.ae2;
                break;
            case "XAxisOverlap":
                this.xAxis.k9 = this.ae7;
                break;
            case "XAxisMinimumGapSize":
                this.xAxis.k8 = this.ae5;
                break;
            case "XAxisMaximumGap":
                this.xAxis.k7 = this.ae4;
                break;
            case "XAxisZoomMaximumCategoryRange":
                this.xAxis.zoomMaximumCategoryRange = this.ae8;
                break;
            case "XAxisZoomMaximumItemSpan":
                this.xAxis.zoomMaximumItemSpan = this.ae9;
                break;
            case "XAxisZoomToCategoryRange":
                this.xAxis.zoomToCategoryRange = this.afa;
                break;
            case "XAxisZoomToCategoryStart":
                this.xAxis.zoomToCategoryStart = this.afb;
                break;
            case "XAxisZoomToItemSpan":
                this.xAxis.zoomToItemSpan = this.afc;
                break;
            case "YAxisInterval":
                this.yAxis.l0 = this.aff;
                break;
            case "YAxisFavorLabellingScaleEnd":
                this.yAxis.lc = this.aea;
                break;
            case "YAxisAutoRangeBufferMode":
                this.yAxis.kt = this.ac7;
                break;
            case "YAxisIsLogarithmic":
                this.yAxis.lh = this.aeb;
                break;
            case "YAxisLogarithmBase":
                this.yAxis.l8 = this.afm;
                break;
            case "YAxisMinimumValue":
                this.yAxis.l4 = this.afh;
                break;
            case "YAxisMaximumValue":
                this.yAxis.l3 = this.afg;
                break;
            case "YAxisMinorInterval":
                this.yAxis.l5 = this.afi;
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.ags(function (d, e) {
                    if (d.d6) {
                        d.ms(ArrayExtension.getModulus$1(Brush.$, _this.ac2, e), ArrayExtension.getModulus$1(Brush.$, _this.ac3, e));
                    }
                });
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.abj(function (d) { return d.k9 = _this.ad8; });
                break;
            case "IsCategoryHighlightingEnabled":
            case "IsItemHighlightingEnabled":
                this.th();
                break;
            case "AutoMarginAndAngleUpdateMode":
                this.sn(function (d) { return d.tw = _this.ac5; });
                break;
            case "ShouldAutoExpandMarginForInitialLabels":
                this.sn(function (d) { return d.ur = _this.ad5; });
                break;
            case CategoryChart.af0:
                this.sn(function (d) { return d.uu = _this.ad6; });
                break;
            case "AutoExpandMarginExtraPadding":
                this.sn(function (d) { return d.vh = _this.aeu; });
                break;
            case "AutoExpandMarginMaximumValue":
                this.sn(function (d) { return d.vi = _this.aev; });
                break;
            case CategoryChart.af5:
                this.abf(function (d) { return d.b0 = _this.ad7; }, a);
                break;
            case CategoryChart.agj:
                this.abj(function (d) { return d.b0 = _this.ad9; });
                break;
        }
    };
    CategoryChart.$t = markType(CategoryChart, 'CategoryChart', XYChart.$);
    CategoryChart.af0 = "ShouldConsiderAutoRotationForInitialLabels";
    CategoryChart.af5 = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    CategoryChart.agj = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return CategoryChart;
}(XYChart));
export { CategoryChart };
