import * as tslib_1 from "tslib";
var IgxWaterfallSeriesComponent_1;
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/ES2015/componentUtil";
/**
 * 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 const IgxWaterfallSeriesComponent_PROVIDERS = [{ provide: IgxHorizontalAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxWaterfallSeriesComponent) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxWaterfallSeriesComponent) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxWaterfallSeriesComponent) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxWaterfallSeriesComponent) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxWaterfallSeriesComponent) }];
let IgxWaterfallSeriesComponent = IgxWaterfallSeriesComponent_1 = class IgxWaterfallSeriesComponent extends IgxHorizontalAnchoredCategorySeriesComponent {
    constructor() {
        super();
    }
    createImplementation() {
        return new WaterfallSeries();
    }
    /**
                                 * @hidden
                                 */
    get i() {
        return this._implementation;
    }
    /**
     * Overridden by derived series classes to indicate when negative colors are supported or not.
    */
    get isNegativeColorSupported() {
        return this.i.cz;
    }
    /**
     * 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
    * let series: IgxWaterfallSeriesComponent = new IgxWaterfallSeriesComponent();
    * series.xAxis = this.xAxis;
    * series.yAxis = this.yAxis;
    * series.valueMemberPath = "value";
    * series.negativeBrush = "#ff0000";
    * this.chart.series.add(series);
    * ```
    */
    get negativeBrush() {
        return brushToString(this.i.qr);
    }
    set negativeBrush(v) {
        this.i.qr = stringToBrush(v);
    }
    /**
     * 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
    * let series: IgxWaterfallSeriesComponent = new IgxWaterfallSeriesComponent();
    * series.xAxis = this.xAxis;
    * series.yAxis = this.yAxis;
    * series.valueMemberPath = "value";
    * series.radiusX = 15;
    * series.radiusY = 15;
    * this.chart.series.add(series);
    * ```
    */
    get radiusX() {
        return this.i.qh;
    }
    set radiusX(v) {
        this.i.qh = +v;
    }
    /**
     * 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
    * let series: IgxWaterfallSeriesComponent = new IgxWaterfallSeriesComponent();
    * series.xAxis = this.xAxis;
    * series.yAxis = this.yAxis;
    * series.valueMemberPath = "value";
    * series.radiusX = 15;
    * series.radiusY = 15;
    * this.chart.series.add(series);
    * ```
    */
    get radiusY() {
        return this.i.qi;
    }
    set radiusY(v) {
        this.i.qi = +v;
    }
    /**
     * 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
    * let series: IgxWaterfallSeriesComponent = new IgxWaterfallSeriesComponent();
    * series.xAxis = this.xAxis;
    * series.yAxis = this.yAxis;
    * series.valueMemberPath = "value";
    * series.negativeOutline = "#ff0000";
    * this.chart.series.add(series);
    * ```
    */
    get negativeOutline() {
        return brushToString(this.i.qs);
    }
    set negativeOutline(v) {
        this.i.qs = stringToBrush(v);
    }
    setNegativeColors(negativeBrush, negativeOutline) {
        this.i.jh(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});
    * ```
    */
    getSeriesValueBoundingBox(world) {
        let iv = this.i.lt(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();
    * ```
    */
    getItemSpan() {
        let iv = this.i.eg();
        return (iv);
    }
};
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(() => IgxWaterfallSeriesComponent_1) }, { provide: IgxAnchoredCategorySeriesComponent, useExisting: forwardRef(() => IgxWaterfallSeriesComponent_1) }, { provide: IgxCategorySeriesComponent, useExisting: forwardRef(() => IgxWaterfallSeriesComponent_1) }, { provide: IgxMarkerSeriesComponent, useExisting: forwardRef(() => IgxWaterfallSeriesComponent_1) }, { provide: IgxSeriesComponent, useExisting: forwardRef(() => IgxWaterfallSeriesComponent_1) }],
        changeDetection: ChangeDetectionStrategy.OnPush
    }),
    tslib_1.__metadata("design:paramtypes", [])
], IgxWaterfallSeriesComponent);
export { IgxWaterfallSeriesComponent };
//# sourceMappingURL=igx-waterfall-series-component.js.map