/*
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 { IgrNumericXAxis } from './igr-numeric-x-axis';
import { IgrNumericYAxis } from './igr-numeric-y-axis';
import { IgrMarkerSeries } from './igr-marker-series';
import { brushToString, stringToBrush, toPoint, fromRect, ensureEnum } from "igniteui-react-core/ES5/componentUtil";
import { TrendLineType_$type } from "igniteui-react-core/ES5/TrendLineType";
import { CollisionAvoidanceType_$type } from './CollisionAvoidanceType';
/**
 * Represents the base class for all IgxDataChartComponent scatter series
*/
var IgrScatterBase = /** @class */ (function (_super) {
    tslib_1.__extends(IgrScatterBase, _super);
    function IgrScatterBase(props) {
        return _super.call(this, props) || this;
    }
    Object.defineProperty(IgrScatterBase.prototype, "xAxisName", {
        get: function () {
            return this._xAxisName;
        },
        set: function (value) {
            this._xAxisName = value;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "yAxisName", {
        get: function () {
            return this._yAxisName;
        },
        set: function (value) {
            this._yAxisName = value;
        },
        enumerable: true,
        configurable: true
    });
    IgrScatterBase.prototype.bindAxes = function (axes) {
        for (var i = 0; i < axes.length; i++) {
            if (axes[i].name == this.xAxisName) {
                this.xAxis = axes[i];
            }
            if (axes[i].name == this.yAxisName) {
                this.yAxis = axes[i];
            }
        }
    };
    Object.defineProperty(IgrScatterBase.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "isScatter", {
        /**
     * Checks if this series is a scatter series
    */
        get: function () {
            return this.i.c4;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "xAxis", {
        /**
         * Gets or sets the effective x-axis for the current object.
        */
        get: function () {
            if (this.i.xAxis == null) {
                return null;
            }
            if (!this.i.xAxis.externalObject) {
                var e = new IgrNumericXAxis(null);
                e._implementation = this.i.xAxis;
                this.i.xAxis.externalObject = e;
            }
            return this.i.xAxis.externalObject;
        },
        set: function (v) {
            v == null ? this.i.xAxis = null : this.i.xAxis = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "yAxis", {
        /**
         * Gets or sets the effective y-axis for the current object.
        */
        get: function () {
            if (this.i.yAxis == null) {
                return null;
            }
            if (!this.i.yAxis.externalObject) {
                var e = new IgrNumericYAxis(null);
                e._implementation = this.i.yAxis;
                this.i.yAxis.externalObject = e;
            }
            return this.i.yAxis.externalObject;
        },
        set: function (v) {
            v == null ? this.i.yAxis = null : this.i.yAxis = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "xMemberPath", {
        /**
         * Gets or sets the value mapping property for the current series object.
        */
        get: function () {
            return this.i.nk;
        },
        set: function (v) {
            this.i.nk = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "yMemberPath", {
        /**
         * Gets or sets the value mapping property for the current series object.
        */
        get: function () {
            return this.i.no;
        },
        set: function (v) {
            this.i.no = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "trendLineType", {
        /**
         * Gets or sets the trend type for the current scatter series.
        */
        get: function () {
            return this.i.trendLineType;
        },
        set: function (v) {
            this.i.trendLineType = ensureEnum(TrendLineType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "trendLineBrush", {
        /**
         * Gets or sets the brush to use to draw the trend line.
        */
        get: function () {
            return brushToString(this.i.trendLineBrush);
        },
        set: function (v) {
            this.i.trendLineBrush = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "actualTrendLineBrush", {
        /**
         * Gets the effective TrendLineBrush for this series.
        */
        get: function () {
            return brushToString(this.i.ol);
        },
        set: function (v) {
            this.i.ol = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "trendLineThickness", {
        /**
         * Gets or sets the thickness of the current scatter series object's trend line.
        */
        get: function () {
            return this.i.trendLineThickness;
        },
        set: function (v) {
            this.i.trendLineThickness = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "trendLinePeriod", {
        /**
         * Gets or sets the moving average period for the current scatter series object.
         * The typical, and initial, value for trend line period is 7.
        */
        get: function () {
            return this.i.trendLinePeriod;
        },
        set: function (v) {
            this.i.trendLinePeriod = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "markerCollisionAvoidance", {
        /**
         * The desired behavior for markers in this series which are placed too close together for the current view, resulting in a collision.
        */
        get: function () {
            return this.i.mu;
        },
        set: function (v) {
            this.i.mu = ensureEnum(CollisionAvoidanceType_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "trendLineZIndex", {
        /**
         * Gets or sets the Z-Index of the trend line.  Values greater than 1000 will result in the trend line being rendered in front of the series data.
        */
        get: function () {
            return this.i.ne;
        },
        set: function (v) {
            this.i.ne = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgrScatterBase.prototype, "maximumMarkers", {
        /**
         * Gets or sets the maximum number of markerItems displayed by the current series.
         * If more than the specified number of markerItems are visible, the series will automatically
         * choose a representative set.
        */
        get: function () {
            return this.i.nd;
        },
        set: function (v) {
            this.i.nd = +v;
        },
        enumerable: true,
        configurable: true
    });
    /**
 * If possible, will return the best available value marker bounding box within the series that has the best value match for the world position provided.

* @param world  * The world coordinates for which to get a value marker bounding box for
*/
    IgrScatterBase.prototype.getSeriesValueMarkerBoundingBox = function (world) {
        var iv = this.i.lp(toPoint(world));
        return fromRect(iv);
    };
    /**
     * Determine if object can be used as YAxis
    
    * @param axis  * The object to check
    */
    IgrScatterBase.prototype.canUseAsYAxis = function (axis) {
        var iv = this.i.na(axis);
        return (iv);
    };
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    IgrScatterBase.prototype.canUseAsXAxis = function (axis) {
        var iv = this.i.m9(axis);
        return (iv);
    };
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    IgrScatterBase.prototype.getItem = function (world) {
        var iv = this.i.fm(toPoint(world));
        return (iv);
    };
    /**
     * Gets the index of the item that resides at the provided world coordinates.
    
    * @param world  * The world coordinates of the requested item.
    */
    IgrScatterBase.prototype.getItemIndex = function (world) {
        var iv = this.i.e5(toPoint(world));
        return (iv);
    };
    /**
     * Scrolls the series to display the item for the specified data item.
     * The series is scrolled by the minimum amount required to place the specified data item within
     * the central 80% of the visible axis.
    
    * @param item  * The data item (item) to scroll to.
    */
    IgrScatterBase.prototype.scrollIntoView = function (item) {
        var iv = this.i.c8(item);
        return (iv);
    };
    return IgrScatterBase;
}(IgrMarkerSeries));
export { IgrScatterBase };
