import { IndicatorDisplayType_$type } from "./IndicatorDisplayType";
import { TrendLineType_$type } from "igniteui-react-core/ES2015/TrendLineType";
import { IgrFinancialSeries } from "./igr-financial-series";
import { ensureEnum, brushToString, stringToBrush, toPoint, fromRect } from "igniteui-react-core/ES2015/componentUtil";
/**
 * Represents the base functionality for a IgxDataChartComponent financial indicator series.
*
* The `IgrFinancialIndicator` class represents the base functionality for a IgxDataChartComponent financial indicator series.
*
* ```ts
*  <IgrDataChart
*     dataSource={this.state.dataSource}
*     width="700px"
*     height="500px">
*
*
*     <IgrOrdinalTimeXAxis name="xAxis" label="Date" />
*     <IgrNumericYAxis name="yAxis" />
*
*    <IgrMassIndexIndicator
*     name="series3"
*     xAxisName="xAxis"
*     yAxisName="yAxis"
*     displayType="Line"
*     lowMemberPath="Low"
*     highMemberPath="High"
*     openMemberPath="Open"
*     closeMemberPath="Close"
*     volumeMemberPath="Volume" />
*  </IgrDataChart>
* ```
*/
export class IgrFinancialIndicator extends IgrFinancialSeries {
    constructor(props) {
        super(props);
    }
    get i() {
        return this._implementation;
    }
    /**
     * Gets or sets the display for the current FinancialIndicator object.
    *
    * The `displayType` property is used to display the current FinancialIndicator object.
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrOrdinalTimeXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *    <IgrMassIndexIndicator
    *     name="series3"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Line"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	displayType="Column"  />
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.displayType= IndicatorDisplayType.Column;
    * ```
    */
    get displayType() {
        return this.i.pd;
    }
    set displayType(v) {
        this.i.pd = ensureEnum(IndicatorDisplayType_$type, v);
    }
    /**
     * Gets or sets the number of values to hide at the beginning of the indicator.
    *
    * Use the `ignoreFirst` propert to hide the number of values at the beginning of the indicator.
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrOrdinalTimeXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *    <IgrMassIndexIndicator
    *     name="series3"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Line"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	ignoreFirst="2"/>
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.ignoreFirst  = 2;
    * ```
    */
    get ignoreFirst() {
        return this.i.pj;
    }
    set ignoreFirst(v) {
        this.i.pj = +v;
    }
    /**
     * Gets or sets the trend type for the current indicator series.
    *
    * Use `trendLineType` property to get the trend type for the current indicator series.
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrOrdinalTimeXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *    <IgrMassIndexIndicator
    *     name="series3"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Line"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	trendLineType="CubicFit"/>
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.trendLineType= 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` propert to draw the trend line.
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrOrdinalTimeXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *    <IgrMassIndexIndicator
    *     name="series3"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Line"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	trendLineBrush="Red"/>
    *  </IgrDataChart>
    * ```
    */
    get trendLineBrush() {
        return brushToString(this.i.trendLineBrush);
    }
    set trendLineBrush(v) {
        this.i.trendLineBrush = stringToBrush(v);
    }
    /**
     * Gets the effective TrendLineBrush for this indicator.
    *
    * Use the `actualTrendLineBrush` property to Gets the effective TrendLineBrush for the FinancialIndicator.
    */
    get actualTrendLineBrush() {
        return brushToString(this.i.p1);
    }
    set actualTrendLineBrush(v) {
        this.i.p1 = stringToBrush(v);
    }
    /**
     * Gets or sets the thickness of the current indicator object's trend line.
    *
    * Use `trendLineThickness` property for the thickness of the current indicator object's trend line.
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrOrdinalTimeXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *    <IgrMassIndexIndicator
    *     name="series3"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Line"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	trendLineThickness="2"/>
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    *  series.trendLineThickness=2 ;
    * ```
    */
    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 `trendLinePeriod` property for the trend line period of the current series.
    *
    * ```ts
    *  <IgrDataChart
    *     dataSource={this.state.dataSource}
    *     width="700px"
    *     height="500px">
    *
    *
    *     <IgrOrdinalTimeXAxis name="xAxis" label="Date" />
    *     <IgrNumericYAxis name="yAxis" />
    *
    *    <IgrMassIndexIndicator
    *     name="series3"
    *     xAxisName="xAxis"
    *     yAxisName="yAxis"
    *     displayType="Line"
    *     lowMemberPath="Low"
    *     highMemberPath="High"
    *     openMemberPath="Open"
    *     closeMemberPath="Close"
    *     volumeMemberPath="Volume"
    * 	trendLinePeriod="30"/>
    *  </IgrDataChart>
    * ```
    *
    * ```ts
    * series.trendLinePeriod  =30;
    * ```
    */
    get trendLinePeriod() {
        return this.i.trendLinePeriod;
    }
    set trendLinePeriod(v) {
        this.i.trendLinePeriod = +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 returns 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);
    }
    getSeriesValue(world, useInterpolation, skipUnknowns) {
        let iv = this.i.ek(toPoint(world), useInterpolation, skipUnknowns);
        return (iv);
    }
    getPreviousOrExactIndex(world, skipUnknowns) {
        let iv = this.i.fb(toPoint(world), skipUnknowns);
        return (iv);
    }
    getNextOrExactIndex(world, skipUnknowns) {
        let iv = this.i.e9(toPoint(world), skipUnknowns);
        return (iv);
    }
    /**
     * Scrolls the series to display the item for the specified data item.
     * The series 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` method scrolls the series to display the item for the specified data item.
    */
    scrollIntoView(item) {
        let iv = this.i.c8(item);
        return (iv);
    }
}
