/*
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 { 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.aew = 1000;
        _this.ac1 = null;
        _this.acl = 9;
        _this.acn = 1;
        _this.ac5 = false;
        _this.ac6 = true;
        _this.acp = 0;
        _this.acz = 0;
        _this.adt = 0;
        _this.adw = 0;
        _this.ads = 0;
        _this.adv = 0;
        _this.adu = 1;
        _this.adx = 0;
        _this.ad3 = NaN;
        _this.ach = 1;
        _this.ac7 = true;
        _this.ac8 = true;
        _this.adq = DeviceUtils.g(2);
        _this.adr = DeviceUtils.g(60);
        _this.adc = true;
        _this.ac9 = true;
        _this.adb = false;
        _this.acj = 0;
        _this.add = false;
        _this.aex = 10;
        _this.ad5 = NaN;
        _this.ad4 = NaN;
        _this.ad6 = 0;
        _this.acd = null;
        _this.ace = null;
        _this.ada = true;
        _this.ady = 3;
        _this.adz = NaN;
        _this.ad0 = NaN;
        _this.ad1 = NaN;
        _this.ad2 = NaN;
        _this.ac3 = false;
        _this.ac4 = false;
        _this.adp = null;
        _this.q9();
        return _this;
    }
    CategoryChart.prototype.rr = function () {
        _super.prototype.rr.call(this);
        if (this.dataChart == null) {
            return;
        }
        var a = this.dataChart.cu.j.e();
        this.acf = a.d;
        this.acg = a.e;
        if (this.abp == null) {
            this.abp = a.k;
        }
        if (this.abw == null) {
            this.abw = a.k;
        }
        this.xo = 0;
        this.abx = AxisDefaults.h;
        this.ab0 = null;
        this.abt = AxisDefaults.g;
        this.abq = null;
        this.w7 = AxisDefaults.f;
        this.abu = AxisDefaults.j;
        this.w8 = AxisDefaults.e;
        this.fc = true;
        this.fd = true;
        this.a7 = 0;
        this.hw = Defaults.j;
        this.t1 = Defaults.ae;
        this.tw = Defaults.af;
        this.tx = Defaults.ag;
        this.adh = true;
    };
    CategoryChart.prototype.rt = function (a, b) {
        _super.prototype.rt.call(this, a, b);
        a.hp = this.aey;
        a.cg = this.ac2;
    };
    CategoryChart.prototype.se = function (a, b, c) {
        var _this = this;
        _super.prototype.se.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.rg(function (d) { return d.hp = _this.aey; });
                break;
            case "TransitionInEasingFunction":
                this.rg(function (d) { return d.cg = _this.ac2; });
                break;
        }
    };
    Object.defineProperty(CategoryChart.prototype, "aey", {
        get: function () {
            return this.aew;
        },
        set: function (a) {
            var b = this.aey;
            if (a != b) {
                this.aew = a;
                this.sd("TransitionInDuration", b, this.aey);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac2", {
        get: function () {
            return this.ac1;
        },
        set: function (a) {
            var b = this.ac2;
            if (a != b) {
                this.ac1 = a;
                this.sd("TransitionInEasingFunction", b, this.ac2);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ae4 = function () {
        var cvd_ = this.jv();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    CategoryChart.prototype.rm = function (a) {
        _super.prototype.rm.call(this, a);
        a.ds = this.e8;
        a.uq = this.adi;
        a.ut = this.adj;
        a.vg = this.ad7;
        a.vh = this.ad8;
        a.tv = this.aci;
    };
    CategoryChart.prototype.rs = function (a, b) {
        _super.prototype.rs.call(this, a, b);
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c == null) {
            return;
        }
        c.tn = this.aco;
        c.sk = this.adh;
        c.r4 = this.acq;
        c.ca = this.ac0;
        c.trendLineBrush = ArrayExtension.getModulus$1(Brush.$, this.ag, b);
        c.trendLineType = this.dj;
        c.trendLineThickness = this.iu;
        c.qh = this.cn(a, b);
        if (a.d4) {
            a.mq(ArrayExtension.getModulus$1(Brush.$, this.acf, b), ArrayExtension.getModulus$1(Brush.$, this.acg, b));
        }
    };
    CategoryChart.prototype.acr = function () {
        return new CategoryXAxis();
    };
    CategoryChart.prototype.acv = function () {
        return new NumericYAxis();
    };
    CategoryChart.prototype.q5 = function () {
        this.xAxis = this.acr();
        this.xAxis.name = "xAxis";
        var a = this.xAxis;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.af6));
        this.yAxis = this.acv();
        this.yAxis.name = "yAxis";
        var b = this.yAxis;
        b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.af7));
        if (this.xAxis.ay == null) {
            this.xAxis.ay = new AxisLabelSettings();
        }
        if (this.yAxis.ay == null) {
            this.yAxis.ay = new AxisLabelSettings();
        }
    };
    CategoryChart.prototype.aap = function (a) {
        _super.prototype.aap.call(this, a);
        a.k8 = this.adl;
        a.lb = this.adn;
        a.b0 = this.adm;
    };
    CategoryChart.prototype.aan = function (a) {
        _super.prototype.aan.call(this, a);
        a.b0 = this.adk;
        a.zoomMaximumCategoryRange = this.ael;
        a.zoomToCategoryRange = this.aen;
        a.zoomToCategoryStart = this.aeo;
        a.zoomMaximumItemSpan = this.aem;
        a.zoomToItemSpan = this.aep;
    };
    CategoryChart.prototype.get_bz = function () {
        return 0;
    };
    Object.defineProperty(CategoryChart.prototype, "bz", {
        get: function () {
            return this.get_bz();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acm", {
        get: function () {
            return this.acl;
        },
        set: function (a) {
            if (a != this.acl) {
                var b = this.acm;
                this.acl = a;
                this.sd("ChartType", enumGetBox(CategoryChartType_$type, b), enumGetBox(CategoryChartType_$type, this.acm));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aco", {
        get: function () {
            return this.acn;
        },
        set: function (a) {
            var b = this.aco;
            if (a != b) {
                this.acn = a;
                this.sd("MarkerCollisionAvoidance", enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, b), enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, this.aco));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adg", {
        get: function () {
            return this.ac5;
        },
        set: function (a) {
            var b = this.adg;
            if (a != b) {
                this.ac5 = a;
                this.sd("IsSplineShapePartOfRange", b, this.adg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adh", {
        get: function () {
            return this.ac6;
        },
        set: function (a) {
            var b = this.adh;
            if (a != b) {
                this.ac6 = a;
                this.sd("IsTransitionInEnabled", b, this.adh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acq", {
        get: function () {
            return this.acp;
        },
        set: function (a) {
            var b = this.acq;
            if (a != b) {
                this.acp = a;
                this.sd("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.acq));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac0", {
        get: function () {
            return this.acz;
        },
        set: function (a) {
            var b = this.ac0;
            if (a != b) {
                this.acz = a;
                this.sd("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.ac0));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aeg", {
        get: function () {
            return this.adt;
        },
        set: function (a) {
            var b = this.aeg;
            if (a != b) {
                this.adt = a;
                this.sd("XAxisInterval", b, this.aeg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aej", {
        get: function () {
            return this.adw;
        },
        set: function (a) {
            var b = this.aej;
            if (a != b) {
                this.adw = a;
                this.sd("XAxisMinorInterval", b, this.aej);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aef", {
        get: function () {
            return this.ads;
        },
        set: function (a) {
            var b = this.aef;
            if (a != b) {
                this.ads = a;
                this.sd("XAxisGap", b, this.aef);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aei", {
        get: function () {
            return this.adv;
        },
        set: function (a) {
            var b = this.aei;
            if (a != b) {
                this.adv = a;
                this.sd("XAxisMinimumGapSize", b, this.aei);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aeh", {
        get: function () {
            return this.adu;
        },
        set: function (a) {
            var b = this.aeh;
            if (a != b) {
                this.adu = a;
                this.sd("XAxisMaximumGap", b, this.aeh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aek", {
        get: function () {
            return this.adx;
        },
        set: function (a) {
            var b = this.aek;
            if (a != b) {
                this.adx = a;
                this.sd("XAxisOverlap", b, this.aek);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aes", {
        get: function () {
            return this.ad3;
        },
        set: function (a) {
            var b = this.aes;
            if (a != b) {
                this.ad3 = a;
                this.sd("YAxisInterval", b, this.aes);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aci", {
        get: function () {
            return this.ach;
        },
        set: function (a) {
            var b = this.aci;
            if (a != b) {
                this.ach = a;
                this.sd("AutoMarginAndAngleUpdateMode", enumGetBox(AutoMarginsAndAngleUpdateMode_$type, b), enumGetBox(AutoMarginsAndAngleUpdateMode_$type, this.aci));
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.af8 = function () {
        if (this.dataChart != null) {
            this.dataChart.w1();
        }
    };
    Object.defineProperty(CategoryChart.prototype, "adi", {
        get: function () {
            return this.ac7;
        },
        set: function (a) {
            var b = this.adi;
            if (a != b) {
                this.ac7 = a;
                this.sd("ShouldAutoExpandMarginForInitialLabels", b, this.adi);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adj", {
        get: function () {
            return this.ac8;
        },
        set: function (a) {
            var b = this.adj;
            if (a != b) {
                this.ac8 = a;
                this.sd(CategoryChart.afd, b, this.adj);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad7", {
        get: function () {
            return this.adq;
        },
        set: function (a) {
            var b = this.ad7;
            if (a != b) {
                this.adq = a;
                this.sd("AutoExpandMarginExtraPadding", b, this.ad7);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad8", {
        get: function () {
            return this.adr;
        },
        set: function (a) {
            var b = this.ad8;
            if (a != b) {
                this.adr = a;
                this.sd("AutoExpandMarginMaximumValue", b, this.ad8);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adn", {
        get: function () {
            return this.adc;
        },
        set: function (a) {
            var b = this.adn;
            if (a != b) {
                this.adc = a;
                this.sd("YAxisFavorLabellingScaleEnd", b, this.adn);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adk", {
        get: function () {
            return this.ac9;
        },
        set: function (a) {
            var b = this.adk;
            if (a != b) {
                this.ac9 = a;
                this.sd(CategoryChart.afi, b, this.adk);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adm", {
        get: function () {
            return this.adb;
        },
        set: function (a) {
            var b = this.adm;
            if (a != b) {
                this.adb = a;
                this.sd(CategoryChart.afw, b, this.adm);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ack", {
        get: function () {
            return this.acj;
        },
        set: function (a) {
            var b = this.ack;
            if (a != b) {
                this.acj = a;
                this.sd("YAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ack));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ado", {
        get: function () {
            return this.add;
        },
        set: function (a) {
            var b = this.ado;
            if (a != b) {
                this.add = a;
                this.sd("YAxisIsLogarithmic", b, this.ado);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aez", {
        get: function () {
            return this.aex;
        },
        set: function (a) {
            var b = this.aez;
            if (a != b) {
                this.aex = a;
                this.sd("YAxisLogarithmBase", b, this.aez);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aeu", {
        get: function () {
            return this.ad5;
        },
        set: function (a) {
            var b = this.aeu;
            if (a != b) {
                this.ad5 = a;
                this.sd("YAxisMinimumValue", b, this.aeu);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aet", {
        get: function () {
            return this.ad4;
        },
        set: function (a) {
            var b = this.aet;
            if (a != b) {
                this.ad4 = a;
                this.sd("YAxisMaximumValue", b, this.aet);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aev", {
        get: function () {
            return this.ad6;
        },
        set: function (a) {
            var b = this.aev;
            if (a != b) {
                this.ad6 = a;
                this.sd("YAxisMinorInterval", b, this.aev);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aee", {
        get: function () {
            return this.xAxis.mv;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aed", {
        get: function () {
            return this.xAxis.mu;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.aea = function () {
        return this.aee;
    };
    CategoryChart.prototype.aec = function () {
        return this.aer;
    };
    CategoryChart.prototype.ad9 = function () {
        return this.aed;
    };
    CategoryChart.prototype.aeb = function () {
        return this.aeq;
    };
    Object.defineProperty(CategoryChart.prototype, "aer", {
        get: function () {
            return this.yAxis.lv;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aeq", {
        get: function () {
            return this.yAxis.lu;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acf", {
        get: function () {
            return this.acd;
        },
        set: function (a) {
            var b = this.acf;
            if (a != b) {
                this.acd = a;
                this.sd("NegativeBrushes", b, this.acf);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acg", {
        get: function () {
            return this.ace;
        },
        set: function (a) {
            var b = this.acg;
            if (a != b) {
                this.ace = a;
                this.sd("NegativeOutlines", b, this.acg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adl", {
        get: function () {
            return this.ada;
        },
        set: function (a) {
            var b = this.adl;
            if (a != b) {
                this.ada = a;
                this.sd("YAxisAbbreviateLargeNumbers", b, this.adl);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ael", {
        get: function () {
            return this.ady;
        },
        set: function (a) {
            var b = this.ael;
            if (a != b) {
                this.ady = a;
                this.sd("XAxisZoomMaximumCategoryRange", b, this.ael);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aem", {
        get: function () {
            return this.adz;
        },
        set: function (a) {
            var b = this.aem;
            if (a != b) {
                this.adz = a;
                this.sd("XAxisZoomMaximumItemSpan", b, this.aem);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aen", {
        get: function () {
            return this.ad0;
        },
        set: function (a) {
            var b = this.aen;
            if (a != b) {
                this.ad0 = a;
                this.sd("XAxisZoomToCategoryRange", b, this.aen);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aeo", {
        get: function () {
            return this.ad1;
        },
        set: function (a) {
            var b = this.aeo;
            if (a != b) {
                this.ad1 = a;
                this.sd("XAxisZoomToCategoryStart", b, this.aeo);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aep", {
        get: function () {
            return this.ad2;
        },
        set: function (a) {
            var b = this.aep;
            if (a != b) {
                this.ad2 = a;
                this.sd("XAxisZoomToItemSpan", b, this.aep);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ade", {
        get: function () {
            return this.ac3;
        },
        set: function (a) {
            var b = this.ade;
            if (a != b) {
                this.ac3 = a;
                this.sd("IsCategoryHighlightingEnabled", b, this.ade);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adf", {
        get: function () {
            return this.ac4;
        },
        set: function (a) {
            var b = this.adf;
            if (a != b) {
                this.ac4 = a;
                this.sd("IsItemHighlightingEnabled", b, this.adf);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.get_gf = 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, "gf", {
        get: function () {
            return this.get_gf();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.gj = function () {
        if (this.adp == null) {
            this.adp = CategoryChartMockDataGenerator.a();
        }
        return this.adp;
    };
    CategoryChart.prototype.cm = function (a) {
        if (a != null) {
            var b = _super.prototype.cm.call(this, a);
            if (b == 2) {
                if (a.d3 && this.fn) {
                    return 13;
                }
            }
        }
        return _super.prototype.cm.call(this, a);
    };
    CategoryChart.prototype.get_f3 = function () {
        return this.xAxis != null && this.xAxis.categoryMode != 0;
    };
    CategoryChart.prototype.af6 = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimum":
                this.sl("XAxisActualMinimum");
                break;
            case "ActualMaximum":
                this.sl("XAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.af7 = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimumValue":
                this.sl("YAxisActualMinimum");
                break;
            case "ActualMaximumValue":
                this.sl("YAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.sx = function () {
        _super.prototype.sx.call(this);
        this.xAxis.fz = this.xy == null ? XYChart.ya(this.xAxis, this.bb.dataSeries) : this.xy;
        this.xAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        if (this.adi) {
            this.r5(function (a) { return a.w1(); });
        }
    };
    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.acu = function (a, b) {
        switch (a) {
            case 2: return this.cx(1);
            case 3: return this.cx(10);
            case 0: return this.cx(0);
            case 1: return this.cx(2);
            case 6: return this.cx(6);
            case 7: return this.cx(7);
            case 4: return this.cx(4);
            case 5: return this.cx(5);
            case 8: return this.cx(8);
            case 9: return this.act(b);
            default: return this.cx(1);
        }
    };
    CategoryChart.prototype.act = function (a) {
        return this.cx(a);
    };
    CategoryChart.prototype.ba = function (a) {
        switch (this.acm) {
            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.cw = function (a, b) {
        var c = this.acu(this.acm, a.suggestedSeries);
        c.t5 = a.findMatchingHint(0).path;
        c.xAxis = this.xAxis;
        c.yAxis = this.yAxis;
        return c;
    };
    CategoryChart.prototype.sv = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.lg = true;
            this.yAxis.l7 = 10;
        }
    };
    CategoryChart.prototype.sy = function () {
        this.yAxis.lg = this.ado;
        this.yAxis.l7 = this.aez;
    };
    CategoryChart.prototype.get_ge = 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, "ge", {
        get: function () {
            return this.get_ge();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.q1 = function (a, b) {
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c != null) {
            c.tn = this.aco;
            c.qh = this.cn(a, b);
        }
    };
    CategoryChart.prototype.af4 = function (a) {
        this.af5(function (b, c) { return a(b); });
    };
    CategoryChart.prototype.af5 = 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.vg = function () {
        return this.xAxis;
    };
    CategoryChart.prototype.vh = function () {
        return this.yAxis;
    };
    CategoryChart.prototype.acx = function () {
        return this.cx(30);
    };
    CategoryChart.prototype.acy = function () {
        return this.cx(31);
    };
    CategoryChart.prototype.gb = function (a, b) {
        var c = _super.prototype.gb.call(this, a, b);
        if (c != null) {
            var d = new List$1(Series.$, 0);
            if (this.ac3) {
                d.add(this.acx());
            }
            if (this.ac4) {
                d.add(this.acy());
            }
            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.a5 = function () {
        if (this.a4 == 0) {
            return 1;
        }
        else {
            return this.a4;
        }
    };
    CategoryChart.prototype.s2 = function (a, b, c) {
        _super.prototype.s2.call(this, a, b, c);
        if (this.bb.dataSeries.count > 0) {
            if (stringIsNullOrEmpty(this.k7)) {
                this.b1.setXMemberPath(a, c.getMemberPathFor(16));
            }
            if (stringIsNullOrEmpty(this.k9)) {
                this.b1.setYMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.k3)) {
                this.b1.setLabelMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.k0)) {
                this.b1.setContentMemberPath(a, c.getMemberPathFor(0));
            }
        }
    };
    CategoryChart.prototype.fq = function () {
        if (this.a7 == 4 || this.a7 == 3) {
            return true;
        }
        else if (this.a7 == 0) {
            if (this.acm == 2 || this.acm == 8) {
                return false;
            }
            else if (this.acm == 9 && this.bb != null && this.bb.dataSeries != null && this.bb.dataSeries.count > 0) {
                var a = this.bb.dataSeries._inner[0].suggestedSeries;
                if (a == 1 || a == 8) {
                    return false;
                }
            }
            return true;
        }
        return false;
    };
    CategoryChart.prototype.sd = function (a, b, c) {
        var _this = this;
        _super.prototype.sd.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.sx();
                break;
            case "MarkerCollisionAvoidance":
                this.af4(function (d) { return d.tn = _this.aco; });
                break;
            case "IsTransitionInEnabled":
                this.af4(function (d) { return d.sk = _this.adh; });
                break;
            case "IsSplineShapePartOfRange":
                this.af4(function (d) {
                    if (d.eh) {
                        d.mr(_this.adg);
                    }
                });
                break;
            case "TransitionInMode":
                this.af4(function (d) { return d.r4 = _this.acq; });
                break;
            case "TransitionInSpeedType":
                this.af4(function (d) { return d.ca = _this.ac0; });
                break;
            case "XAxisInterval":
                this.xAxis.mq = this.aeg;
                break;
            case "XAxisMinorInterval":
                this.xAxis.mr = this.aej;
                break;
            case "XAxisGap":
                this.xAxis.k0 = this.aef;
                break;
            case "XAxisOverlap":
                this.xAxis.k9 = this.aek;
                break;
            case "XAxisMinimumGapSize":
                this.xAxis.k8 = this.aei;
                break;
            case "XAxisMaximumGap":
                this.xAxis.k7 = this.aeh;
                break;
            case "XAxisZoomMaximumCategoryRange":
                this.xAxis.zoomMaximumCategoryRange = this.ael;
                break;
            case "XAxisZoomMaximumItemSpan":
                this.xAxis.zoomMaximumItemSpan = this.aem;
                break;
            case "XAxisZoomToCategoryRange":
                this.xAxis.zoomToCategoryRange = this.aen;
                break;
            case "XAxisZoomToCategoryStart":
                this.xAxis.zoomToCategoryStart = this.aeo;
                break;
            case "XAxisZoomToItemSpan":
                this.xAxis.zoomToItemSpan = this.aep;
                break;
            case "YAxisInterval":
                this.yAxis.lz = this.aes;
                break;
            case "YAxisFavorLabellingScaleEnd":
                this.yAxis.lb = this.adn;
                break;
            case "YAxisAutoRangeBufferMode":
                this.yAxis.ks = this.ack;
                break;
            case "YAxisIsLogarithmic":
                this.yAxis.lg = this.ado;
                break;
            case "YAxisLogarithmBase":
                this.yAxis.l7 = this.aez;
                break;
            case "YAxisMinimumValue":
                this.yAxis.l3 = this.aeu;
                break;
            case "YAxisMaximumValue":
                this.yAxis.l2 = this.aet;
                break;
            case "YAxisMinorInterval":
                this.yAxis.l4 = this.aev;
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.af5(function (d, e) {
                    if (d.d4) {
                        d.mq(ArrayExtension.getModulus$1(Brush.$, _this.acf, e), ArrayExtension.getModulus$1(Brush.$, _this.acg, e));
                    }
                });
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.aaw(function (d) { return d.k8 = _this.adl; });
                break;
            case "IsCategoryHighlightingEnabled":
            case "IsItemHighlightingEnabled":
                this.sx();
                break;
            case "AutoMarginAndAngleUpdateMode":
                this.r5(function (d) { return d.tv = _this.aci; });
                break;
            case "ShouldAutoExpandMarginForInitialLabels":
                this.r5(function (d) { return d.uq = _this.adi; });
                break;
            case CategoryChart.afd:
                this.r5(function (d) { return d.ut = _this.adj; });
                break;
            case "AutoExpandMarginExtraPadding":
                this.r5(function (d) { return d.vg = _this.ad7; });
                break;
            case "AutoExpandMarginMaximumValue":
                this.r5(function (d) { return d.vh = _this.ad8; });
                break;
            case CategoryChart.afi:
                this.aas(function (d) { return d.b0 = _this.adk; }, a);
                break;
            case CategoryChart.afw:
                this.aaw(function (d) { return d.b0 = _this.adm; });
                break;
        }
    };
    CategoryChart.$t = markType(CategoryChart, 'CategoryChart', XYChart.$);
    CategoryChart.afd = "ShouldConsiderAutoRotationForInitialLabels";
    CategoryChart.afi = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    CategoryChart.afw = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return CategoryChart;
}(XYChart));
export { CategoryChart };
