/*
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 { Output, EventEmitter, Input } from '@angular/core';
import { Visibility, Visibility_$type } from "igniteui-angular-core/ES5/Visibility";
import { HorizontalAlignment, HorizontalAlignment_$type } from "igniteui-angular-core/ES5/HorizontalAlignment";
import { VerticalAlignment, VerticalAlignment_$type } from "igniteui-angular-core/ES5/VerticalAlignment";
import { AxisLabelsLocation, AxisLabelsLocation_$type } from './AxisLabelsLocation';
import { AxisLabelSettings } from './AxisLabelSettings';
import { TitleSettings } from './TitleSettings';
import { AxisTitlePosition, AxisTitlePosition_$type } from './AxisTitlePosition';
import { ensureEnum, brushToString, stringToBrush, ensureBool } from "igniteui-angular-core/ES5/componentUtil";
import { delegateCombine } from "igniteui-angular-core/ES5/type";
import { RenderRequestedEventArgs } from './RenderRequestedEventArgs';
import { TypeRegistrar } from "igniteui-angular-core/ES5/type";
import { AxisRangeChangedEventArgs } from './igx-axis-range-changed-event-args';
import { AxisAnnotationCollection } from './igx-axis-annotation-collection';
import { AxisAnnotationCollection as AxisAnnotationCollection_internal } from './AxisAnnotationCollection';
import { SyncableObservableCollection$1 } from "igniteui-angular-core/ES5/SyncableObservableCollection$1";
import { IAxisAnnotation_$type } from './IAxisAnnotation';
export var IgxAxisComponent_PROVIDERS = [];
/**
 * Represents the base class from which all axis types are derived.
*/
var IgxAxisComponent = /** @class */ (function () {
    function IgxAxisComponent() {
        this._renderer = null;
        this._annotations = null;
        this._rangeChanged = null;
        this._renderRequested = null;
        this._zoneRunner = null;
        this._implementation = this.createImplementation();
        this._implementation.externalObject = this;
        this.onImplementationCreated();
    }
    Object.defineProperty(IgxAxisComponent.prototype, "i", {
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    IgxAxisComponent.prototype.onImplementationCreated = function () {
    };
    Object.defineProperty(IgxAxisComponent.prototype, "axisInternal", {
        get: function () {
            return this.i;
        },
        enumerable: true,
        configurable: true
    });
    IgxAxisComponent.prototype.createImplementation = function () {
        return null;
    };
    IgxAxisComponent.prototype.ngOnInit = function () {
    };
    Object.defineProperty(IgxAxisComponent.prototype, "name", {
        get: function () {
            console.log("getting axis anme: " + this.i.name);
            return this.i.name;
        },
        set: function (value) {
            console.log("setting axis name: " + value);
            this.i.name = value;
            console.log("checking axis anme: " + this.i.name);
        },
        enumerable: true,
        configurable: true
    });
    IgxAxisComponent.prototype.provideData = function (data) {
    };
    IgxAxisComponent.prototype._provideRenderer = function (renderer) {
        this._renderer = renderer;
        this._zoneRunner = function (act) { return renderer._ngZone.run(act); };
    };
    IgxAxisComponent._createFromInternal = function (internal) {
        if (!internal) {
            return null;
        }
        if (!internal.$type) {
            return null;
        }
        var name = internal.$type.name;
        var externalName = "Igx" + name + "Component";
        if (!TypeRegistrar.isRegistered(externalName)) {
            return null;
        }
        return TypeRegistrar.create(externalName);
    };
    Object.defineProperty(IgxAxisComponent.prototype, "isCategory", {
        /**
     * Gets or sets if the current axis is of category axis type
    */
        get: function () {
            return this.i.b2;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isNumeric", {
        /**
         * Gets or sets if the current axis is of numeric axis type
        */
        get: function () {
            return this.i.ca;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isAngular", {
        /**
         * Gets if the current axis is of angular axis type
        */
        get: function () {
            return this.i.b0;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isRadial", {
        /**
         * Gets or sets if the current axis is of radial axis type
        */
        get: function () {
            return this.i.cb;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isVertical", {
        /**
         * Gets if the current axis is a vertical axis.
        */
        get: function () {
            return this.i.ce;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isSorting", {
        /**
         * Gets or sets if the current axis is sorting data items
        */
        get: function () {
            return this.i.cc;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isDateTime", {
        /**
         * Gets or sets if the current axis is of date time axis type
        */
        get: function () {
            return this.i.b5;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isCategoryDateTime", {
        /**
         * Gets if the current axis is of category date time axis type
        */
        get: function () {
            return this.i.b3;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isContinuous", {
        /**
         * Gets if the current axis is a continuous rather than a discrete scale
        */
        get: function () {
            return this.i.b4;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "formatLabel", {
        /**
         * Sets or gets a function which takes an object that produces a formatted label for displaying in the chart.
        */
        get: function () {
            return this.i.ar;
        },
        set: function (v) {
            this.i.ar = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "title", {
        /**
         * Gets or sets the Title property.
        */
        get: function () {
            return this.i.f1;
        },
        set: function (v) {
            this.i.f1 = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "stroke", {
        /**
         * Gets or sets the Stroke property.
         * Null is treated as auto. The axis stroke will be displayed or not based on the axis type and series used with it.
        */
        get: function () {
            return brushToString(this.i.ig);
        },
        set: function (v) {
            this.i.ig = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "actualStroke", {
        /**
         * Gets or sets the effective stroke used for the axis.
        */
        get: function () {
            return brushToString(this.i.ib);
        },
        set: function (v) {
            this.i.ib = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "strokeThickness", {
        /**
         * Gets or sets the StrokeThickness property.
        */
        get: function () {
            return this.i.ek;
        },
        set: function (v) {
            this.i.ek = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "strip", {
        /**
         * Gets or sets the Strip property.
        */
        get: function () {
            return brushToString(this.i.ie);
        },
        set: function (v) {
            this.i.ie = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "majorStroke", {
        /**
         * Gets or sets the MajorStroke property.
         * Null is treated as auto. Major lines will be displayed or not based on the axis type and series used with it.
        */
        get: function () {
            return brushToString(this.i.ic);
        },
        set: function (v) {
            this.i.ic = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "actualMajorStroke", {
        /**
         * Gets or sets the ActualMajorStroke property.
        */
        get: function () {
            return brushToString(this.i.h9);
        },
        set: function (v) {
            this.i.h9 = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "majorStrokeThickness", {
        /**
         * Gets or sets the MajorStrokeThickness property.
        */
        get: function () {
            return this.i.d0;
        },
        set: function (v) {
            this.i.d0 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "minorStroke", {
        /**
         * Gets or sets the MinorStroke property.
        */
        get: function () {
            return brushToString(this.i.id);
        },
        set: function (v) {
            this.i.id = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "actualMinorStroke", {
        /**
         * Gets or sets the ActualMinorStroke property.
        */
        get: function () {
            return brushToString(this.i.ia);
        },
        set: function (v) {
            this.i.ia = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "minorStrokeThickness", {
        /**
         * Gets or sets the MinorStrokeThickness property.
        */
        get: function () {
            return this.i.d3;
        },
        set: function (v) {
            this.i.d3 = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "tickStroke", {
        /**
         * Gets or sets the TickStroke property.
        */
        get: function () {
            return brushToString(this.i.ih);
        },
        set: function (v) {
            this.i.ih = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "tickStrokeThickness", {
        /**
         * Gets or sets the TickStrokeThickness property.
        */
        get: function () {
            return this.i.em;
        },
        set: function (v) {
            this.i.em = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "tickLength", {
        /**
         * Gets or sets the TickLength property.
        */
        get: function () {
            return this.i.el;
        },
        set: function (v) {
            this.i.el = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isDisabled", {
        /**
         * Gets or sets the IsDisabled property. If true, the axis will not be rendered.
        */
        get: function () {
            return this.i.b6;
        },
        set: function (v) {
            this.i.b6 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "isInverted", {
        /**
         * Gets or sets the IsInverted property.
        */
        get: function () {
            return this.i.b8;
        },
        set: function (v) {
            this.i.b8 = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "useEnhancedIntervalManagement", {
        /**
         * Gets or sets whether to use more advanced heuristics when determining the initial number of labels to render, before resolving collisions, etc.
        */
        get: function () {
            return this.i.cn;
        },
        set: function (v) {
            this.i.cn = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "enhancedIntervalMinimumCharacters", {
        /**
         * Gets or sets the mininum desired characters to be displayed for horizontal axes when using advanced label heuristics. -1 will attempt to adjust the interval to precisely fit the horizontal labels.
        */
        get: function () {
            return this.i.eu;
        },
        set: function (v) {
            this.i.eu = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelTextStyle", {
        /**
         * Gets or sets the text style to use for axis labels.
        *
        * The `labelTextStyle` property Overrides the style of the text used for the axis labels.
        */
        get: function () {
            return this.i.aw ? this.i.aw.textStyle : null;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.textStyle = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelTextColor", {
        /**
         * The color of the {0}.
        *
        * The `labelTextColor` property Overrides the color of the text used for the axis labels.
        */
        get: function () {
            return brushToString(this.i.aw ? this.i.aw.textColor : null);
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.textColor = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelLocation", {
        /**
         * Gets or sets the location of the {0}.
        *
        * The `Location` property is used for the location.
        */
        get: function () {
            return this.i.aw ? this.i.aw.location : 0;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.location = ensureEnum(AxisLabelsLocation_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelVisibility", {
        /**
         * Gets or sets the visibility of the {0}.
        *
        * The `Visibility` property is used for the visibility of the axis.
        */
        get: function () {
            return this.i.aw ? this.i.aw.visibility : 0;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.visibility = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelShowFirstLabel", {
        /**
         * Gets or sets whether the first label is displayed when the zoom level is set to 1.
        *
        * The `ShowFirstLabel` is used to check whether the first label is displayed when the zoom level is set to 1.
        */
        get: function () {
            return this.i.aw ? this.i.aw.showFirstLabel : false;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.showFirstLabel = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelAngle", {
        /**
         * Gets or sets the angle of the {0}.
        *
        * The `Angle` property is used to set the angle of the axis.
        */
        get: function () {
            return this.i.aw ? this.i.aw.angle : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.angle = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelExtent", {
        /**
         * Distance between the axis and the edge of the control.
        *
        * The `Extent` property is used for the extent.
        */
        get: function () {
            return this.i.aw ? this.i.aw.extent : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.extent = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelLeftMargin", {
        /**
         * Margin applied to the left of the {0}.
        *
        * The `labelLeftMargin` property is used for the left margin of the labels.
        */
        get: function () {
            return this.i.aw ? this.i.aw.leftMargin : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.leftMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelRightMargin", {
        /**
         * Margin applied to the right of the {0}.
        *
        * The `labelRightMargin` property is used for the right margin of the labels.
        */
        get: function () {
            return this.i.aw ? this.i.aw.rightMargin : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.rightMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelTopMargin", {
        /**
         * Margin applied above the {0}.
        *
        * The `labelTopMargin` property is used for the top margin of the labels.
        */
        get: function () {
            return this.i.aw ? this.i.aw.topMargin : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.topMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelBottomMargin", {
        /**
         * Margin applied below the {0}.
        *
        * The `labelBottomMargin` is used for the bottom margin of the labels.
        */
        get: function () {
            return this.i.aw ? this.i.aw.bottomMargin : NaN;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.bottomMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelHorizontalAlignment", {
        /**
         * Gets or sets the horizontal alignment of the {0}.
        *
        * The `HorizontalAlignment` property is used for the horizontal alignment.
        */
        get: function () {
            return this.i.aw ? this.i.aw.horizontalAlignment : 0;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.horizontalAlignment = ensureEnum(HorizontalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "labelVerticalAlignment", {
        /**
         * Gets or sets the vertical alignment of the {0}.
        *
        * The `VerticalAlignment` property is used for the vertical alignment of the axis.
        */
        get: function () {
            return this.i.aw ? this.i.aw.verticalAlignment : 0;
        },
        set: function (v) {
            this.ensureLabelSettings();
            this.i.aw.verticalAlignment = ensureEnum(VerticalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    IgxAxisComponent.prototype.ensureLabelSettings = function () {
        if (this.i.aw) {
            return;
        }
        this.i.aw = new AxisLabelSettings();
        this.i.aw.location = this.i.ax();
        this.i.aw.angle = this.i.dh();
        this.i.aw.leftMargin = this.i.dj();
        this.i.aw.rightMargin = this.i.dk();
        this.i.aw.topMargin = this.i.dl();
        this.i.aw.bottomMargin = this.i.di();
        this.i.aw.horizontalAlignment = this.i.h7();
        this.i.aw.verticalAlignment = this.i.i1();
    };
    Object.defineProperty(IgxAxisComponent.prototype, "crossingAxis", {
        /**
         * Gets or sets the CrossingAxis property.
        */
        get: function () {
            if (this.i.ag == null) {
                return null;
            }
            return this.i.ag.externalObject;
        },
        set: function (v) {
            v == null ? this.i.ag = null : this.i.ag = v.i;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "crossingValue", {
        /**
         * Gets or sets the CrossingValue property.
        */
        get: function () {
            return this.i.ez;
        },
        set: function (v) {
            this.i.ez = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titlePosition", {
        /**
         * Gets or sets the title position relative to the axis labels.
        */
        get: function () {
            return this.i.bc ? this.i.bc.position : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.position = ensureEnum(AxisTitlePosition_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleTextStyle", {
        /**
         * Gets or sets the text style to use for axis labels.
        *
        * The `labelTextStyle` property Overrides the style of the text used for the axis labels.
        */
        get: function () {
            return this.i.bc ? this.i.bc.textStyle : null;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.textStyle = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleTextColor", {
        /**
         * The color of the {0}.
        *
        * The `labelTextColor` property Overrides the color of the text used for the axis labels.
        */
        get: function () {
            return brushToString(this.i.bc ? this.i.bc.textColor : null);
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.textColor = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleLocation", {
        /**
         * Gets or sets the location of the {0}.
        *
        * The `Location` property is used for the location.
        */
        get: function () {
            return this.i.bc ? this.i.bc.location : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.location = ensureEnum(AxisLabelsLocation_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleVisibility", {
        /**
         * Gets or sets the visibility of the {0}.
        *
        * The `Visibility` property is used for the visibility of the axis.
        */
        get: function () {
            return this.i.bc ? this.i.bc.visibility : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.visibility = ensureEnum(Visibility_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleShowFirstLabel", {
        /**
         * Gets or sets whether the first label is displayed when the zoom level is set to 1.
        *
        * The `ShowFirstLabel` is used to check whether the first label is displayed when the zoom level is set to 1.
        */
        get: function () {
            return this.i.bc ? this.i.bc.showFirstLabel : false;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.showFirstLabel = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleAngle", {
        /**
         * Gets or sets the angle of the {0}.
        *
        * The `Angle` property is used to set the angle of the axis.
        */
        get: function () {
            return this.i.bc ? this.i.bc.angle : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.angle = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleExtent", {
        /**
         * Distance between the axis and the edge of the control.
        *
        * The `Extent` property is used for the extent.
        */
        get: function () {
            return this.i.bc ? this.i.bc.extent : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.extent = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleLeftMargin", {
        /**
         * Margin applied to the left of the {0}.
        *
        * The `labelLeftMargin` property is used for the left margin of the labels.
        */
        get: function () {
            return this.i.bc ? this.i.bc.leftMargin : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.leftMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleRightMargin", {
        /**
         * Margin applied to the right of the {0}.
        *
        * The `labelRightMargin` property is used for the right margin of the labels.
        */
        get: function () {
            return this.i.bc ? this.i.bc.rightMargin : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.rightMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleTopMargin", {
        /**
         * Margin applied above the {0}.
        *
        * The `labelTopMargin` property is used for the top margin of the labels.
        */
        get: function () {
            return this.i.bc ? this.i.bc.topMargin : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.topMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleBottomMargin", {
        /**
         * Margin applied below the {0}.
        *
        * The `labelBottomMargin` is used for the bottom margin of the labels.
        */
        get: function () {
            return this.i.bc ? this.i.bc.bottomMargin : NaN;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.bottomMargin = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleHorizontalAlignment", {
        /**
         * Gets or sets the horizontal alignment of the {0}.
        *
        * The `HorizontalAlignment` property is used for the horizontal alignment.
        */
        get: function () {
            return this.i.bc ? this.i.bc.horizontalAlignment : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.horizontalAlignment = ensureEnum(HorizontalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "titleVerticalAlignment", {
        /**
         * Gets or sets the vertical alignment of the {0}.
        *
        * The `VerticalAlignment` property is used for the vertical alignment of the axis.
        */
        get: function () {
            return this.i.bc ? this.i.bc.verticalAlignment : 0;
        },
        set: function (v) {
            this.ensureTitleSettings();
            this.i.bc.verticalAlignment = ensureEnum(VerticalAlignment_$type, v);
        },
        enumerable: true,
        configurable: true
    });
    IgxAxisComponent.prototype.ensureTitleSettings = function () {
        if (this.i.bc) {
            return;
        }
        this.i.bc = new TitleSettings();
        this.i.bc.location = this.i.ay();
        this.i.bc.angle = this.i.dm();
        this.i.bc.leftMargin = this.i.dp();
        this.i.bc.rightMargin = this.i.dq();
        this.i.bc.topMargin = this.i.dr();
        this.i.bc.bottomMargin = this.i.dn();
        this.i.bc.horizontalAlignment = this.i.h8();
        this.i.bc.verticalAlignment = this.i.i2();
    };
    Object.defineProperty(IgxAxisComponent.prototype, "annotations", {
        /**
         * Gets the current annotations for the axis.
        */
        get: function () {
            if (this._annotations === null) {
                var coll = new AxisAnnotationCollection();
                var innerColl = this.i.ak;
                if (!innerColl) {
                    innerColl = new AxisAnnotationCollection_internal();
                }
                this._annotations = coll._fromInner(innerColl);
            }
            return this._annotations;
        },
        set: function (v) {
            if (this._annotations !== null) {
                this._annotations._setSyncTarget(null);
                this._annotations = null;
            }
            var coll = new AxisAnnotationCollection();
            this._annotations = coll._fromOuter(v);
            var syncColl = new SyncableObservableCollection$1(IAxisAnnotation_$type);
            var innerColl = this.i.ak;
            if (!innerColl) {
                innerColl = new AxisAnnotationCollection_internal();
            }
            syncColl._inner = innerColl;
            syncColl.clear();
            this._annotations._setSyncTarget(syncColl);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "coercionMethods", {
        /**
         * Gets or sets the coercion methods to use when loading data from data sources.
         * Should be specified before setting any member paths, if being used. Setting it later
         * will not cause data to be re-imported into the chart.
        *
        * The	`coercionMethods` methods is to use when loading data from data sources. Should be specified before setting any member paths, if being used.
        * Setting it later will not cause data to be reimported into the chart.
        */
        get: function () {
            return this.i.coercionMethods;
        },
        set: function (v) {
            this.i.coercionMethods = v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "expectFunctions", {
        /**
         * Gets or sets whether the series should expect that properties in its items source may be functions that need to be
         * evaluated to yield their value. This defaults to false, as there will be a subtle performance impact to using this feature.
         * This value must be set before assigning an item's source to take effect.
        */
        get: function () {
            return this.i.expectFunctions;
        },
        set: function (v) {
            this.i.expectFunctions = ensureBool(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "label", {
        /**
         * Gets or sets the axis label format string.
        */
        get: function () {
            return this.i.e2;
        },
        set: function (v) {
            this.i.e2 = v;
        },
        enumerable: true,
        configurable: true
    });
    /**
 * Renders the axis with no animation.

*/
    IgxAxisComponent.prototype.renderAxis = function () {
        this.i.gz();
    };
    /**
     * If using enhanced interval management and precise interval fitting, this will reset the cached maximum label width, and recalculate using the current labels.
    
    */
    IgxAxisComponent.prototype.resetCachedEnhancedInterval = function () {
        this.i.g2();
    };
    /**
     * Scales a value from axis space into screen space.
    
    * @param unscaledValue  * The unscaled axis value to scale.
    */
    IgxAxisComponent.prototype.scaleValue = function (unscaledValue) {
        var iv = this.i.d8(unscaledValue);
        return (iv);
    };
    Object.defineProperty(IgxAxisComponent.prototype, "rangeChanged", {
        /**
         * Occurs when the axis range changes.
        */
        get: function () {
            var _this = this;
            if (this._rangeChanged == null) {
                this._rangeChanged = new EventEmitter();
                this.i.rangeChanged = delegateCombine(this.i.rangeChanged, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new AxisRangeChangedEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeRangeChanged) {
                            _this.beforeRangeChanged(_this, outerArgs);
                        }
                        _this._rangeChanged.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._rangeChanged;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxAxisComponent.prototype, "renderRequested", {
        /**
         * This event is raised every time a render has been requested from a series.
        */
        get: function () {
            var _this = this;
            if (this._renderRequested == null) {
                this._renderRequested = new EventEmitter();
                this.i.renderRequested = delegateCombine(this.i.renderRequested, function (o, e) {
                    _this._runInZone(function () {
                        var outerArgs = new RenderRequestedEventArgs();
                        outerArgs._provideImplementation(e);
                        if (_this.beforeRenderRequested) {
                            _this.beforeRenderRequested(_this, outerArgs);
                        }
                        _this._renderRequested.emit({
                            sender: _this,
                            args: outerArgs
                        });
                    });
                });
            }
            return this._renderRequested;
        },
        enumerable: true,
        configurable: true
    });
    IgxAxisComponent.prototype._runInZone = function (act) {
        if (this._zoneRunner != null) {
            this._zoneRunner(act);
        }
        else {
            act();
        }
    };
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "name", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Function),
        tslib_1.__metadata("design:paramtypes", [Function])
    ], IgxAxisComponent.prototype, "formatLabel", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "title", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "stroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "actualStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "strokeThickness", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "strip", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "majorStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "actualMajorStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "majorStrokeThickness", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "minorStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "actualMinorStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "minorStrokeThickness", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "tickStroke", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "tickStrokeThickness", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "tickLength", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxAxisComponent.prototype, "isDisabled", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxAxisComponent.prototype, "isInverted", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxAxisComponent.prototype, "useEnhancedIntervalManagement", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "enhancedIntervalMinimumCharacters", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "labelTextStyle", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "labelTextColor", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelLocation", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxAxisComponent.prototype, "labelShowFirstLabel", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelAngle", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelExtent", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelLeftMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelRightMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelTopMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelBottomMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelHorizontalAlignment", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "labelVerticalAlignment", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", IgxAxisComponent),
        tslib_1.__metadata("design:paramtypes", [IgxAxisComponent])
    ], IgxAxisComponent.prototype, "crossingAxis", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], IgxAxisComponent.prototype, "crossingValue", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titlePosition", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "titleTextStyle", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxAxisComponent.prototype, "titleTextColor", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleLocation", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleVisibility", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxAxisComponent.prototype, "titleShowFirstLabel", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleAngle", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleExtent", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleLeftMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleRightMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleTopMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleBottomMargin", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleHorizontalAlignment", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxAxisComponent.prototype, "titleVerticalAlignment", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", AxisAnnotationCollection),
        tslib_1.__metadata("design:paramtypes", [AxisAnnotationCollection])
    ], IgxAxisComponent.prototype, "annotations", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], IgxAxisComponent.prototype, "coercionMethods", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Boolean),
        tslib_1.__metadata("design:paramtypes", [Boolean])
    ], IgxAxisComponent.prototype, "expectFunctions", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object),
        tslib_1.__metadata("design:paramtypes", [Object])
    ], IgxAxisComponent.prototype, "label", null);
    tslib_1.__decorate([
        Output(),
        tslib_1.__metadata("design:type", EventEmitter),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxAxisComponent.prototype, "rangeChanged", null);
    tslib_1.__decorate([
        Output(),
        tslib_1.__metadata("design:type", EventEmitter),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxAxisComponent.prototype, "renderRequested", null);
    return IgxAxisComponent;
}());
export { IgxAxisComponent };
//# sourceMappingURL=igx-axis-component.js.map