import { delegateCombine, delegateRemove } from "igniteui-react-core";
import { IgrCategoryAxisBase } from "./igr-category-axis-base";
import { CategoryXAxis } from "./CategoryXAxis";
/**
 * Represents a IgxDataChartComponent category X axis.
*
* `IgrCategoryXAxis` class represents a IgxDataChartComponent category X axis.
*
* ```ts
*  <IgrDataChart
*     dataSource={this.state.dataSource} >
*
*     <IgrCategoryXAxis name="xAxis" />
*     <IgrNumericYAxis name="yAxis" />
*
*     <IgrLineSeries
*      name="series1"
*     xAxisName="xAxis"
* 	yAxisName="yAxis"
* 	valueMemberPath="Value"/>
*  </IgrDataChart>
* ```
*
* ```ts
* this.columnSeries1 = new IgrLineSeries({ name: "Series1" });
* this.columnSeries1.dataSource = this.categoryData;
* this.columnSeries1.xAxis = this.categoryXAxis;
* this.columnSeries1.yAxis = this.numericYAxis;
* this.columnSeries1.xAxisName = "categoryXAxis";
* this.columnSeries1.yAxisName = "numericYAxis";
* this.columnSeries1.valueMemberPath = "USA";
* ```
*/
export class IgrCategoryXAxis extends IgrCategoryAxisBase {
    constructor(props) {
        super(props);
        this._actualIntervalChange = null;
        this._actualIntervalChange_wrapped = null;
        this._actualMinorIntervalChange = null;
        this._actualMinorIntervalChange_wrapped = null;
    }
    createImplementation() {
        return new CategoryXAxis();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets the frequency of displayed labels.
     * The set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label.
    *
    * `interval` 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
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrCategoryXAxis name="xAxis" interval="3" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrLineSeries
    *      name="series1"
    *     xAxisName="xAxis"
    * 	yAxisName="yAxis"
    * 	valueMemberPath="Value"/>
    *  </IgrDataChart>
    * ```
    */
    get interval() {
        return this.i.lf;
    }
    set interval(v) {
        this.i.lf = +v;
    }
    /**
     * Gets the effective value for the current Interval.
    *
    * ```ts
    * let effectiveInterval: number = xAxis.actualInterval;
    * ```
    */
    get actualInterval() {
        return this.i.la;
    }
    set actualInterval(v) {
        this.i.la = +v;
    }
    /**
     * Gets or sets the frequency of displayed minor lines.
     * The set value is a factor that determines how the minor lines will be displayed.
    *
    * `minorInterval` 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.
    *
    * `minorInterval` 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 `minorInterval` to 0.1.
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource} >
    *
    *     <IgrCategoryXAxis name="xAxis"
    * 		minorInterval={0.1}
    * 		minorStroke="green"
    * 		minorStrokeThickness={1} />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *     <IgrLineSeries
    * 		name="series1"
    * 		xAxisName="xAxis"
    * 		yAxisName="yAxis"
    * 		valueMemberPath="value"/>
    *  </IgrDataChart>
    * ```
    */
    get minorInterval() {
        return this.i.lg;
    }
    set minorInterval(v) {
        this.i.lg = +v;
    }
    /**
     * Gets the effective value for the current MinorInterval.
    *
    * ```ts
    * let effectiveMinorInterval: number = xAxis.actualMinorInterval;
    * ```
    */
    get actualMinorInterval() {
        return this.i.lb;
    }
    set actualMinorInterval(v) {
        this.i.lb = +v;
    }
    /**
     * Scrolls the specified item into view.
    
    * @param item  * Data item to scroll into view
    */
    scrollIntoView(item) {
        this.i.lq(item);
    }
    scrollRangeIntoView(minimum, maximum) {
        this.i.lr(minimum, maximum);
    }
    get actualIntervalChange() {
        return this._actualIntervalChange;
    }
    set actualIntervalChange(ev) {
        if (this._actualIntervalChange_wrapped !== null) {
            this.i.propertyChanged = delegateRemove(this.i.propertyChanged, this._actualIntervalChange_wrapped);
            this._actualIntervalChange_wrapped = null;
            this._actualIntervalChange = null;
        }
        this._actualIntervalChange = ev;
        this._actualIntervalChange_wrapped = (o, e) => {
            let ext = this.actualInterval;
            if (this.beforeActualIntervalChange) {
                this.beforeActualIntervalChange(this, ext);
            }
            if (this._actualIntervalChange) {
                this._actualIntervalChange(this, ext);
            }
        };
        this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualIntervalChange_wrapped);
    }
    get actualMinorIntervalChange() {
        return this._actualMinorIntervalChange;
    }
    set actualMinorIntervalChange(ev) {
        if (this._actualMinorIntervalChange_wrapped !== null) {
            this.i.propertyChanged = delegateRemove(this.i.propertyChanged, this._actualMinorIntervalChange_wrapped);
            this._actualMinorIntervalChange_wrapped = null;
            this._actualMinorIntervalChange = null;
        }
        this._actualMinorIntervalChange = ev;
        this._actualMinorIntervalChange_wrapped = (o, e) => {
            let ext = this.actualMinorInterval;
            if (this.beforeActualMinorIntervalChange) {
                this.beforeActualMinorIntervalChange(this, ext);
            }
            if (this._actualMinorIntervalChange) {
                this._actualMinorIntervalChange(this, ext);
            }
        };
        this.i.propertyChanged = delegateCombine(this.i.propertyChanged, this._actualMinorIntervalChange_wrapped);
    }
}
//# sourceMappingURL=igr-category-x-axis.js.map
