import { TrendLineType_$type } from "igniteui-react-core/ES2015/TrendLineType";
import { PriceDisplayType_$type } from "./PriceDisplayType";
import { IgrFinancialSeries } from "./igr-financial-series";
import { FinancialPriceSeries } from "./FinancialPriceSeries";
import { ensureEnum, brushToString, stringToBrush, toPoint, fromRect } from "igniteui-react-core/ES2015/componentUtil";
/**
 * Represents a IgxDataChartComponent financial price series that renders as Candlestick or OHLC representations.
 * Default required members: Open, Low, High, Close
*
* The `IgrFinancialPriceSeries` class represents a IgxDataChartComponent financial price series that renders as Candlestick or OHLC representations.
*
* ```ts
* <IgrDataChart
*     dataSource={this.state.dataSource}
*     width="700px"
*     height="500px">
*
*
*     <IgrCategoryXAxis name="xAxis" label="Date" />
*     <IgrNumericYAxis  name="yAxis" />
*
*
*     <IgrFinancialPriceSeries
*     name="series2"
*     xAxisName="xAxis"
*     yAxisName="yAxis"
*     displayType="Candlestick"
*     lowMemberPath="Low"
*     highMemberPath="High"
*     openMemberPath="Open"
*     closeMemberPath="Close"
*     volumeMemberPath="Volume" />
*  </IgrDataChart>
* ```
*/
export class IgrFinancialPriceSeries extends IgrFinancialSeries {
    createImplementation() {
        return new FinancialPriceSeries();
    }
    get i() {
        return this._implementation;
    }
    constructor(props) {
        super(props);
    }
    /**
     * Gets or sets the trend type for the current financial series.
    *
    * Use the `trendLineType` property for the trend type of the current financial series.
    *
    * ```ts
    * <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrCategoryXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis  name="yAxis" />
    *
    *
    *     <IgrFinancialPriceSeries
    *     name="series2"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Candlestick"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	trendLineType="CubicFit" />
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.trendLineType= "CubicFit";
    * ```
    */
    get trendLineType() {
        return this.i.trendLineType;
    }
    set trendLineType(v) {
        this.i.trendLineType = ensureEnum(TrendLineType_$type, v);
    }
    /**
     * Gets or sets the brush to use to draw the trend line.
    *
    * Use the `trendLineBrush` property to brush the the trend line.
    *
    * ```ts
    * <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrCategoryXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis  name="yAxis" />
    *
    *
    *     <IgrFinancialPriceSeries
    *     name="series2"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Candlestick"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	trendLineBrush="Blue" />
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.trendLineBrush="red";
    * ```
    */
    get trendLineBrush() {
        return brushToString(this.i.trendLineBrush);
    }
    set trendLineBrush(v) {
        this.i.trendLineBrush = stringToBrush(v);
    }
    /**
     * Gets the effective TrendLineBrush for this FinancialPriceSeries.
    *
    * Use the `actualTrendLineBrush` property to Gets the effective TrendLineBrush for the FinancialIndicator.
    */
    get actualTrendLineBrush() {
        return brushToString(this.i.pw);
    }
    set actualTrendLineBrush(v) {
        this.i.pw = stringToBrush(v);
    }
    /**
     * Gets or sets the thickness of the current FinancialPriceSeries object's trend line.
    *
    * Use the `trendLineThickness` property for the thickness of the current FinancialPriceSeries object's trend line.
    *
    * ```ts
    * <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrCategoryXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis  name="yAxis" />
    *
    *
    *     <IgrFinancialPriceSeries
    *     name="series2"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Candlestick"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	trendLineThickness="3"/>
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.trendLineThickness=5;
    * ```
    */
    get trendLineThickness() {
        return this.i.trendLineThickness;
    }
    set trendLineThickness(v) {
        this.i.trendLineThickness = +v;
    }
    /**
     * Gets or sets the trend line period for the current series.
     * The typical, and initial, value for trend line period is 7.
    *
    * Use the `trendLinePeriod` property for the periodo the the current series.
    *
    * ```ts
    * <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrCategoryXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis  name="yAxis" />
    *
    *
    *     <IgrFinancialPriceSeries
    *     name="series2"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Candlestick"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	trendLinePeriod="7" />
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.trendLinePeriod= 7;
    * ```
    */
    get trendLinePeriod() {
        return this.i.trendLinePeriod;
    }
    set trendLinePeriod(v) {
        this.i.trendLinePeriod = +v;
    }
    /**
     * Gets or sets the display type for the current FinancialPriceSeries object.
    *
    * Use the `displayType` property for the display type of the current FinancialPriceSeries object.
    *
    * ```ts
    * <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrCategoryXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis  name="yAxis" />
    *
    *
    *     <IgrFinancialPriceSeries
    *     name="series2"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Candlestick"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * />
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.displayType=PriceDisplayType.Candlestick;
    * ```
    */
    get displayType() {
        return this.i.pd;
    }
    set displayType(v) {
        this.i.pd = ensureEnum(PriceDisplayType_$type, v);
    }
    /**
     * Brush to use for outlining negative elements in the series.
    *
    * Use the `negativeOutline` property to brush the outline negative elements in the series.
    *
    * ```ts
    * <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrCategoryXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis  name="yAxis" />
    *
    *
    *     <IgrFinancialPriceSeries
    *     name="series2"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Candlestick"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	negativeOutline="Red" />
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.negativeOutline="red";
    * ```
    */
    get negativeOutline() {
        return brushToString(this.i.px);
    }
    set negativeOutline(v) {
        this.i.px = stringToBrush(v);
    }
    /**
     * 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
    *
    * The `getSeriesValueBoundingBox` method return the best available value bounding box within the series that has the best value match for the world position provided.
    */
    getSeriesValueBoundingBox(world) {
        let iv = this.i.ln(toPoint(world));
        return fromRect(iv);
    }
    /**
     * Scrolls the series to display the item for the specified data item.
     * The categorySeries is scrolled by the minimum amount required to place the specified data item within
     * the central 80% of the visible axis.
    
    * @param item  * The data item (item) to scroll to.
    *
    * The `scrollIntoView` methos scrolls the series to display the item for the specified data item.
    */
    scrollIntoView(item) {
        let iv = this.i.c8(item);
        return (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.
    
    *
    * The `getItemSpan` method is used 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
    */
    getItemSpan() {
        let iv = this.i.ed();
        return (iv);
    }
    setNegativeColors(negativeBrush, negativeOutline) {
        this.i.jb(stringToBrush(negativeBrush), stringToBrush(negativeOutline));
    }
}
