/*
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 * as tslib_1 from "tslib";
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { ReactRenderer, ReactWrapper } from "igniteui-react-core";
import { TypeRegistrar } from "igniteui-react-core";
import { CategoryChart } from './CategoryChart';
import { CategoryChartType_$type } from './CategoryChartType';
import { CategorySeriesMarkerCollisionAvoidance_$type } from './CategorySeriesMarkerCollisionAvoidance';
import { CategoryTransitionInMode_$type } from './CategoryTransitionInMode';
import { TransitionInSpeedType_$type } from './TransitionInSpeedType';
import { fromBrushCollection, toBrushCollection, ensureEnum, ensureBool, NamePatcher } from "igniteui-react-core";
import { IgrXYChart } from './igr-xy-chart';
import { DataChartStylingDefaults } from './DataChartStylingDefaults';
import { DataSeriesType } from "igniteui-react-core";
import { IgrDataContext } from "igniteui-react-core";
import { IgrCategoryXAxis } from './igr-category-x-axis';
import { IgrNumericYAxis } from './igr-numeric-y-axis';
export var IgxCategoryChartComponent_PROVIDERS = [];
/**
 * Represents a chart with an ordinal X-axis and a numeric Y-axis.
*
* **Ignite UI for React Category Chart** - [Documentation](https://www.infragistics.com/products/ignite-ui-react/react/components/CategoryChart.html)
*
* The Ignite UI Category Chart is a lightweight, highly performant chart. It can be easily configured to display category data using an extremely simple and intuitive API. All you need to do is provide your data to the chart and it will take care of everything else.
*
* Example:
*
* ```ts
* <IgrCategoryChart
* 	dataSource={this.state.data} />
* ```
*/
var IgrCategoryChart = /** @class */ /*@__PURE__*/ (function (_super) {
    tslib_1.__extends(IgrCategoryChart, _super);
    function IgrCategoryChart(props) {
        var _this = _super.call(this, props) || this;
        _this._dataSource = null;
        _this._defaultTooltips = null;
        _this._uniqueTooltipId = 0;
        if (_this._styling) {
            NamePatcher.ensureStylablePatched(Object.getPrototypeOf(_this));
        }
        _this._getMainRef = _this._getMainRef.bind(_this);
        _this._tooltipRef = _this._tooltipRef.bind(_this);
        _this._activeTooltipElements = new Map();
        _this._activeTooltips = new Map();
        _this._currentTooltips = [];
        if (document) {
            _this._container = document.createElement("div");
            _this._container.style.display = "block";
            _this._container.style.width = "100%";
            _this._container.style.height = "100%";
        }
        var root;
        root = _this._container;
        if (_this._container != null) {
            root = _this._container;
        }
        var ren = new ReactRenderer(root, document, true, DataChartStylingDefaults);
        _this._wrapper = ren;
        var chart = _this.i;
        _this._chart = chart;
        if (chart.xAxis) {
            var x = new IgrCategoryXAxis(null);
            x._provideRenderer(ren);
            x._implementation = chart.xAxis;
            chart.xAxis.externalObject = x;
        }
        if (chart.yAxis) {
            var y = new IgrNumericYAxis(null);
            y._provideRenderer(ren);
            y._implementation = chart.yAxis;
            chart.yAxis.externalObject = y;
        }
        chart.provideContainer(ren);
        _this.bindData();
        chart.notifyResized();
        ren.addSizeWatcher(function () {
            _this._chart.notifyResized();
        });
        _this._initialized = true;
        return _this;
    }
    Object.defineProperty(IgrCategoryChart.prototype, "height", {
        get: function () {
            return this._height;
        },
        set: function (value) {
            this._height = value;
            if (this._elRef) {
                this._elRef.style.height = value;
                this._chart.notifyResized();
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "width", {
        get: function () {
            return this._width;
        },
        set: function (value) {
            this._width = value;
            if (this._elRef) {
                this._elRef.style.width = value;
                this._chart.notifyResized();
            }
        },
        enumerable: true,
        configurable: true
    });
    IgrCategoryChart.prototype._tooltipRef = function (t) {
        //console.log(t);
        if (t === null) {
            return;
        }
        if (t.currentOwner &&
            t.currentOwner.tooltipTemplate) {
            t.template = t.currentOwner.tooltipTemplate;
        }
        this._activeTooltips.set(t.currentOwner, t);
    };
    IgrCategoryChart.prototype._getMainRef = function (ref) {
        this._elRef = ref;
    };
    IgrCategoryChart.prototype.render = function () {
        // if (!this._childrenDiffer(this.props.children)) {
        // 	let div = React.createElement("div", {
        // 		ref: (ref) => {
        // 			this._elRef = ref;
        // 		},
        // 		children: this.props.children
        // 	});
        // 	return div;
        // } else {
        var children = [];
        if (this._currentTooltips && this._currentTooltips.length > 0) {
            for (var i = 0; i < this._currentTooltips.length; i++) {
                var t = this._currentTooltips[i];
                if (this._activeTooltipElements.has(t)) {
                    children.push(this._activeTooltipElements.get(t));
                }
                else {
                    if (!TypeRegistrar.isRegistered("IgrTooltipContainer")) {
                        continue;
                    }
                    var Tooltip = TypeRegistrar.get("IgrTooltipContainer");
                    var tEle = React.createElement(Tooltip, {
                        ref: this._tooltipRef,
                        key: this._currentTooltips[i].key,
                        owner: this._currentTooltips[i]
                    });
                    var portal = ReactDOM.createPortal(tEle, t, this._currentTooltips[i].key);
                    this._activeTooltipElements.set(t, portal);
                    children.push(portal);
                }
            }
        }
        var div = React.createElement("div", {
            className: "ig-category-chart igr-category-chart",
            ref: this._getMainRef,
            children: children
        });
        return div;
        //}
    };
    IgrCategoryChart.prototype.componentDidMount = function () {
        _super.prototype.componentDidMount.call(this);
        this._elRef.style.width = this._width ? this._width : "";
        this._elRef.style.height = this._height ? this._height : "";
        this._elRef.appendChild(this._container);
        this._chart.notifyResized();
        this.initializeContent();
    };
    IgrCategoryChart.prototype.componentWillUnmount = function () {
        this._chart.destroy();
        this._wrapper.destroy();
    };
    IgrCategoryChart.prototype.createImplementation = function () {
        return new CategoryChart();
    };
    Object.defineProperty(IgrCategoryChart.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgrCategoryChart.prototype.createSeriesComponent = function (type) {
        if (TypeRegistrar.isRegistered(type)) {
            var s = TypeRegistrar.create(type);
            s.owner = this;
            s._provideRenderer(this._wrapper);
            return s;
        }
        else {
            //we shouldn't get here, hopefully.
            throw Error("series type not loaded: " + type);
        }
    };
    IgrCategoryChart.prototype.createSeries = function (type) {
        switch (type) {
            case DataSeriesType.Area:
                return this.createSeriesComponent('IgrAreaSeries');
            case DataSeriesType.Column:
                return this.createSeriesComponent('IgrColumnSeries');
            case DataSeriesType.Line:
                return this.createSeriesComponent('IgrLineSeries');
            case DataSeriesType.Point:
                return this.createSeriesComponent('IgrPointSeries');
            case DataSeriesType.Spline:
                return this.createSeriesComponent('IgrSplineSeries');
            case DataSeriesType.SplineArea:
                return this.createSeriesComponent('IgrSplineAreaSeries');
            case DataSeriesType.StepArea:
                return this.createSeriesComponent('IgrStepAreaSeries');
            case DataSeriesType.StepLine:
                return this.createSeriesComponent('IgrStepLineSeries');
            case DataSeriesType.Waterfall:
                return this.createSeriesComponent('IgrWaterfallSeries');
            case DataSeriesType.ItemToolTipLayer:
                return this.createSeriesComponent('IgrItemToolTipLayer');
            case DataSeriesType.CategoryToolTipLayer:
                return this.createSeriesComponent('IgrCategoryToolTipLayer');
            case DataSeriesType.CrosshairLayer:
                return this.createSeriesComponent('IgrCrosshairLayer');
            case DataSeriesType.FinalValueLayer:
                return this.createSeriesComponent('IgrFinalValueLayer');
            case DataSeriesType.CalloutLayer:
                return this.createSeriesComponent('IgrCalloutLayer');
            case DataSeriesType.CategoryHighlightLayer:
                return this.createSeriesComponent('IgrCategoryHighlightLayer');
            case DataSeriesType.CategoryItemHighlightLayer:
                return this.createSeriesComponent('IgrCategoryItemHighlightLayer');
            default:
                return this.createSeriesComponent('IgrColumnSeries');
        }
    };
    Object.defineProperty(IgrCategoryChart.prototype, "dataSource", {
        get: function () {
            return this._dataSource;
        },
        set: function (value) {
            this._dataSource = value;
            this.bindData();
        },
        enumerable: true,
        configurable: true
    });
    IgrCategoryChart.prototype.bindData = function () {
        if (this._chart != null && this._chart !== undefined) {
            this._chart.itemsSource = this._dataSource;
        }
    };
    IgrCategoryChart.prototype.initializeContent = function () {
        if (TypeRegistrar.isRegistered("IgrDataChartDefaultTooltips")) {
            var d = TypeRegistrar.create("IgrDataChartDefaultTooltips");
            this._defaultTooltips = d;
            this._onDefaultTooltipsReady(d);
            //this._container.appendChild(cr.location.nativeElement);
        }
        // supports angular themes or custom properties set in CSS 
        this._styling(this._elRef, this);
        this._chart.notifyResized();
    };
    IgrCategoryChart.prototype.createTooltip = function () {
        // if (!TypeRegistrar.isRegistered("IgrTooltipContainer")) {
        // 	return null;
        // }
        // let Tooltip = TypeRegistrar.get("IgrTooltipContainer");
        var wrapper = this._wrapper.createElement("div");
        var ele = wrapper.getNativeElement();
        ele.key = "__tooltip_" + this._uniqueTooltipId;
        this._uniqueTooltipId++;
        this._currentTooltips = this._currentTooltips.slice(0);
        this._currentTooltips.push(ele);
        //let element = React.createElement(Tooltip,  );
        //let portal = ReactDOM.createPortal(element, ele);
        var self = this;
        ele.updateToolTip = function (c, isSubContent) {
            if (c.externalObject) {
                c = c.externalObject;
            }
            else {
                var ext = new IgrDataContext();
                ext._implementation = c;
                c = ext;
            }
            if (!isSubContent) {
                if (ele.parentElement != self._container) {
                    if (ele.parentElement != null) {
                        ele.parentElement.removeChild(ele);
                    }
                    self._container.appendChild(ele);
                }
            }
            else {
                c.isSubContent = true;
            }
            if (self._activeTooltips.has(ele)) {
                var t = self._activeTooltips.get(ele);
                if (t.template === null &&
                    ele.tooltipTemplate !== null) {
                    t.template = ele.tooltipTemplate;
                }
                t.dataContext = c;
            }
            ele.style.display = "block";
            return true;
        };
        ele.hideToolTip = function () {
            ele.style.display = "none";
        };
        ele.style.display = "none";
        this._updateTooltipState();
        return ele;
    };
    IgrCategoryChart.prototype._ensureTooltipCreated = function (series) {
        var _this = this;
        series._ensureTooltipCreated(function () { return _this.createTooltip(); }, function (ele) {
            var wrapper = new ReactWrapper(ele, _this._wrapper);
            wrapper.updateToolTip = ele.updateToolTip;
            wrapper.hideToolTip = ele.hideToolTip;
            if (_this._activeTooltips.has(ele)) {
                var tCont = _this._activeTooltips.get(ele);
                tCont.template = ele.tooltipTemplate;
            }
            return wrapper;
        });
    };
    IgrCategoryChart.prototype._createXAxis = function () {
        var x = new IgrCategoryXAxis(null);
        x._provideRenderer(this._wrapper);
        return x.i;
    };
    IgrCategoryChart.prototype._createYAxis = function () {
        var y = new IgrNumericYAxis(null);
        y.provideRenderer(this._wrapper);
        return y.i;
    };
    IgrCategoryChart.prototype._ensureDefaultTooltip = function (series) {
        if (this._defaultTooltips == null) {
            return;
        }
        this._defaultTooltips["ensureDefaultTooltip"](series);
    };
    IgrCategoryChart.prototype._onDefaultTooltipsReady = function (cr) {
        if (this.i.dataChart) {
            var currSeries = this.i.dataChart.series;
            for (var i = 0; i < currSeries.count; i++) {
                if (currSeries.item(i).externalObject.showDefaultTooltip) {
                    this._ensureDefaultTooltip(currSeries.item(i).externalObject);
                }
            }
        }
    };
    IgrCategoryChart.prototype._updateTooltipState = function () {
        if (this._initialized) {
            this.setState({ tooltips: this._currentTooltips });
        }
    };
    Object.defineProperty(IgrCategoryChart.prototype, "transitionInDuration", {
        /**
     * Gets or sets the duration used for animating series plots when the chart is loading into view
    *
    * `transitionInDuration` controls the length of time taken by the transition-in animation.  Try setting it to 2 seconds:
    *
    * ```ts
    * <IgrCategoryChart
    * 	dataSource={this.state.data}
    * 	transitionInDuration={2000} />
    * ```
    */
        get: function () {
            return this.i.rv;
        },
        set: function (v) {
            this.i.rv = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "transitionInEasingFunction", {
        /**
         * Gets or sets the easing function used for animating series plots when the chart is loading into view
         * This can be set to one of the known values "linear" or "cubic," or it can be set to an easing function which takes a single numeric parameter and returns a number.
        */
        get: function () {
            return this.i.qu;
        },
        set: function (v) {
            this.i.qu = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "chartType", {
        /**
         * Gets or sets the type of chart series to generate from the data.
        *
        * The `chartType` property determines the type of data series to display.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	chartType="stepArea" />
        * ```
        */
        get: function () {
            return this.i.qe;
        },
        set: function (v) {
            this.i.qe = ensureEnum(CategoryChartType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "markerCollisionAvoidance", {
        /**
         * Gets or sets the behavior for markers in each series which are placed too close together for the current view, resulting in a collision.
        *
        * `markerCollisionAvoidance` controls the technique the chart uses to avoid overlapping markers.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	 markerCollisionAvoidance="none" />
        * ```
        */
        get: function () {
            return this.i.qg;
        },
        set: function (v) {
            this.i.qg = ensureEnum(CategorySeriesMarkerCollisionAvoidance_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "isTransitionInEnabled", {
        /**
         * Gets or sets whether animation of series plots is enabled when the chart is loading into view
        *
        * Set `isTransitionInEnabled` to true if you want your chart series to animate into position when the chart is loading into view.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	 isTransitionInEnabled ="true" />
        * ```
        */
        get: function () {
            return this.i.q2;
        },
        set: function (v) {
            this.i.q2 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "transitionInMode", {
        /**
         * Gets or sets the method that determines how to animate series plots when the chart is loading into view
        *
        * `transitionInMode` controls the direction of the transition-in animation.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	CategoryTransitionInMode="accordionfromRight" />
        * ```
        */
        get: function () {
            return this.i.qi;
        },
        set: function (v) {
            this.i.qi = ensureEnum(CategoryTransitionInMode_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "transitionInSpeedType", {
        /**
         * Gets or sets the arrival speed used for animating series plots when the chart is loading into view
        *
        * `transitionInSpeedType` controls the speed of the transition-in animation.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	 transitionInSpeedType="indexScaled" >
        * </IgrCategoryChart>
        * ```
        */
        get: function () {
            return this.i.qs;
        },
        set: function (v) {
            this.i.qs = ensureEnum(TransitionInSpeedType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "xAxisInterval", {
        /**
         * Gets or sets the frequency of displayed labels along the X-axis.
         * Gets or sets the set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label.
        *
        * `xAxisInterval` determines how often to show a label, tickmark, and/or gridline along the x-axis.  Set this property to _n_ to display a label every _nth_ item.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	xAxisInterval={3} />
        * ```
        */
        get: function () {
            return this.i.rk;
        },
        set: function (v) {
            this.i.rk = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "xAxisMinorInterval", {
        /**
         * Gets or sets the frequency of displayed minor lines along the X-axis.
         * Gets or sets the set value is a factor that determines how the minor lines will be displayed.
        *
        * `xAxisMinorInterval` determines how often to show a minor gridline along the x-axis.  This property is relevant only when the displayed series is a type with grouping, like column series.
        *
        * `xAxisMinorInterval` is expressed as a number between 0 and 1, representing the frequency of the interval.  To display minor gridlines representing 10ths of an item width, set `xAxisMinorInterval` to 0.1.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	xAxisMinorInterval={0.1}
        *     xAxisMinorStroke="green"
        *     xAxisMinorStrokeThickness={1} />
        * ```
        */
        get: function () {
            return this.i.rl;
        },
        set: function (v) {
            this.i.rl = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "xAxisGap", {
        /**
         * Gets or sets the amount of space between adjacent categories for the X-axis.
         * The gap is silently clamped to the range [0, 1] when used.
        *
        * Use the `xAxisGap` property to configure the spacing between items on the x-axis.  This property is relevant only when the displayed series is a type with item spacing, like column series.
        *
        * An `xAxisGap` of 0 allocates no space between items.  An `xAxisGap` of 1 allocates a space between items equal to the width of one item.
        *
        * To set the item spacing to 75% the width of one item, set the `xAxisGap` to 0.75, as in this code:
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	 xAxisGap={0.75} />
        * ```
        */
        get: function () {
            return this.i.rj;
        },
        set: function (v) {
            this.i.rj = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "xAxisOverlap", {
        /**
         * Gets or sets the amount of overlap between adjacent categories for the X-axis.
         * Gets or sets the overlap is silently clamped to the range [-1, 1] when used.
        *
        * Use the `xAxisOverlap` property to configure the spacing between items on the x-axis.  This property is relevant only when the displayed series is a type with item spacing, like column series.
        *
        * An `xAxisOverlap` of 0 places grouped items adjacent to each other.  An `xAxisOverlap` of 1 places grouped items in the same axis space, completely overlapping.  An `xAxisOverlap` of -1 places a space between grouped items equal to the width of one item.
        *
        * To place grouped items with 75% overlap, set the `xAxisOverlap` to 0.75, as in this code:
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	xAxisOverlap={0} />
        * ```
        */
        get: function () {
            return this.i.rm;
        },
        set: function (v) {
            this.i.rm = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "yAxisInterval", {
        /**
         * Gets or sets the distance between each label and grid line along the Y-axis.
        *
        * `yAxisInterval` determines how often to show a label, tickmark, and/or gridline along the y-axis.  Set this property to a number less than the numeric range of the y-axis.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	yAxisInterval={10} />
        * ```
        */
        get: function () {
            return this.i.rp;
        },
        set: function (v) {
            this.i.rp = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "yAxisIsLogarithmic", {
        /**
         * Gets or sets whether the Y-axis should use a logarithmic scale instead of a linear one.
         * Since log(-1) is imaginary and log(0) is undefined, it is recommended to enable this property only when the Y-axis minimum is greater than zero.
        *
        * Set `yAxisIsLogarithmic` to true if you want the y-axis to be a logarithmic scale.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	yAxisIsLogarithmic="true" />
        * ```
        */
        get: function () {
            return this.i.q4;
        },
        set: function (v) {
            this.i.q4 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "yAxisLogarithmBase", {
        /**
         * Gets or sets the base value to use in the log function when mapping the position of data items along the Y-axis.
         * This property is effective only when YAxisIsLogarithmic is true.
        *
        * When `yAxisIsLogarithmic` is true, `yAxisLogarithmBase` sets the logarithm base of the y-axis scale.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	yAxisIsLogarithmic="true"
        *     yAxisLogarithmBase={2} />
        * ```
        */
        get: function () {
            return this.i.rw;
        },
        set: function (v) {
            this.i.rw = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "yAxisMinimumValue", {
        /**
         * Gets or sets the data value corresponding to the minimum value of the Y-axis.
        *
        * `yAxisMaximumValue` determines the minimum of the y-axis.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	yAxisMinimumValue={42} />
        * ```
        */
        get: function () {
            return this.i.rr;
        },
        set: function (v) {
            this.i.rr = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "yAxisMaximumValue", {
        /**
         * Gets or sets the data value corresponding to the maximum value of the Y-axis.
        *
        * `yAxisMaximumValue` determines the maximum of the y-axis.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	yAxisMaximumValue={150} />
        * ```
        */
        get: function () {
            return this.i.rq;
        },
        set: function (v) {
            this.i.rq = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "yAxisMinorInterval", {
        /**
         * Gets or sets the frequency of displayed minor lines along the Y-axis.
        *
        * `yAxisMinorInterval` determines how often to show a minor gridline along the y-axis.  Set this property to a number less than the y-axis interval.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	yAxisMinorInterval={2}
        *     yAxisMinorStroke="green"
        *     yAxisMinorStrokeThickness={1} >
        * </IgrCategoryChart>
        * ```
        */
        get: function () {
            return this.i.rs;
        },
        set: function (v) {
            this.i.rs = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "xAxisActualMinimum", {
        /**
         * Gets the current minimum value for the X-axis.
        */
        get: function () {
            return this.i.ri;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "xAxisActualMaximum", {
        /**
         * Gets the current maximum value for the X-axis.
        */
        get: function () {
            return this.i.rh;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "yAxisActualMinimum", {
        /**
         * Gets the current minimum value for the Y-axis.
        */
        get: function () {
            return this.i.ro;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "yAxisActualMaximum", {
        /**
         * Gets the current maximum value for the Y-axis.
        */
        get: function () {
            return this.i.rn;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "negativeBrushes", {
        /**
         * Gets or sets the palette used for coloring negative items of Waterfall chart type.
        *
        * `negativeBrushes` controls the brushes used by the chart for negative data, when the `chartType` is one that supports negative brushes.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	negativeBrushes="#ff0000, #cc0000, #aa0000" />
        * ```
        */
        get: function () {
            return fromBrushCollection(this.i.qb);
        },
        set: function (v) {
            this.i.qb = toBrushCollection(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "negativeOutlines", {
        /**
         * Brushes to use for drawing negative elements, when using a chart type with contextual coloring, such as Waterfall.
        *
        * `negativeOutlines` controls the outlines used by the chart for negative data, when the `chartType` is one that supports negative brushes.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	negativeOutlines="#0000ff, #0000cc, #0000aa" />
        * ```
        */
        get: function () {
            return fromBrushCollection(this.i.qc);
        },
        set: function (v) {
            this.i.qc = toBrushCollection(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "yAxisAbbreviateLargeNumbers", {
        /**
         * Gets or sets whether the large numbers on the Y-axis labels are abbreviated.
        *
        * To abbreviate on the y-axis using formats like "1K" or "1M," set `yAxisAbbreviateLargeNumbers` to true.
        *
        * ```ts
        * <IgrCategoryChart
        * 	dataSource={this.state.data}
        * 	yAxisAbbreviateLargeNumbers="true" >
        * </IgrCategoryChart>
        * ```
        */
        get: function () {
            return this.i.q3;
        },
        set: function (v) {
            this.i.q3 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "isCategoryHighlightingEnabled", {
        /**
         * Gets or sets whether the category should be highlighted when hovered
        */
        get: function () {
            return this.i.q0;
        },
        set: function (v) {
            this.i.q0 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrCategoryChart.prototype, "isItemHighlightingEnabled", {
        /**
         * Gets or sets whether the item should be highlighted when hovered
        */
        get: function () {
            return this.i.q1;
        },
        set: function (v) {
            this.i.q1 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    /**
 * Export serialized visual data.

*/
    IgrCategoryChart.prototype.exportSerializedVisualData = function () {
        var iv = this.i.ry();
        return (iv);
    };
    IgrCategoryChart.prototype.getCurrentXAxisActualMinimum = function () {
        var iv = this.i.re();
        return (iv);
    };
    IgrCategoryChart.prototype.getCurrentYAxisActualMinimum = function () {
        var iv = this.i.rg();
        return (iv);
    };
    IgrCategoryChart.prototype.getCurrentXAxisActualMaximum = function () {
        var iv = this.i.rd();
        return (iv);
    };
    IgrCategoryChart.prototype.getCurrentYAxisActualMaximum = function () {
        var iv = this.i.rf();
        return (iv);
    };
    return IgrCategoryChart;
}(IgrXYChart));
export { IgrCategoryChart };
//# sourceMappingURL=igr-category-chart.js.map
