/*
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.ac2 = 1000;
        _this.abh = null;
        _this.aa1 = 9;
        _this.aa3 = 1;
        _this.abl = false;
        _this.abm = false;
        _this.aa5 = 0;
        _this.abf = 0;
        _this.ab9 = 0;
        _this.acc = 0;
        _this.ab8 = 0;
        _this.acb = 0;
        _this.aca = 1;
        _this.acd = 0;
        _this.ace = NaN;
        _this.aax = 0;
        _this.abn = true;
        _this.abo = false;
        _this.ab6 = DeviceUtils.g(2);
        _this.ab7 = DeviceUtils.g(60);
        _this.abs = true;
        _this.abp = true;
        _this.abr = false;
        _this.aaz = 0;
        _this.abt = false;
        _this.ac3 = 10;
        _this.acg = NaN;
        _this.acf = NaN;
        _this.ach = 0;
        _this.aat = null;
        _this.aau = null;
        _this.abq = true;
        _this.abj = false;
        _this.abk = false;
        _this.ab5 = null;
        _this.pp();
        return _this;
    }
    CategoryChart.prototype.p7 = function () {
        _super.prototype.p7.call(this);
        if (this.dataChart == null) {
            return;
        }
        var a = this.dataChart.cq.j.e();
        this.aav = a.d;
        this.aaw = a.e;
        if (this.z5 == null) {
            this.z5 = a.k;
        }
        if (this.aac == null) {
            this.aac = a.k;
        }
        this.v4 = 0;
        this.aad = AxisDefaults.h;
        this.aag = null;
        this.z9 = AxisDefaults.g;
        this.z6 = null;
        this.vn = AxisDefaults.f;
        this.aaa = AxisDefaults.j;
        this.vo = AxisDefaults.e;
        this.el = true;
        this.em = false;
        this.aq = 0;
        this.g3 = Defaults.j;
        this.sh = Defaults.ae;
        this.sc = Defaults.af;
        this.sd = Defaults.ag;
    };
    CategoryChart.prototype.p9 = function (a, b) {
        _super.prototype.p9.call(this, a, b);
        a.hn = this.ac4;
        a.cg = this.abi;
    };
    CategoryChart.prototype.qu = function (a, b, c) {
        var _this = this;
        _super.prototype.qu.call(this, a, b, c);
        switch (a) {
            case "TransitionInDuration":
                this.pw(function (d) { return d.hn = _this.ac4; });
                break;
            case "TransitionInEasingFunction":
                this.pw(function (d) { return d.cg = _this.abi; });
                break;
        }
    };
    Object.defineProperty(CategoryChart.prototype, "ac4", {
        get: function () {
            return this.ac2;
        },
        set: function (a) {
            var b = this.ac4;
            if (a != b) {
                this.ac2 = a;
                this.qt("TransitionInDuration", b, this.ac4);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "abi", {
        get: function () {
            return this.abh;
        },
        set: function (a) {
            var b = this.abi;
            if (a != b) {
                this.abh = a;
                this.qt("TransitionInEasingFunction", b, this.abi);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ada = function () {
        var cvd_ = this.iv();
        cvd_.scaleByViewport();
        return (cvd_.serialize());
    };
    CategoryChart.prototype.p2 = function (a) {
        _super.prototype.p2.call(this, a);
        a.dn = this.eh;
        a.tw = this.aby;
        a.tz = this.abz;
        a.um = this.aci;
        a.un = this.acj;
        a.s1 = this.aay;
    };
    CategoryChart.prototype.p8 = function (a, b) {
        _super.prototype.p8.call(this, a, b);
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c == null) {
            return;
        }
        c.ti = this.aa4;
        c.sf = this.abx;
        c.rz = this.aa6;
        c.ca = this.abg;
        c.trendLineBrush = ArrayExtension.getModulus$1(Brush.$, this.ag, b);
        c.trendLineType = this.c2;
        c.trendLineThickness = this.hz;
        c.qc = this.b6(a, b);
        if (a.d3) {
            a.mm(ArrayExtension.getModulus$1(Brush.$, this.aav, b), ArrayExtension.getModulus$1(Brush.$, this.aaw, b));
        }
    };
    CategoryChart.prototype.aa7 = function () {
        return new CategoryXAxis();
    };
    CategoryChart.prototype.abb = function () {
        return new NumericYAxis();
    };
    CategoryChart.prototype.pl = function () {
        this.xAxis = this.aa7();
        this.xAxis.name = "xAxis";
        var a = this.xAxis;
        a.propertyChanged = delegateCombine(a.propertyChanged, runOn(this, this.ad7));
        this.yAxis = this.abb();
        this.yAxis.name = "yAxis";
        var b = this.yAxis;
        b.propertyChanged = delegateCombine(b.propertyChanged, runOn(this, this.ad8));
        if (this.xAxis.ay == null) {
            this.xAxis.ay = new AxisLabelSettings();
        }
        if (this.yAxis.ay == null) {
            this.yAxis.ay = new AxisLabelSettings();
        }
    };
    CategoryChart.prototype.y5 = function (a) {
        _super.prototype.y5.call(this, a);
        a.k8 = this.ab1;
        a.lb = this.ab3;
        a.b0 = this.ab2;
    };
    CategoryChart.prototype.y3 = function (a) {
        _super.prototype.y3.call(this, a);
        a.b0 = this.ab0;
    };
    CategoryChart.prototype.get_bi = function () {
        return 0;
    };
    Object.defineProperty(CategoryChart.prototype, "bi", {
        get: function () {
            return this.get_bi();
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aa2", {
        get: function () {
            return this.aa1;
        },
        set: function (a) {
            if (a != this.aa1) {
                var b = this.aa2;
                this.aa1 = a;
                this.qt("ChartType", enumGetBox(CategoryChartType_$type, b), enumGetBox(CategoryChartType_$type, this.aa2));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aa4", {
        get: function () {
            return this.aa3;
        },
        set: function (a) {
            var b = this.aa4;
            if (a != b) {
                this.aa3 = a;
                this.qt("MarkerCollisionAvoidance", enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, b), enumGetBox(CategorySeriesMarkerCollisionAvoidance_$type, this.aa4));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "abw", {
        get: function () {
            return this.abl;
        },
        set: function (a) {
            var b = this.abw;
            if (a != b) {
                this.abl = a;
                this.qt("IsSplineShapePartOfRange", b, this.abw);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "abx", {
        get: function () {
            return this.abm;
        },
        set: function (a) {
            var b = this.abx;
            if (a != b) {
                this.abm = a;
                this.qt("IsTransitionInEnabled", b, this.abx);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aa6", {
        get: function () {
            return this.aa5;
        },
        set: function (a) {
            var b = this.aa6;
            if (a != b) {
                this.aa5 = a;
                this.qt("TransitionInMode", enumGetBox(CategoryTransitionInMode_$type, b), enumGetBox(CategoryTransitionInMode_$type, this.aa6));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "abg", {
        get: function () {
            return this.abf;
        },
        set: function (a) {
            var b = this.abg;
            if (a != b) {
                this.abf = a;
                this.qt("TransitionInSpeedType", enumGetBox(TransitionInSpeedType_$type, b), enumGetBox(TransitionInSpeedType_$type, this.abg));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acr", {
        get: function () {
            return this.ab9;
        },
        set: function (a) {
            var b = this.acr;
            if (a != b) {
                this.ab9 = a;
                this.qt("XAxisInterval", b, this.acr);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acu", {
        get: function () {
            return this.acc;
        },
        set: function (a) {
            var b = this.acu;
            if (a != b) {
                this.acc = a;
                this.qt("XAxisMinorInterval", b, this.acu);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acq", {
        get: function () {
            return this.ab8;
        },
        set: function (a) {
            var b = this.acq;
            if (a != b) {
                this.ab8 = a;
                this.qt("XAxisGap", b, this.acq);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "act", {
        get: function () {
            return this.acb;
        },
        set: function (a) {
            var b = this.act;
            if (a != b) {
                this.acb = a;
                this.qt("XAxisMinimumGapSize", b, this.act);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acs", {
        get: function () {
            return this.aca;
        },
        set: function (a) {
            var b = this.acs;
            if (a != b) {
                this.aca = a;
                this.qt("XAxisMaximumGap", b, this.acs);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acv", {
        get: function () {
            return this.acd;
        },
        set: function (a) {
            var b = this.acv;
            if (a != b) {
                this.acd = a;
                this.qt("XAxisOverlap", b, this.acv);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acy", {
        get: function () {
            return this.ace;
        },
        set: function (a) {
            var b = this.acy;
            if (a != b) {
                this.ace = a;
                this.qt("YAxisInterval", b, this.acy);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aay", {
        get: function () {
            return this.aax;
        },
        set: function (a) {
            var b = this.aay;
            if (a != b) {
                this.aax = a;
                this.qt("AutoMarginAndAngleUpdateMode", enumGetBox(AutoMarginsAndAngleUpdateMode_$type, b), enumGetBox(AutoMarginsAndAngleUpdateMode_$type, this.aay));
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.ad9 = function () {
        if (this.dataChart != null) {
            this.dataChart.v7();
        }
    };
    Object.defineProperty(CategoryChart.prototype, "aby", {
        get: function () {
            return this.abn;
        },
        set: function (a) {
            var b = this.aby;
            if (a != b) {
                this.abn = a;
                this.qt("ShouldAutoExpandMarginForInitialLabels", b, this.aby);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "abz", {
        get: function () {
            return this.abo;
        },
        set: function (a) {
            var b = this.abz;
            if (a != b) {
                this.abo = a;
                this.qt(CategoryChart.adj, b, this.abz);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aci", {
        get: function () {
            return this.ab6;
        },
        set: function (a) {
            var b = this.aci;
            if (a != b) {
                this.ab6 = a;
                this.qt("AutoExpandMarginExtraPadding", b, this.aci);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acj", {
        get: function () {
            return this.ab7;
        },
        set: function (a) {
            var b = this.acj;
            if (a != b) {
                this.ab7 = a;
                this.qt("AutoExpandMarginMaximumValue", b, this.acj);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ab3", {
        get: function () {
            return this.abs;
        },
        set: function (a) {
            var b = this.ab3;
            if (a != b) {
                this.abs = a;
                this.qt("YAxisFavorLabellingScaleEnd", b, this.ab3);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ab0", {
        get: function () {
            return this.abp;
        },
        set: function (a) {
            var b = this.ab0;
            if (a != b) {
                this.abp = a;
                this.qt(CategoryChart.ado, b, this.ab0);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ab2", {
        get: function () {
            return this.abr;
        },
        set: function (a) {
            var b = this.ab2;
            if (a != b) {
                this.abr = a;
                this.qt(CategoryChart.adx, b, this.ab2);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aa0", {
        get: function () {
            return this.aaz;
        },
        set: function (a) {
            var b = this.aa0;
            if (a != b) {
                this.aaz = a;
                this.qt("YAxisAutoRangeBufferMode", enumGetBox(AxisRangeBufferMode_$type, b), enumGetBox(AxisRangeBufferMode_$type, this.aa0));
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ab4", {
        get: function () {
            return this.abt;
        },
        set: function (a) {
            var b = this.ab4;
            if (a != b) {
                this.abt = a;
                this.qt("YAxisIsLogarithmic", b, this.ab4);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac5", {
        get: function () {
            return this.ac3;
        },
        set: function (a) {
            var b = this.ac5;
            if (a != b) {
                this.ac3 = a;
                this.qt("YAxisLogarithmBase", b, this.ac5);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac0", {
        get: function () {
            return this.acg;
        },
        set: function (a) {
            var b = this.ac0;
            if (a != b) {
                this.acg = a;
                this.qt("YAxisMinimumValue", b, this.ac0);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acz", {
        get: function () {
            return this.acf;
        },
        set: function (a) {
            var b = this.acz;
            if (a != b) {
                this.acf = a;
                this.qt("YAxisMaximumValue", b, this.acz);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ac1", {
        get: function () {
            return this.ach;
        },
        set: function (a) {
            var b = this.ac1;
            if (a != b) {
                this.ach = a;
                this.qt("YAxisMinorInterval", b, this.ac1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acp", {
        get: function () {
            return this.xAxis.mv;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aco", {
        get: function () {
            return this.xAxis.mu;
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.acl = function () {
        return this.acp;
    };
    CategoryChart.prototype.acn = function () {
        return this.acx;
    };
    CategoryChart.prototype.ack = function () {
        return this.aco;
    };
    CategoryChart.prototype.acm = function () {
        return this.acw;
    };
    Object.defineProperty(CategoryChart.prototype, "acx", {
        get: function () {
            return this.yAxis.lv;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "acw", {
        get: function () {
            return this.yAxis.lu;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aav", {
        get: function () {
            return this.aat;
        },
        set: function (a) {
            var b = this.aav;
            if (a != b) {
                this.aat = a;
                this.qt("NegativeBrushes", b, this.aav);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "aaw", {
        get: function () {
            return this.aau;
        },
        set: function (a) {
            var b = this.aaw;
            if (a != b) {
                this.aau = a;
                this.qt("NegativeOutlines", b, this.aaw);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "ab1", {
        get: function () {
            return this.abq;
        },
        set: function (a) {
            var b = this.ab1;
            if (a != b) {
                this.abq = a;
                this.qt("YAxisAbbreviateLargeNumbers", b, this.ab1);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "abu", {
        get: function () {
            return this.abj;
        },
        set: function (a) {
            var b = this.abu;
            if (a != b) {
                this.abj = a;
                this.qt("IsCategoryHighlightingEnabled", b, this.abu);
            }
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(CategoryChart.prototype, "abv", {
        get: function () {
            return this.abk;
        },
        set: function (a) {
            var b = this.abv;
            if (a != b) {
                this.abk = a;
                this.qt("IsItemHighlightingEnabled", b, this.abv);
            }
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.get_fl = 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, "fl", {
        get: function () {
            return this.get_fl();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.fu = function () {
        if (this.ab5 == null) {
            this.ab5 = CategoryChartMockDataGenerator.a();
        }
        return this.ab5;
    };
    CategoryChart.prototype.ad7 = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimum":
                this.q1("XAxisActualMinimum");
                break;
            case "ActualMaximum":
                this.q1("XAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.ad8 = function (a, b) {
        switch (b.propertyName) {
            case "ActualMinimumValue":
                this.q1("YAxisActualMinimum");
                break;
            case "ActualMaximumValue":
                this.q1("YAxisActualMaximum");
                break;
        }
    };
    CategoryChart.prototype.rd = function () {
        _super.prototype.rd.call(this);
        this.xAxis.fz = this.we == null ? XYChart.wq(this.xAxis, this.au.dataSeries) : this.we;
        this.xAxis.itemsSource = this.dataChart != null && this.dataChart.series.count > 0 ? this.dataChart.series._inner[0].itemsSource : null;
        if (this.aby) {
            this.ql(function (a) { return a.v7(); });
        }
    };
    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.aba = function (a, b) {
        switch (a) {
            case 2: return this.cg(1);
            case 3: return this.cg(10);
            case 0: return this.cg(0);
            case 1: return this.cg(2);
            case 6: return this.cg(6);
            case 7: return this.cg(7);
            case 4: return this.cg(4);
            case 5: return this.cg(5);
            case 8: return this.cg(8);
            case 9: return this.aa9(b);
            default: return this.cg(1);
        }
    };
    CategoryChart.prototype.aa9 = function (a) {
        return this.cg(a);
    };
    CategoryChart.prototype.at = function (a) {
        switch (this.aa2) {
            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.cf = function (a, b) {
        var c = this.aba(this.aa2, a.suggestedSeries);
        c.t0 = a.findMatchingHint(0).path;
        c.xAxis = this.xAxis;
        c.yAxis = this.yAxis;
        return c;
    };
    CategoryChart.prototype.rb = function (a) {
        if (a.suggestedSecondaryAxis == 2) {
            this.yAxis.lg = true;
            this.yAxis.l7 = 10;
        }
    };
    CategoryChart.prototype.re = function () {
        this.yAxis.lg = this.ab4;
        this.yAxis.l7 = this.ac5;
    };
    CategoryChart.prototype.get_fk = 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, "fk", {
        get: function () {
            return this.get_fk();
        },
        enumerable: false,
        configurable: true
    });
    CategoryChart.prototype.pi = function (a, b) {
        var c = typeCast(HorizontalAnchoredCategorySeries.$, a);
        if (c != null) {
            c.ti = this.aa4;
            c.qc = this.b6(a, b);
        }
    };
    CategoryChart.prototype.ad5 = function (a) {
        this.ad6(function (b, c) { return a(b); });
    };
    CategoryChart.prototype.ad6 = 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.tw = function () {
        return this.xAxis;
    };
    CategoryChart.prototype.tx = function () {
        return this.yAxis;
    };
    CategoryChart.prototype.abd = function () {
        return this.cg(30);
    };
    CategoryChart.prototype.abe = function () {
        return this.cg(31);
    };
    CategoryChart.prototype.fh = function (a, b) {
        var c = _super.prototype.fh.call(this, a, b);
        if (c != null) {
            var d = new List$1(Series.$, 0);
            if (this.abj) {
                d.add(this.abd());
            }
            if (this.abk) {
                d.add(this.abe());
            }
            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.ri = function (a, b, c) {
        _super.prototype.ri.call(this, a, b, c);
        if (this.au.dataSeries.count > 0) {
            if (stringIsNullOrEmpty(this.j1)) {
                this.bk.setXMemberPath(a, c.getMemberPathFor(16));
            }
            if (stringIsNullOrEmpty(this.j3)) {
                this.bk.setYMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.jx)) {
                this.bk.setLabelMemberPath(a, c.getMemberPathFor(0));
            }
            if (stringIsNullOrEmpty(this.ju)) {
                this.bk.setContentMemberPath(a, c.getMemberPathFor(0));
            }
        }
    };
    CategoryChart.prototype.ey = function () {
        if (this.aq == 4 || this.aq == 3) {
            return true;
        }
        else if (this.aq == 0) {
            if (this.aa2 == 2 || this.aa2 == 8) {
                return false;
            }
            else if (this.aa2 == 9 && this.au != null && this.au.dataSeries != null && this.au.dataSeries.count > 0) {
                var a = this.au.dataSeries._inner[0].suggestedSeries;
                if (a == 1 || a == 8) {
                    return false;
                }
            }
            return true;
        }
        return false;
    };
    CategoryChart.prototype.qt = function (a, b, c) {
        var _this = this;
        _super.prototype.qt.call(this, a, b, c);
        switch (a) {
            case "ChartType":
                this.rd();
                break;
            case "MarkerCollisionAvoidance":
                this.ad5(function (d) { return d.ti = _this.aa4; });
                break;
            case "IsTransitionInEnabled":
                this.ad5(function (d) { return d.sf = _this.abx; });
                break;
            case "IsSplineShapePartOfRange":
                this.ad5(function (d) {
                    if (d.eg) {
                        d.mn(_this.abw);
                    }
                });
                break;
            case "TransitionInMode":
                this.ad5(function (d) { return d.rz = _this.aa6; });
                break;
            case "TransitionInSpeedType":
                this.ad5(function (d) { return d.ca = _this.abg; });
                break;
            case "XAxisInterval":
                this.xAxis.mq = this.acr;
                break;
            case "XAxisMinorInterval":
                this.xAxis.mr = this.acu;
                break;
            case "XAxisGap":
                this.xAxis.k0 = this.acq;
                break;
            case "XAxisOverlap":
                this.xAxis.k9 = this.acv;
                break;
            case "XAxisMinimumGapSize":
                this.xAxis.k8 = this.act;
                break;
            case "XAxisMaximumGap":
                this.xAxis.k7 = this.acs;
                break;
            case "YAxisInterval":
                this.yAxis.lz = this.acy;
                break;
            case "YAxisFavorLabellingScaleEnd":
                this.yAxis.lb = this.ab3;
                break;
            case "YAxisAutoRangeBufferMode":
                this.yAxis.ks = this.aa0;
                break;
            case "YAxisIsLogarithmic":
                this.yAxis.lg = this.ab4;
                break;
            case "YAxisLogarithmBase":
                this.yAxis.l7 = this.ac5;
                break;
            case "YAxisMinimumValue":
                this.yAxis.l3 = this.ac0;
                break;
            case "YAxisMaximumValue":
                this.yAxis.l2 = this.acz;
                break;
            case "YAxisMinorInterval":
                this.yAxis.l4 = this.ac1;
                break;
            case "NegativeBrushes":
            case "NegativeOutlines":
                this.ad6(function (d, e) {
                    if (d.d3) {
                        d.mm(ArrayExtension.getModulus$1(Brush.$, _this.aav, e), ArrayExtension.getModulus$1(Brush.$, _this.aaw, e));
                    }
                });
                break;
            case "YAxisAbbreviateLargeNumbers":
                this.zc(function (d) { return d.k8 = _this.ab1; });
                break;
            case "IsCategoryHighlightingEnabled":
            case "IsItemHighlightingEnabled":
                this.rd();
                break;
            case "AutoMarginAndAngleUpdateMode":
                this.ql(function (d) { return d.s1 = _this.aay; });
                break;
            case "ShouldAutoExpandMarginForInitialLabels":
                this.ql(function (d) { return d.tw = _this.aby; });
                break;
            case CategoryChart.adj:
                this.ql(function (d) { return d.tz = _this.abz; });
                break;
            case "AutoExpandMarginExtraPadding":
                this.ql(function (d) { return d.um = _this.aci; });
                break;
            case "AutoExpandMarginMaximumValue":
                this.ql(function (d) { return d.un = _this.acj; });
                break;
            case CategoryChart.ado:
                this.y8(function (d) { return d.b0 = _this.ab0; }, a);
                break;
            case CategoryChart.adx:
                this.zc(function (d) { return d.b0 = _this.ab2; });
                break;
        }
    };
    CategoryChart.$t = markType(CategoryChart, 'CategoryChart', XYChart.$);
    CategoryChart.adj = "ShouldConsiderAutoRotationForInitialLabels";
    CategoryChart.ado = "XAxisEnhancedIntervalPreferMoreCategoryLabels";
    CategoryChart.adx = "YAxisEnhancedIntervalPreferMoreCategoryLabels";
    return CategoryChart;
}(XYChart));
export { CategoryChart };
