UNPKG

igniteui-react-charts

Version:

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

261 lines (257 loc) 10.2 kB
import { IgrCategoryAxisBase, IIgrCategoryAxisBaseProps } from "./igr-category-axis-base"; import { CategoryXAxis } from "./CategoryXAxis"; /** * Represents a IgxDataChartComponent category X axis. * * `CategoryXAxis` class represents a IgxDataChartComponent category X axis. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} > * * <IgrCategoryXAxis name="xAxis" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrLineSeries * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * valueMemberPath="Value"/> * </IgrDataChart> * ``` * * ```ts * this.columnSeries1 = new IgrLineSeries({ name: "Series1" }); * this.columnSeries1.dataSource = this.categoryData; * this.columnSeries1.xAxis = this.categoryXAxis; * this.columnSeries1.yAxis = this.numericYAxis; * this.columnSeries1.xAxisName = "categoryXAxis"; * this.columnSeries1.yAxisName = "numericYAxis"; * this.columnSeries1.valueMemberPath = "USA"; * ``` */ export declare class IgrCategoryXAxis<P extends IIgrCategoryXAxisProps = IIgrCategoryXAxisProps> extends IgrCategoryAxisBase<P> { protected createImplementation(): CategoryXAxis; /** * @hidden */ get i(): CategoryXAxis; constructor(props: P); /** * Gets or sets number of visible categories at maximum zooming level * This property is overridden by chart's WindowRectMinWidth property */ get zoomMaximumCategoryRange(): number; set zoomMaximumCategoryRange(v: number); /** * Gets or sets maximum pixel span of series item that will be visible at maximum zooming level * This property ensures that series item does not get stretch above specified value. * This property is overridden by chart's WindowRectMinWidth property */ get zoomMaximumItemSpan(): number; set zoomMaximumItemSpan(v: number); /** * Gets or sets range of categories that the chart will zoom in to and fill plot area * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get zoomToCategoryRange(): number; set zoomToCategoryRange(v: number); /** * Gets or sets starting category that chart will move its zoom window. Acceptable value is between 0 and number of data items * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get zoomToCategoryStart(): number; set zoomToCategoryStart(v: number); /** * Gets or sets pixel span of series item that will be used to zoom chart such that the item has desired span * Chart will automatically zoom in until series item has specified pixel span. * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ get zoomToItemSpan(): number; set zoomToItemSpan(v: number); /** * Gets or sets the frequency of displayed labels. * The set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. * * `Interval` determines how often to show a label, tickmark, and/or gridline along the x-axis. Set this property to _n_ to display a label every _nth_ item. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} > * * <IgrCategoryXAxis name="xAxis" interval="3" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrLineSeries * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * valueMemberPath="Value"/> * </IgrDataChart> * ``` */ get interval(): number; set interval(v: number); /** * Gets the effective value for the current Interval. * * ```ts * let effectiveInterval: number = xAxis.actualInterval; * ``` */ get actualInterval(): number; set actualInterval(v: number); /** * Gets or sets the frequency of displayed minor lines. * The set value is a factor that determines how the minor lines will be displayed. * * `MinorInterval` determines how often to show a minor gridline along the x-axis. This property is relevant only when the displayed series is a type with grouping, like column series. * * `MinorInterval` is expressed as a number between 0 and 1, representing the frequency of the interval. To display minor gridlines representing 10ths of an item width, set `MinorInterval` to 0.1. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} > * * <IgrCategoryXAxis name="xAxis" * minorInterval={0.1} * minorStroke="green" * minorStrokeThickness={1} /> * <IgrNumericYAxis name="yAxis" /> * * <IgrLineSeries * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * valueMemberPath="value"/> * </IgrDataChart> * ``` */ get minorInterval(): number; set minorInterval(v: number); /** * Gets the effective value for the current MinorInterval. * * ```ts * let effectiveMinorInterval: number = xAxis.actualMinorInterval; * ``` */ get actualMinorInterval(): number; set actualMinorInterval(v: number); /** * Scrolls the specified item into view. * @param item * Data item to scroll into view */ scrollIntoView(item: any): void; scrollRangeIntoView(minimum: number, maximum: number): void; /** * Gets window zoom scale required to zoom to specified number of categories */ getWindowZoomFromCategories(categoriesCount: number): number; /** * Gets window zoom scale required to zoom to specified span of series item */ getWindowZoomFromItemSpan(pixels: number): number; private _actualIntervalChange; private _actualIntervalChange_wrapped; get actualIntervalChange(): (s: IgrCategoryXAxis, e: number) => void; set actualIntervalChange(ev: (s: IgrCategoryXAxis, e: number) => void); private _actualMinorIntervalChange; private _actualMinorIntervalChange_wrapped; get actualMinorIntervalChange(): (s: IgrCategoryXAxis, e: number) => void; set actualMinorIntervalChange(ev: (s: IgrCategoryXAxis, e: number) => void); } export interface IIgrCategoryXAxisProps extends IIgrCategoryAxisBaseProps { /** * Gets or sets number of visible categories at maximum zooming level * This property is overridden by chart's WindowRectMinWidth property */ zoomMaximumCategoryRange?: number | string; /** * Gets or sets maximum pixel span of series item that will be visible at maximum zooming level * This property ensures that series item does not get stretch above specified value. * This property is overridden by chart's WindowRectMinWidth property */ zoomMaximumItemSpan?: number | string; /** * Gets or sets range of categories that the chart will zoom in to and fill plot area * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ zoomToCategoryRange?: number | string; /** * Gets or sets starting category that chart will move its zoom window. Acceptable value is between 0 and number of data items * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ zoomToCategoryStart?: number | string; /** * Gets or sets pixel span of series item that will be used to zoom chart such that the item has desired span * Chart will automatically zoom in until series item has specified pixel span. * This property is overridden by chart's WindowRect or WindowScaleHorizontal properties */ zoomToItemSpan?: number | string; /** * Gets or sets the frequency of displayed labels. * The set value is a factor that determines which labels will be hidden. For example, an interval of 2 will display every other label. * * `Interval` determines how often to show a label, tickmark, and/or gridline along the x-axis. Set this property to _n_ to display a label every _nth_ item. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} > * * <IgrCategoryXAxis name="xAxis" interval="3" /> * <IgrNumericYAxis name="yAxis" /> * * <IgrLineSeries * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * valueMemberPath="Value"/> * </IgrDataChart> * ``` */ interval?: number | string; /** * Gets the effective value for the current Interval. * * ```ts * let effectiveInterval: number = xAxis.actualInterval; * ``` */ actualInterval?: number | string; /** * Gets or sets the frequency of displayed minor lines. * The set value is a factor that determines how the minor lines will be displayed. * * `MinorInterval` determines how often to show a minor gridline along the x-axis. This property is relevant only when the displayed series is a type with grouping, like column series. * * `MinorInterval` is expressed as a number between 0 and 1, representing the frequency of the interval. To display minor gridlines representing 10ths of an item width, set `MinorInterval` to 0.1. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} > * * <IgrCategoryXAxis name="xAxis" * minorInterval={0.1} * minorStroke="green" * minorStrokeThickness={1} /> * <IgrNumericYAxis name="yAxis" /> * * <IgrLineSeries * name="series1" * xAxisName="xAxis" * yAxisName="yAxis" * valueMemberPath="value"/> * </IgrDataChart> * ``` */ minorInterval?: number | string; /** * Gets the effective value for the current MinorInterval. * * ```ts * let effectiveMinorInterval: number = xAxis.actualMinorInterval; * ``` */ actualMinorInterval?: number | string; }