UNPKG

igniteui-react-charts

Version:

Ignite UI React charting components for building rich data visualizations using TypeScript APIs.

505 lines (502 loc) 15.6 kB
import { IgRect } from "igniteui-react-core"; import { IgPoint } from "igniteui-react-core"; import { IndicatorDisplayType } from "./IndicatorDisplayType"; import { TrendLineType } from "igniteui-react-core"; import { IgrFinancialSeries, IIgrFinancialSeriesProps } from "./igr-financial-series"; import { FinancialIndicator } from "./FinancialIndicator"; /** * Represents the base functionality for a IgxDataChartComponent financial indicator series. * * The `FinancialIndicator` 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 declare abstract class IgrFinancialIndicator<P extends IIgrFinancialIndicatorProps = IIgrFinancialIndicatorProps> extends IgrFinancialSeries<P> { /** * @hidden */ get i(): FinancialIndicator; constructor(props: P); /** * Gets whether the series is financial indicator */ get isFinancialIndicator(): boolean; /** * 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(): IndicatorDisplayType; set displayType(v: IndicatorDisplayType); /** * Gets default display type for the current Financial Indicator */ get defaultDisplayType(): IndicatorDisplayType; /** * 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(): number; set ignoreFirst(v: number); /** * 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(): TrendLineType; set trendLineType(v: TrendLineType); /** * 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(): string; set trendLineBrush(v: string); /** * Gets the effective TrendLineBrush for this indicator. * * Use the `ActualTrendLineBrush` property to Gets the effective TrendLineBrush for the FinancialIndicator. */ get actualTrendLineBrush(): string; set actualTrendLineBrush(v: string); /** * 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(): number; set trendLineThickness(v: number); /** * Gets or sets a collection of double values that indicate the pattern of dashes and gaps that * is used to draw the trend line for the current indicator object. */ get trendLineDashArray(): number[]; set trendLineDashArray(v: number[]); /** * 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(): number; set trendLinePeriod(v: number); /** * 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: IgPoint): IgRect; getSeriesValue(world: IgPoint, useInterpolation: boolean, skipUnknowns: boolean): number; getPreviousOrExactIndex(world: IgPoint, skipUnknowns: boolean): number; getNextOrExactIndex(world: IgPoint, skipUnknowns: boolean): number; /** * 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: any): boolean; } export interface IIgrFinancialIndicatorProps extends IIgrFinancialSeriesProps { /** * 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; * ``` */ displayType?: IndicatorDisplayType | string; /** * 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; * ``` */ ignoreFirst?: number | string; /** * 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; * ``` */ trendLineType?: TrendLineType | string; /** * 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> * ``` */ trendLineBrush?: string; /** * Gets the effective TrendLineBrush for this indicator. * * Use the `ActualTrendLineBrush` property to Gets the effective TrendLineBrush for the FinancialIndicator. */ actualTrendLineBrush?: string; /** * 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 ; * ``` */ trendLineThickness?: number | string; /** * Gets or sets a collection of double values that indicate the pattern of dashes and gaps that * is used to draw the trend line for the current indicator object. */ trendLineDashArray?: number[] | string; /** * 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; * ``` */ trendLinePeriod?: number | string; }