UNPKG

igniteui-react-charts

Version:

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

717 lines (712 loc) 24.2 kB
import { IgPoint } from "igniteui-react-core"; import { TrendLineType } from "igniteui-react-core"; import { CategorySeriesMarkerCollisionAvoidance } from "./CategorySeriesMarkerCollisionAvoidance"; import { ConsolidatedItemHitTestBehavior } from "./ConsolidatedItemHitTestBehavior"; import { ValueLayerValueMode } from "./ValueLayerValueMode"; import { IgrCategorySeries, IIgrCategorySeriesProps } from "./igr-category-series"; import { AnchoredCategorySeries } from "./AnchoredCategorySeries"; /** * Represents the base class for all IgxDataChartComponent anchored category/value series. * * The `AnchoredCategorySeries` represents the base class for all IgxDataChartComponent anchored category/value series. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" /> * </IgrDataChart> * ``` */ export declare abstract class IgrAnchoredCategorySeries<P extends IIgrAnchoredCategorySeriesProps = IIgrAnchoredCategorySeriesProps> extends IgrCategorySeries<P> { /** * @hidden */ get i(): AnchoredCategorySeries; constructor(props: P); /** * Gets or sets the value mapping property for the current series object. * * The `ValueMemberPath` property is used for the value mapping property of the current series object. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" /> * </IgrDataChart> * ``` */ get valueMemberPath(): string; set valueMemberPath(v: string); /** * Gets or sets the value mapping property for the current series object. */ get highlightedValueMemberPath(): string; set highlightedValueMemberPath(v: string); /** * Gets or sets the label displayed before series value in the Data Legend. */ get valueMemberAsLegendLabel(): string; set valueMemberAsLegendLabel(v: string); /** * Gets or sets the unit displayed after series value in the Data Legend. */ get valueMemberAsLegendUnit(): string; set valueMemberAsLegendUnit(v: string); /** * Gets or sets the trend type for the current series object. * * The `TrendLineType` property is used for the current series object's trend type.' * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * trendLineType="SimpleAverage" /> * </IgrDataChart> * ``` * * ```ts * series.trendLineType= "CubicFit"; * ``` */ get trendLineType(): TrendLineType; set trendLineType(v: TrendLineType); /** * Gets or sets the brush to use to draw the trend line. * * The `TrendLineBrush` property is used to brush the trend line. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * trendLineBrush="Gray" /> * </IgrDataChart> * ``` * * ```ts * series.trendLineBrush="red"; * ``` */ get trendLineBrush(): string; set trendLineBrush(v: string); /** * Gets the effective TrendLineBrush for this series. * * The `ActualTrendLineBrush` property is used to gets the effective `TrendLineBrush` for this series. */ get actualTrendLineBrush(): string; set actualTrendLineBrush(v: string); /** * Gets or sets the thickness of the current series object's trend line. * * The `TrendLineThickness` property is used for thickness of the current series object's trend line. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * 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 series 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. * * The `TrendLinePeriod` property is used for trend line period of the current series. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * trendLinePeriod ="2" /> * </IgrDataChart> * ``` * * ```ts * series.trendLinePeriod= 7; * ``` */ get trendLinePeriod(): number; set trendLinePeriod(v: number); /** * The desired behavior for markers in this series which are placed too close together for the current view, resulting in a collision. * * The `MarkerCollisionAvoidance` property controls the technique the chart uses to avoid overlapping markers. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * markerCollisionAvoidance="fade" /> * </IgrDataChart> * ``` */ get markerCollisionAvoidance(): CategorySeriesMarkerCollisionAvoidance; set markerCollisionAvoidance(v: CategorySeriesMarkerCollisionAvoidance); /** * Determines the item returned in hit-testing when the pointer is over an object which represents several consolidated items. * * The `ConsolidatedItemHitTestBehavior` property is used to determines returned item in hit-testing when the pointer is over an object which represents several consolidated items. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * consolidatedItemHitTestBehavior="Basic" /> * </IgrDataChart> * ``` */ get consolidatedItemHitTestBehavior(): ConsolidatedItemHitTestBehavior; set consolidatedItemHitTestBehavior(v: ConsolidatedItemHitTestBehavior); getItemValue(item: any, memberPathName: string): any; /** * Gets the value of a requested member path from the series. * @param memberPathName * The property name of a valid member path for the series */ getMemberPathValue(memberPathName: string): string; /** * 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 is used to notifies the target axis or series that it should scroll the requested data item into view. * * ```ts * this.series.scrollIntoView(dataItem); * ``` */ scrollIntoView(item: any): boolean; /** * Gets the item that is the best match for the specified world coordinates. * @param world * The world coordinates to use. * * The `getItem` method is used to gets the item that is the best match for the specified world coordinates. * * ```ts * let item: number = this.series.getItem({x:.5,y:.5}); * ``` */ getItem(world: IgPoint): any; /** * Gets a numeric value from the numeric axis associated with this series that matches the desired * value mode. * @param mode * The type of value desired from the series numeric axis. */ getSeriesValueType(mode: ValueLayerValueMode): number[]; getSeriesValueTypePosition(mode: ValueLayerValueMode): IgPoint; getSeriesValueTypePositionFromValue(values: number[]): IgPoint; } export interface IIgrAnchoredCategorySeriesProps extends IIgrCategorySeriesProps { /** * Gets or sets the value mapping property for the current series object. * * The `ValueMemberPath` property is used for the value mapping property of the current series object. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" /> * </IgrDataChart> * ``` */ valueMemberPath?: string; /** * Gets or sets the value mapping property for the current series object. */ highlightedValueMemberPath?: string; /** * Gets or sets the label displayed before series value in the Data Legend. */ valueMemberAsLegendLabel?: string; /** * Gets or sets the unit displayed after series value in the Data Legend. */ valueMemberAsLegendUnit?: string; /** * Gets or sets the trend type for the current series object. * * The `TrendLineType` property is used for the current series object's trend type.' * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * trendLineType="SimpleAverage" /> * </IgrDataChart> * ``` * * ```ts * series.trendLineType= "CubicFit"; * ``` */ trendLineType?: TrendLineType | string; /** * Gets or sets the brush to use to draw the trend line. * * The `TrendLineBrush` property is used to brush the trend line. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * trendLineBrush="Gray" /> * </IgrDataChart> * ``` * * ```ts * series.trendLineBrush="red"; * ``` */ trendLineBrush?: string; /** * Gets the effective TrendLineBrush for this series. * * The `ActualTrendLineBrush` property is used to gets the effective `TrendLineBrush` for this series. */ actualTrendLineBrush?: string; /** * Gets or sets the thickness of the current series object's trend line. * * The `TrendLineThickness` property is used for thickness of the current series object's trend line. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * 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 series 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. * * The `TrendLinePeriod` property is used for trend line period of the current series. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * trendLinePeriod ="2" /> * </IgrDataChart> * ``` * * ```ts * series.trendLinePeriod= 7; * ``` */ trendLinePeriod?: number | string; /** * The desired behavior for markers in this series which are placed too close together for the current view, resulting in a collision. * * The `MarkerCollisionAvoidance` property controls the technique the chart uses to avoid overlapping markers. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * markerCollisionAvoidance="fade" /> * </IgrDataChart> * ``` */ markerCollisionAvoidance?: CategorySeriesMarkerCollisionAvoidance | string; /** * Determines the item returned in hit-testing when the pointer is over an object which represents several consolidated items. * * The `ConsolidatedItemHitTestBehavior` property is used to determines returned item in hit-testing when the pointer is over an object which represents several consolidated items. * * ```ts * <IgrDataChart > * * * <IgrCategoryXAxis name="xAxisYears" * interval={12} labelLocation="OutsideBottom" * label="Year" overlap={1} gap={0.4} /> * * <IgrCategoryXAxis name="xAxisMonths" * interval={1} labelLocation="OutsideBottom" * label="Month" overlap={1} gap={0.4}/> * * <IgrNumericYAxis name="yAxisLeft" * title="Expanse | Revenue" * minimumValue={-900} labelLocation="OutsideLeft" * maximumValue={900} * interval={300} /> * * <IgrNumericYAxis name="yAxisRight" * title="Profit (%)" * minimumValue={0} labelLocation="OutsideRight" * maximumValue={100} /> * * * <IgrLineSeries name="series1" * valueMemberPath="Revenue" * xAxisName="xAxisMonths" * yAxisName="yAxisLeft" * consolidatedItemHitTestBehavior="Basic" /> * </IgrDataChart> * ``` */ consolidatedItemHitTestBehavior?: ConsolidatedItemHitTestBehavior | string; }