UNPKG

igniteui-react-charts

Version:

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

94 lines (92 loc) 3.61 kB
import { IgrTimeAxisBreakCollection } from "./igr-time-axis-break-collection"; import { TimeAxisLabellingMode } from "./TimeAxisLabellingMode"; import { IgrTimeAxisLabelFormatCollection } from "./igr-time-axis-label-format-collection"; import { IgrTimeAxisIntervalCollection } from "./igr-time-axis-interval-collection"; import { IgrTimeAxisBase, IIgrTimeAxisBaseProps } from "./igr-time-axis-base"; import { TimeXAxis } from "./TimeXAxis"; /** * A horizontal axis that uses a DateTime scale. * * The `TimeXAxis` is a horizontal axis that uses a DateTime scale. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * <IgrTimeXAxis name="xAxis" label="Date" * dateTimeMemberPath="Date" /> * </IgrDataChart> * ``` * * ```ts * this.timeXAxis = new IgrTimeXAxis({name: "timeXAxis"}); * this.timeXAxis.title = "Time X Axis"; * this.timeXAxis.dataSource = this.financialData; * this.timeXAxis.dateTimeMemberPath = "Time"; * ``` */ export declare class IgrTimeXAxis extends IgrTimeAxisBase<IIgrTimeXAxisProps> { protected createImplementation(): TimeXAxis; /** * @hidden */ get i(): TimeXAxis; constructor(props: IIgrTimeXAxisProps); get isPiecewise(): boolean; private _breaks; /** * TimeAxisBreaks to apply to this axis, representing spans of time to omit, such as weekends. * * The `Breaks` to apply to this axis, representing spans of time to omit, such as weekends. * * ```ts * <IgrDataChart * dataSource={this.state.dataSource} * width="700px" * height="500px"> * <IgrTimeXAxis name="xAxis" label="Date" * dateTimeMemberPath="Date" > * </IgrTimeXAxis> * </IgrDataChart> * ``` */ get breaks(): IgrTimeAxisBreakCollection; set breaks(v: IgrTimeAxisBreakCollection); /** * Gets or sets the labelling mode to use when the automatic label formats are applied. */ get labellingMode(): TimeAxisLabellingMode; set labellingMode(v: TimeAxisLabellingMode); private _labelFormats; /** * A list of axis label formats to apply, which are selected according to the visible axis range. * The label format selected will be the one with the largest range smaller than the visible range of the axis. */ get labelFormats(): IgrTimeAxisLabelFormatCollection; set labelFormats(v: IgrTimeAxisLabelFormatCollection); private _intervals; /** * A list of axis label intervals to apply, which are selected according to the visible axis range. * The interval selected will be the one with the largest range smaller than the visible range of the axis. */ get intervals(): IgrTimeAxisIntervalCollection; set intervals(v: IgrTimeAxisIntervalCollection); /** * Gets if the current axis is of category date time axis type */ get isCategoryDateTime(): boolean; findByName(name: string): any; getValueLabel(value: number): string; /** * Gets the index of the data item with the value nearest the given value. * @param unscaledValue * The value to find a value close to. */ getIndexClosestToUnscaledValue(unscaledValue: number): number; } export interface IIgrTimeXAxisProps extends IIgrTimeAxisBaseProps { /** * Gets or sets the labelling mode to use when the automatic label formats are applied. */ labellingMode?: TimeAxisLabellingMode | string; }