import { __extends } from "tslib";
import { IgrHorizontalAnchoredCategorySeries } from "./igr-horizontal-anchored-category-series";
import { WaterfallSeries } from "./WaterfallSeries";
import { brushToString, stringToBrush, toPoint, fromRect } from "igniteui-react-core";
/**
 * Represents a IgxDataChartComponent waterfall column series.
*
* `WaterfallSeries` belongs to a group of `CategorySeries` and it is rendered using a collection of vertical columns that show the difference between consecutive data points.
*
* ```ts
*  <IgrDataChart
*     dataSource={this.state.dataSource} >
*
*     <IgrCategoryXAxis name="xAxis" />
*     <IgrNumericYAxis name="yAxis" />
*
*     <IgrWaterfallSeries
*      name="series1"
*     xAxisName="xAxis"
* 	yAxisName="yAxis"
* 	valueMemberPath="Value"/>
*  </IgrDataChart>
* ```
*
* ```ts
* let series= new IgrWaterfallSeries({name: "series"});
* series.xAxis = this.xAxis;
* series.yAxis = this.yAxis;
* series.valueMemberPath = "value";
* this.chart.series.add(series);
* ```
*/
var IgrWaterfallSeries = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(IgrWaterfallSeries, _super);
    function IgrWaterfallSeries(props) {
        return _super.call(this, props) || this;
    }
    IgrWaterfallSeries.prototype.createImplementation = function () {
        return new WaterfallSeries();
    };
    Object.defineProperty(IgrWaterfallSeries.prototype, "i", {
        /**
                                     * @hidden
                                     */
        get: function () {
            return this._implementation;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrWaterfallSeries.prototype, "isWaterfall", {
        /**
         * Gets whether the current series shows a waterfall column shape.
        */
        get: function () {
            return this.i.fk;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrWaterfallSeries.prototype, "isMarkerlessDisplayPreferred", {
        /**
         * Overridden by derived series classes to indicate when marker-less display is preferred or not.
        */
        get: function () {
            return this.i.ez;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrWaterfallSeries.prototype, "isFinancialWaterfall", {
        /**
         * Gets whether the series is financial waterfall
        */
        get: function () {
            return this.i.ep;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrWaterfallSeries.prototype, "isNegativeColorSupported", {
        /**
         * Overridden by derived series classes to indicate when negative colors are supported or not.
        */
        get: function () {
            return this.i.e0;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrWaterfallSeries.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 `WaterfallSeries`.
        *
        * ```ts
        *  <IgrDataChart
        *     dataSource={this.state.dataSource} >
        *
        *     <IgrCategoryXAxis name="xAxis" />
        *     <IgrNumericYAxis name="yAxis" />
        *
        *     <IgrWaterfallSeries
        *      name="series1"
        *     xAxisName="xAxis"
        * 	yAxisName="yAxis"
        * 	negativeBrush="#ff0000"
        * 	valueMemberPath="Value"/>
        *  </IgrDataChart>
        * ```
        *
        * ```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.zr);
        },
        set: function (v) {
            this.i.zr = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrWaterfallSeries.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.
        *
        * ```ts
        *  <IgrDataChart
        *     dataSource={this.state.dataSource} >
        *
        *     <IgrCategoryXAxis name="xAxis" />
        *     <IgrNumericYAxis name="yAxis" />
        *
        *     <IgrWaterfallSeries
        *      name="series1"
        *     xAxisName="xAxis"
        * 	yAxisName="yAxis"
        * 	radiusX="15"
        *     radiusY="15"
        * 	valueMemberPath="Value"/>
        *  </IgrDataChart>
        * ```
        *
        * ```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.zh;
        },
        set: function (v) {
            this.i.zh = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrWaterfallSeries.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.
        *
        * ```ts
        *  <IgrDataChart
        *     dataSource={this.state.dataSource} >
        *
        *     <IgrCategoryXAxis name="xAxis" />
        *     <IgrNumericYAxis name="yAxis" />
        *
        *     <IgrWaterfallSeries
        *      name="series1"
        *     xAxisName="xAxis"
        * 	yAxisName="yAxis"
        * 	radiusX="15"
        *     radiusY="15"
        * 	valueMemberPath="Value"/>
        *  </IgrDataChart>
        * ```
        *
        * ```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.zi;
        },
        set: function (v) {
            this.i.zi = +v;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(IgrWaterfallSeries.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 `WaterfallSeries`.
        *
        * ```ts
        *  <IgrDataChart
        *     dataSource={this.state.dataSource} >
        *
        *     <IgrCategoryXAxis name="xAxis" />
        *     <IgrNumericYAxis name="yAxis" />
        *
        *     <IgrWaterfallSeries
        *      name="series1"
        *     xAxisName="xAxis"
        * 	yAxisName="yAxis"
        * 	negativeOutline="#ff0000"
        * 	valueMemberPath="Value"/>
        *  </IgrDataChart>
        * ```
        *
        * ```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.zs);
        },
        set: function (v) {
            this.i.zs = stringToBrush(v);
        },
        enumerable: false,
        configurable: true
    });
    IgrWaterfallSeries.prototype.setNegativeColors = function (negativeBrush, negativeOutline) {
        this.i.p1(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`.
    */
    IgrWaterfallSeries.prototype.getSeriesValueBoundingBox = function (world) {
        var iv = this.i.tu(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 `WaterfallSeries`.
    *
    * ```ts
    * let itemSpan: number = series.GetItemSpan();
    * ```
    */
    IgrWaterfallSeries.prototype.getItemSpan = function () {
        var iv = this.i.h1();
        return (iv);
    };
    return IgrWaterfallSeries;
}(IgrHorizontalAnchoredCategorySeries));
export { IgrWaterfallSeries };
