/*
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.afk = 1000;
        _this.adp = null;
        _this.ac9 = 9;
        _this.adb = 1;
        _this.adt = false;
        _this.adu = true;
        _this.add = 0;
        _this.adn = 0;
        _this.aeh = 0;
        _this.aek = 0;
        _this.aeg = 0;
        _this.aej = 0;
        _this.aei = 1;
        _this.ael = 0;
        _this.aer = NaN;
        _this.ac5 = 1;
        _this.adv = true;
        _this.adw = true;
        _this.aee = DeviceUtils.g(2);
        _this.aef = DeviceUtils.g(60);
        _this.ad0 = true;
        _this.adx = true;
        _this.adz = false;
        _this.ac7 = 0;
        _this.ad1 = false;
        _this.afl = 10;
        _this.aet = NaN;
        _this.aes = NaN;
        _this.aeu = 0;
        _this.ac1 = null;
        _this.ac2 = null;
        _this.ady = true;
        _this.aem = 3;
        _this.aen = NaN;
        _this.aeo = NaN;
        _this.aep = NaN;
        _this.aeq = NaN;
        _this.adr = false;
        _this.ads = false;
        _this.aed = 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.ac3 = a.d;
        this.ac4 = a.e;
        if (this.acd == null) {
            this.acd = a.k;
        }
        if (this.ack == null) {
            this.ack = a.k;
        }
        this.yc = 0;
        this.acl = AxisDefaults.h;
        this.aco = null;
        this.ach = AxisDefaults.g;
        this.ace = null;
        this.xv = AxisDefaults.f;
        this.aci = AxisDefaults.j;
        this.xw = AxisDefaults.e;
        this.fm = true;
        this.fn = true;
        this.a9 = 0;
        this.h9 = Defaults.j;
        this.up = Defaults.ae;
        this.uk = Defaults.af;
        this.ul = Defaults.ag;
        this.ad5 = true;
    };
    CategoryChart.prototype.sb = function (a, b) {
        _super.prototype.sb.call(this, a, b);
        a.hs = this.afm;
        a.ch = this.adq;
    };
    CategoryChart.prototype.sz = function (a, b, c) {
        var _this = this;
        _super.prototype.sz.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.ry(function (d) { return d.hs = _this.afm; });
                break;
            case "TransitionInEasingFunction":
                this.ry(function (d) { return d.ch = _this.adq; });
                break;
        }
    };
    Object.defineProperty(CategoryChart.prototype, "afm", {
        get: function () {
            return this.afk;
        },
        set: function (a) {
            var b = this.afm;
            if (a != b) {
                this.afk = a;
                this.sw("TransitionInDuration", b, this.afm);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adq", {
        get: function () {
            return this.adp;
        },
        set: function (a) {
            var b = this.adq;
            if (a != b) {
                this.adp = a;
                this.sw("TransitionInEasingFunction", b, this.adq);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.afs = function () {
        var cvd_ = this.j9();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    CategoryChart.prototype.r4 = function (a) {
        _super.prototype.r4.call(this, a);
        a.dt = this.fh;
        a.u0 = this.ad6;
        a.u3 = this.ad7;
        a.vq = this.aev;
        a.vr = this.aew;
        a.t5 = this.ac6;
    };
    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.adc;
        c.so = this.ad5;
        c.r8 = this.ade;
        c.cb = this.ado;
        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.ac3, b), ArrayExtension.getModulus$1(Brush.$, this.ac4, b));
        }
    };
    CategoryChart.prototype.adf = function () {
        return new CategoryXAxis();
    };
    CategoryChart.prototype.adj = function () {
        return new NumericYAxis();
    };
    CategoryChart.prototype.rn = function () {
        this.xAxis = this.adf();
        this.xAxis.name = "xAxis";
        var a = this.xAxis;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.agu));
        this.yAxis = this.adj();
        this.yAxis.name = "yAxis";
        var b = this.yAxis;
        b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.agv));
        if (this.xAxis.az == null) {
            this.xAxis.az = new AxisLabelSettings();
        }
        if (this.yAxis.az == null) {
            this.yAxis.az = new AxisLabelSettings();
        }
    };
    CategoryChart.prototype.abd = function (a) {
        _super.prototype.abd.call(this, a);
        a.la = this.ad9;
        a.ld = this.aeb;
        a.b1 = this.aea;
    };
    CategoryChart.prototype.abb = function (a) {
        _super.prototype.abb.call(this, a);
        a.b1 = this.ad8;
        a.zoomMaximumCategoryRange = this.ae9;
        a.zoomToCategoryRange = this.afb;
        a.zoomToCategoryStart = this.afc;
        a.zoomMaximumItemSpan = this.afa;
        a.zoomToItemSpan = this.afd;
    };
    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, "ada", {
        get: function () {
            return this.ac9;
        },
        set: function (a) {
            if (a != this.ac9) {
                var b = this.ada;
                this.ac9 = a;
                this.sw("ChartType", enumGetBox(CategoryChartType_$type, b), enumGetBox(CategoryChartType_$type, this.ada));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "adc", {
        get: function () {
            return this.adb;
        },
        set: function (a) {
            var b = this.adc;
            if (a != b) {
                this.adb = a;
                this.sw("MarkerCollisionAvoidance", enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, b), enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, this.adc));
            }
        },
        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.sw("IsSplineShapePartOfRange", b, this.ad4);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ad5", {
        get: function () {
            return this.adu;
        },
        set: function (a) {
            var b = this.ad5;
            if (a != b) {
                this.adu = a;
                this.sw("IsTransitionInEnabled", b, this.ad5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ade", {
        get: function () {
            return this.add;
        },
        set: function (a) {
            var b = this.ade;
            if (a != b) {
                this.add = a;
                this.sw("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.ade));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ado", {
        get: function () {
            return this.adn;
        },
        set: function (a) {
            var b = this.ado;
            if (a != b) {
                this.adn = a;
                this.sw("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.ado));
            }
        },
        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.sw("XAxisInterval", 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.sw("XAxisMinorInterval", b, this.ae7);
            }
        },
        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.sw("XAxisGap", 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.sw("XAxisMinimumGapSize", b, this.ae6);
            }
        },
        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.sw("XAxisMaximumGap", b, this.ae5);
            }
        },
        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.sw("XAxisOverlap", b, this.ae8);
            }
        },
        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.sw("YAxisInterval", b, this.afg);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac6", {
        get: function () {
            return this.ac5;
        },
        set: function (a) {
            var b = this.ac6;
            if (a != b) {
                this.ac5 = a;
                this.sw("AutoMarginAndAngleUpdateMode", enumGetBox(AutoMarginsAndAngleUpdateMode_$type, b), enumGetBox(AutoMarginsAndAngleUpdateMode_$type, this.ac6));
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.agw = function () {
        if (this.dataChart != null) {
            this.dataChart.xb();
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ad6", {
        get: function () {
            return this.adv;
        },
        set: function (a) {
            var b = this.ad6;
            if (a != b) {
                this.adv = a;
                this.sw("ShouldAutoExpandMarginForInitialLabels", b, this.ad6);
            }
        },
        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.sw(CategoryChart.af1, b, this.ad7);
            }
        },
        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.sw("AutoExpandMarginExtraPadding", b, this.aev);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aew", {
        get: function () {
            return this.aef;
        },
        set: function (a) {
            var b = this.aew;
            if (a != b) {
                this.aef = a;
                this.sw("AutoExpandMarginMaximumValue", b, this.aew);
            }
        },
        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.sw("YAxisFavorLabellingScaleEnd", b, this.aeb);
            }
        },
        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.sw(CategoryChart.af6, b, this.ad8);
            }
        },
        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.sw(CategoryChart.agk, b, this.aea);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac8", {
        get: function () {
            return this.ac7;
        },
        set: function (a) {
            var b = this.ac8;
            if (a != b) {
                this.ac7 = a;
                this.sw("YAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.ac8));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aec", {
        get: function () {
            return this.ad1;
        },
        set: function (a) {
            var b = this.aec;
            if (a != b) {
                this.ad1 = a;
                this.sw("YAxisIsLogarithmic", b, this.aec);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afn", {
        get: function () {
            return this.afl;
        },
        set: function (a) {
            var b = this.afn;
            if (a != b) {
                this.afl = a;
                this.sw("YAxisLogarithmBase", b, this.afn);
            }
        },
        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.sw("YAxisMinimumValue", b, this.afi);
            }
        },
        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.sw("YAxisMaximumValue", b, this.afh);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afj", {
        get: function () {
            return this.aeu;
        },
        set: function (a) {
            var b = this.afj;
            if (a != b) {
                this.aeu = a;
                this.sw("YAxisMinorInterval", b, this.afj);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae2", {
        get: function () {
            return this.xAxis.mw;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ae1", {
        get: function () {
            return this.xAxis.mv;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.aey = function () {
        return this.ae2;
    };
    CategoryChart.prototype.ae0 = function () {
        return this.aff;
    };
    CategoryChart.prototype.aex = function () {
        return this.ae1;
    };
    CategoryChart.prototype.aez = function () {
        return this.afe;
    };
    Object.defineProperty(CategoryChart.prototype, "aff", {
        get: function () {
            return this.yAxis.lx;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afe", {
        get: function () {
            return this.yAxis.lw;
        },
        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.sw("NegativeBrushes", b, this.ac3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac4", {
        get: function () {
            return this.ac2;
        },
        set: function (a) {
            var b = this.ac4;
            if (a != b) {
                this.ac2 = a;
                this.sw("NegativeOutlines", b, this.ac4);
            }
        },
        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.sw("YAxisAbbreviateLargeNumbers", b, this.ad9);
            }
        },
        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.sw("XAxisZoomMaximumCategoryRange", 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.sw("XAxisZoomMaximumItemSpan", 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.sw("XAxisZoomToCategoryRange", 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.sw("XAxisZoomToCategoryStart", b, this.afc);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "afd", {
        get: function () {
            return this.aeq;
        },
        set: function (a) {
            var b = this.afd;
            if (a != b) {
                this.aeq = a;
                this.sw("XAxisZoomToItemSpan", b, this.afd);
            }
        },
        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.sw("IsCategoryHighlightingEnabled", b, this.ad2);
            }
        },
        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.sw("IsItemHighlightingEnabled", b, this.ad3);
            }
        },
        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.aed == null) {
            this.aed = CategoryChartMockDataGenerator.a();
        }
        return this.aed;
    };
    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.agu = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimum":
                this.s6("XAxisActualMinimum");
                break;
            case "ActualMaximum":
                this.s6("XAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.agv = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimumValue":
                this.s6("YAxisActualMinimum");
                break;
            case "ActualMaximumValue":
                this.s6("YAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.ti = function () {
        _super.prototype.ti.call(this);
        this.xAxis.f0 = this.ym == null ? XYChart.yy(this.xAxis, this.bd.dataSeries) : this.ym;
        this.xAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        if (this.ad6) {
            this.so(function (a) { return a.xb(); });
        }
    };
    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.adi = 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.adh(b);
            default: return this.c3(1);
        }
    };
    CategoryChart.prototype.adh = function (a) {
        return this.c3(a);
    };
    CategoryChart.prototype.bc = function (a) {
        switch (this.ada) {
            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.adi(this.ada, a.suggestedSeries);
        c.uc = a.findMatchingHint(0).path;
        c.xAxis = this.xAxis;
        c.yAxis = this.yAxis;
        return c;
    };
    CategoryChart.prototype.tg = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.li = true;
            this.yAxis.l9 = 10;
        }
    };
    CategoryChart.prototype.tj = function () {
        this.yAxis.li = this.aec;
        this.yAxis.l9 = this.afn;
    };
    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.adc;
            c.ql = this.cr(a, b);
        }
    };
    CategoryChart.prototype.ags = function (a) {
        this.agt(function (b, c) { return a(b); });
    };
    CategoryChart.prototype.agt = 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.v4 = function () {
        return this.xAxis;
    };
    CategoryChart.prototype.v5 = function () {
        return this.yAxis;
    };
    CategoryChart.prototype.adl = function () {
        return this.c3(30);
    };
    CategoryChart.prototype.adm = 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.adr) {
                d.add(this.adl());
            }
            if (this.ads) {
                d.add(this.adm());
            }
            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.to = function (a, b, c) {
        _super.prototype.to.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.ada == 2 || this.ada == 8) {
                return false;
            }
            else if (this.ada == 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.sw = function (a, b, c) {
        var _this = this;
        _super.prototype.sw.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.ti();
                break;
            case "MarkerCollisionAvoidance":
                this.ags(function (d) { return d.tr = _this.adc; });
                break;
            case "IsTransitionInEnabled":
                this.ags(function (d) { return d.so = _this.ad5; });
                break;
            case "IsSplineShapePartOfRange":
                this.ags(function (d) {
                    if (d.ej) {
                        d.mt(_this.ad4);
                    }
                });
                break;
            case "TransitionInMode":
                this.ags(function (d) { return d.r8 = _this.ade; });
                break;
            case "TransitionInSpeedType":
                this.ags(function (d) { return d.cb = _this.ado; });
                break;
            case "XAxisInterval":
                this.xAxis.mr = this.ae4;
                break;
            case "XAxisMinorInterval":
                this.xAxis.ms = this.ae7;
                break;
            case "XAxisGap":
                this.xAxis.k1 = this.ae3;
                break;
            case "XAxisOverlap":
                this.xAxis.la = this.ae8;
                break;
            case "XAxisMinimumGapSize":
                this.xAxis.k9 = this.ae6;
                break;
            case "XAxisMaximumGap":
                this.xAxis.k8 = this.ae5;
                break;
            case "XAxisZoomMaximumCategoryRange":
                this.xAxis.zoomMaximumCategoryRange = this.ae9;
                break;
            case "XAxisZoomMaximumItemSpan":
                this.xAxis.zoomMaximumItemSpan = this.afa;
                break;
            case "XAxisZoomToCategoryRange":
                this.xAxis.zoomToCategoryRange = this.afb;
                break;
            case "XAxisZoomToCategoryStart":
                this.xAxis.zoomToCategoryStart = this.afc;
                break;
            case "XAxisZoomToItemSpan":
                this.xAxis.zoomToItemSpan = this.afd;
                break;
            case "YAxisInterval":
                this.yAxis.l1 = this.afg;
                break;
            case "YAxisFavorLabellingScaleEnd":
                this.yAxis.ld = this.aeb;
                break;
            case "YAxisAutoRangeBufferMode":
                this.yAxis.ku = this.ac8;
                break;
            case "YAxisIsLogarithmic":
                this.yAxis.li = this.aec;
                break;
            case "YAxisLogarithmBase":
                this.yAxis.l9 = this.afn;
                break;
            case "YAxisMinimumValue":
                this.yAxis.l5 = this.afi;
                break;
            case "YAxisMaximumValue":
                this.yAxis.l4 = this.afh;
                break;
            case "YAxisMinorInterval":
                this.yAxis.l6 = this.afj;
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.agt(function (d, e) {
                    if (d.d6) {
                        d.ms(ArrayExtension.getModulus$1(Brush.$, _this.ac3, e), ArrayExtension.getModulus$1(Brush.$, _this.ac4, e));
                    }
                });
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.abk(function (d) { return d.la = _this.ad9; });
                break;
            case "IsCategoryHighlightingEnabled":
            case "IsItemHighlightingEnabled":
                this.ti();
                break;
            case "AutoMarginAndAngleUpdateMode":
                this.so(function (d) { return d.t5 = _this.ac6; });
                break;
            case "ShouldAutoExpandMarginForInitialLabels":
                this.so(function (d) { return d.u0 = _this.ad6; });
                break;
            case CategoryChart.af1:
                this.so(function (d) { return d.u3 = _this.ad7; });
                break;
            case "AutoExpandMarginExtraPadding":
                this.so(function (d) { return d.vq = _this.aev; });
                break;
            case "AutoExpandMarginMaximumValue":
                this.so(function (d) { return d.vr = _this.aew; });
                break;
            case CategoryChart.af6:
                this.abg(function (d) { return d.b1 = _this.ad8; }, a);
                break;
            case CategoryChart.agk:
                this.abk(function (d) { return d.b1 = _this.aea; });
                break;
        }
    };
    CategoryChart.$t = markType(CategoryChart, 'CategoryChart', XYChart.$);
    CategoryChart.af1 = "ShouldConsiderAutoRotationForInitialLabels";
    CategoryChart.af6 = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    CategoryChart.agk = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return CategoryChart;
}(XYChart));
export { CategoryChart };
