/*
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 { IgrNumericXAxis } from './igr-numeric-x-axis';
import { IgrNumericYAxis } from './igr-numeric-y-axis';
import { IgrSeries } from './igr-series';
import { HighDensityScatterSeries } from "./HighDensityScatterSeries";
import { delegateCombine, delegateRemove } from "igniteui-react-core/ES2015/type";
import { toPoint, ensureBool, stringToColor, colorToString } from "igniteui-react-core/ES2015/componentUtil";
import { ProgressiveLoadStatusEventArgs } from './igr-progressive-load-status-event-args';
/**
 * Represents a IgxDataChartComponent series where a high volume of scatter points can be displayed.
*/
export class IgrHighDensityScatterSeries extends IgrSeries {
    constructor(props) {
        super(props);
        this._progressiveLoadStatusChanged = null;
        this._progressiveLoadStatusChanged_wrapped = null;
    }
    createImplementation() {
        return new HighDensityScatterSeries();
    }
    set xAxisName(value) {
        this._xAxisName = value;
    }
    get xAxisName() {
        return this._xAxisName;
    }
    set yAxisName(value) {
        this._yAxisName = value;
    }
    get yAxisName() {
        return this._yAxisName;
    }
    bindAxes(axes) {
        for (let 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];
            }
        }
    }
    get i() {
        return this._implementation;
    }
    /**
 * Checks if this series is a scatter series
*/
    get isScatter() {
        return this.i.c4;
    }
    /**
     * Gets or sets the effective x-axis for the current object.
    */
    get xAxis() {
        if (this.i.l0 == null) {
            return null;
        }
        if (!this.i.l0.externalObject) {
            let e = new IgrNumericXAxis(null);
            e._implementation = this.i.l0;
            this.i.l0.externalObject = e;
        }
        return this.i.l0.externalObject;
    }
    set xAxis(v) {
        v == null ? this.i.l0 = null : this.i.l0 = v.i;
    }
    /**
     * Gets or sets the effective y-axis for the current object.
    */
    get yAxis() {
        if (this.i.l2 == null) {
            return null;
        }
        if (!this.i.l2.externalObject) {
            let e = new IgrNumericYAxis(null);
            e._implementation = this.i.l2;
            this.i.l2.externalObject = e;
        }
        return this.i.l2.externalObject;
    }
    set yAxis(v) {
        v == null ? this.i.l2 = null : this.i.l2 = v.i;
    }
    /**
     * Gets or sets the x value mapping property for the current series object.
    */
    get xMemberPath() {
        return this.i.nw;
    }
    set xMemberPath(v) {
        this.i.nw = v;
    }
    /**
     * Gets or sets the y value mapping property for the current series object.
    */
    get yMemberPath() {
        return this.i.n0;
    }
    set yMemberPath(v) {
        this.i.n0 = v;
    }
    /**
     * Gets or sets the whether to use use brute force mode.
    */
    get useBruteForce() {
        return this.i.mg;
    }
    set useBruteForce(v) {
        this.i.mg = ensureBool(v);
    }
    /**
     * Gets or sets the whether to progressively load the data into the chart.
    */
    get progressiveLoad() {
        return this.i.mf;
    }
    set progressiveLoad(v) {
        this.i.mf = ensureBool(v);
    }
    /**
     * Gets or sets the density value that maps to the minimum heat color.
    */
    get heatMinimum() {
        return this.i.m8;
    }
    set heatMinimum(v) {
        this.i.m8 = +v;
    }
    /**
     * Gets or sets the value that maps to the maximum heat color.
    */
    get heatMaximum() {
        return this.i.m7;
    }
    set heatMaximum(v) {
        this.i.m7 = +v;
    }
    /**
     * Gets or sets the color to use for the minimum end of the scale.
    */
    get heatMinimumColor() {
        return colorToString(this.i.ot);
    }
    set heatMinimumColor(v) {
        this.i.ot = stringToColor(v);
    }
    /**
     * Gets or sets the color to use for the maximum end of the scale.
    */
    get heatMaximumColor() {
        return colorToString(this.i.os);
    }
    set heatMaximumColor(v) {
        this.i.os = stringToColor(v);
    }
    /**
     * Gets or sets the the pixel extent of the square data points that are rendered.
    */
    get pointExtent() {
        return this.i.nk;
    }
    set pointExtent(v) {
        this.i.nk = +v;
    }
    /**
     * Represents the current status of the progressive load of the series. It will range from 0 to 100, where 100 is fully loaded.
    */
    get progressiveStatus() {
        return this.i.nl;
    }
    set progressiveStatus(v) {
        this.i.nl = +v;
    }
    /**
 * Determine if object can be used as YAxis

* @param axis  * The object to check
*/
    canUseAsYAxis(axis) {
        let iv = this.i.me(axis);
        return (iv);
    }
    /**
     * Determine if object can be used as XAxis
    
    * @param axis  * The object to check
    */
    canUseAsXAxis(axis) {
        let iv = this.i.md(axis);
        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.
    */
    scrollIntoView(item) {
        let iv = this.i.c8(item);
        return (iv);
    }
    /**
     * Gets the item that is the best match for the specified world coordinates.
    
    * @param world  * The world coordinates to use.
    */
    getItem(world) {
        let iv = this.i.fm(toPoint(world));
        return (iv);
    }
    /**
     * Raised when the progressive loading state of the series has changed.
    */
    get progressiveLoadStatusChanged() {
        return this._progressiveLoadStatusChanged;
    }
    set progressiveLoadStatusChanged(ev) {
        if (this._progressiveLoadStatusChanged_wrapped !== null) {
            this.i.progressiveLoadStatusChanged = delegateRemove(this.i.progressiveLoadStatusChanged, this._progressiveLoadStatusChanged_wrapped);
            this._progressiveLoadStatusChanged_wrapped = null;
            this._progressiveLoadStatusChanged = null;
        }
        this._progressiveLoadStatusChanged = ev;
        this._progressiveLoadStatusChanged_wrapped = (o, e) => {
            let outerArgs = new ProgressiveLoadStatusEventArgs();
            outerArgs._provideImplementation(e);
            if (this.beforeProgressiveLoadStatusChanged) {
                this.beforeProgressiveLoadStatusChanged(this, outerArgs);
            }
            if (this._progressiveLoadStatusChanged) {
                this._progressiveLoadStatusChanged(this, outerArgs);
            }
        };
        this.i.progressiveLoadStatusChanged = delegateCombine(this.i.progressiveLoadStatusChanged, this._progressiveLoadStatusChanged_wrapped);
    }
}
