import * as tslib_1 from "tslib";
import { Component, forwardRef, Input, ChangeDetectionStrategy } from '@angular/core';
import { IgxHorizontalAnchoredCategorySeriesComponent } from "./igx-horizontal-anchored-category-series-component";
import { IgxAnchoredCategorySeriesComponent } from "./igx-anchored-category-series-component";
import { IgxCategorySeriesComponent } from "./igx-category-series-component";
import { IgxMarkerSeriesComponent } from "./igx-marker-series-component";
import { IgxSeriesComponent } from "./igx-series-component";
import { WaterfallSeries } from "./WaterfallSeries";
import { brushToString, stringToBrush, toPoint, fromRect } from "igniteui-angular-core";
/**
 * Represents a IgxDataChartComponent waterfall column series.
*
* `IgxWaterfallSeriesComponent` belongs to a group of `IgxCategorySeriesComponent` and it is rendered using a collection of vertical columns that show the difference between consecutive data points.
*
* ```html
* <igx-data-chart
*     [dataSource]="data">
*     <igx-category-x-axis #xAxis
*         label="label">
*     </igx-category-x-axis>
*     <igx-numeric-y-axis #yAxis>
*     </igx-numeric-y-axis>
*     <igx-waterfall-series
*         [xAxis]="xAxis"
*         [yAxis]="yAxis"
*         valueMemberPath="value">
*     </igx-waterfall-series>
* </igx-data-chart>
* ```
*
* ```ts
* let series: IgxWaterfallSeriesComponent = new IgxWaterfallSeriesComponent();
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.valueMemberPath = "value";
* this.chart.series.add(series);
* ```
*/
export var IgxWaterfallSeriesComponent_PROVIDERS = [{ provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent; }) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent; }) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent; }) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent; }) }];
var IgxWaterfallSeriesComponent = /** @class */ (function (_super) {
    tslib_1.__extends(IgxWaterfallSeriesComponent, _super);
    function IgxWaterfallSeriesComponent() {
        return _super.call(this) || this;
    }
    IgxWaterfallSeriesComponent_1 = IgxWaterfallSeriesComponent;
    IgxWaterfallSeriesComponent.prototype.createImplementation = function () {
        return new WaterfallSeries();
    };
    Object.defineProperty(IgxWaterfallSeriesComponent.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxWaterfallSeriesComponent.prototype, "isNegativeColorSupported", {
        /**
         * Overridden by derived series classes to indicate when negative colors are supported or not.
        */
        get: function () {
            return this.i.cz;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxWaterfallSeriesComponent.prototype, "negativeBrush", {
        /**
         * Gets or sets the brush to use for negative portions of the series.
        *
        * Gets or sets the color used to draw negative declines in values for this `IgxWaterfallSeriesComponent`.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data">
        *     <igx-category-x-axis #xAxis
        *         label="label">
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis #yAxis>
        *     </igx-numeric-y-axis>
        *     <igx-waterfall-series
        *         [xAxis]="xAxis"
        *         [yAxis]="yAxis"
        *         negativeBrush="#ff0000"
        *         valueMemberPath="value">
        *     </igx-waterfall-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * series.xAxis = this.xAxis;
        * series.yAxis = this.yAxis;
        * series.valueMemberPath = "value";
        * series.negativeBrush = "#ff0000";
        * this.chart.series.add(series);
        * ```
        */
        get: function () {
            return brushToString(this.i.qs);
        },
        set: function (v) {
            this.i.qs = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxWaterfallSeriesComponent.prototype, "radiusX", {
        /**
         * Gets or sets the x-radius of the ellipse that is used to round the corners of the column.
        *
        * Gets or sets the amount to round corners in the direction of the X axis in this series.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data">
        *     <igx-category-x-axis #xAxis
        *         label="label">
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis #yAxis>
        *     </igx-numeric-y-axis>
        *     <igx-waterfall-series
        *         [xAxis]="xAxis"
        *         [yAxis]="yAxis"
        *         radiusX="15"
        *         radiusY="15"
        *         valueMemberPath="value">
        *     </igx-waterfall-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * series.xAxis = this.xAxis;
        * series.yAxis = this.yAxis;
        * series.valueMemberPath = "value";
        * series.radiusX = 15;
        * series.radiusY = 15;
        * this.chart.series.add(series);
        * ```
        */
        get: function () {
            return this.i.qi;
        },
        set: function (v) {
            this.i.qi = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxWaterfallSeriesComponent.prototype, "radiusY", {
        /**
         * Gets or sets the y-radius of the ellipse that is used to round the corners of the column.
        *
        * Gets or sets the amount to round corners in the direction of the Y axis in this series.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data">
        *     <igx-category-x-axis #xAxis
        *         label="label">
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis #yAxis>
        *     </igx-numeric-y-axis>
        *     <igx-waterfall-series
        *         [xAxis]="xAxis"
        *         [yAxis]="yAxis"
        *         radiusX="15"
        *         radiusY="15"
        *         valueMemberPath="value">
        *     </igx-waterfall-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * series.xAxis = this.xAxis;
        * series.yAxis = this.yAxis;
        * series.valueMemberPath = "value";
        * series.radiusX = 15;
        * series.radiusY = 15;
        * this.chart.series.add(series);
        * ```
        */
        get: function () {
            return this.i.qj;
        },
        set: function (v) {
            this.i.qj = +v;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(IgxWaterfallSeriesComponent.prototype, "negativeOutline", {
        /**
         * Brush to use for outlining negative elements in the waterfall series.
        *
        * Gets or sets the color used to draw borders of negative declines in values for this `IgxWaterfallSeriesComponent`.
        *
        * ```html
        * <igx-data-chart
        *     [dataSource]="data">
        *     <igx-category-x-axis #xAxis
        *         label="label">
        *     </igx-category-x-axis>
        *     <igx-numeric-y-axis #yAxis>
        *     </igx-numeric-y-axis>
        *     <igx-waterfall-series
        *         [xAxis]="xAxis"
        *         [yAxis]="yAxis"
        *         negativeOutline="#ff0000"
        *         valueMemberPath="value">
        *     </igx-waterfall-series>
        * </igx-data-chart>
        * ```
        *
        * ```ts
        * series.xAxis = this.xAxis;
        * series.yAxis = this.yAxis;
        * series.valueMemberPath = "value";
        * series.negativeOutline = "#ff0000";
        * this.chart.series.add(series);
        * ```
        */
        get: function () {
            return brushToString(this.i.qt);
        },
        set: function (v) {
            this.i.qt = stringToBrush(v);
        },
        enumerable: true,
        configurable: true
    });
    IgxWaterfallSeriesComponent.prototype.setNegativeColors = function (negativeBrush, negativeOutline) {
        this.i.ji(stringToBrush(negativeBrush), stringToBrush(negativeOutline));
    };
    /**
     * If possible, will return the best available value bounding box within the series that has the best value match for the world position provided.
    
    * @param world  * The world coordinate for which to get a value bounding box for
    *
    * Returns a bounding box `Rect` for a data value given a `Point`.
    *
    * ```ts
    * let box : IgxRect = series.getSeriesValueBoundingBox({x: 4, y: 7});
    * ```
    */
    IgxWaterfallSeriesComponent.prototype.getSeriesValueBoundingBox = function (world) {
        var iv = this.i.lu(toPoint(world));
        return fromRect(iv);
    };
    /**
     * For a category plotted series, returns the current width of the items within the categories. This only returns a value if the items have some form of width (e.g. columns, bars, etc.) otherwise 0 is returned.
    
    *
    * Returns the width of items in the `IgxWaterfallSeriesComponent`.
    *
    * ```ts
    * let itemSpan: number = series.GetItemSpan();
    * ```
    */
    IgxWaterfallSeriesComponent.prototype.getItemSpan = function () {
        var iv = this.i.eg();
        return (iv);
    };
    var IgxWaterfallSeriesComponent_1;
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxWaterfallSeriesComponent.prototype, "negativeBrush", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxWaterfallSeriesComponent.prototype, "radiusX", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Number),
        tslib_1.__metadata("design:paramtypes", [Number])
    ], IgxWaterfallSeriesComponent.prototype, "radiusY", null);
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", String),
        tslib_1.__metadata("design:paramtypes", [String])
    ], IgxWaterfallSeriesComponent.prototype, "negativeOutline", null);
    IgxWaterfallSeriesComponent = IgxWaterfallSeriesComponent_1 = tslib_1.__decorate([
        Component({
            selector: 'igx-waterfall-series',
            template: "",
            providers: [{ provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent_1; }) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent_1; }) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent_1; }) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent_1; }) }, { provide: IgxSeriesComponent, useExisting: forwardRef(function () { return IgxWaterfallSeriesComponent_1; }) }],
            changeDetection: ChangeDetectionStrategy.OnPush
        }),
        tslib_1.__metadata("design:paramtypes", [])
    ], IgxWaterfallSeriesComponent);
    return IgxWaterfallSeriesComponent;
}(IgxHorizontalAnchoredCategorySeriesComponent));
export { IgxWaterfallSeriesComponent };
//# sourceMappingURL=igx-waterfall-series-component.js.map