UNPKG

igniteui-angular-charts

Version:

Ignite UI Angular charting components for building rich data visualizations for modern web apps.

119 lines (118 loc) 4.99 kB
import { TimeAxisLabellingMode } from "./TimeAxisLabellingMode"; import { IgxTimeAxisLabelFormatCollection } from "./igx-time-axis-label-format-collection"; import { IgxCategoryXAxisComponent } from "./igx-category-x-axis-component"; import { OrdinalTimeXAxis } from "./OrdinalTimeXAxis"; import * as i0 from "@angular/core"; /** * A horizontal axis that uses an ordinal DateTime scale. * On an ordinal time axis, datapoints are aligned according to their order in the ItemsSource, like a category axis. * * You can use the `OrdinalTimeXAxis` to display dates at equidistant. * * ```html * <igx-data-chart * [dataSource]="data"> * <igx-ordinal-time-x-axis * dateTimeMemberPath="date" * #xAxis> * </igx-ordinal-time-x-axis> * </igx-data-chart> * ``` * * ```ts * let xAxis = new IgxOrdinalTimeXAxisComponent(); * xAxis.dataTimeMemberPath="date"; * this.chart.axes.add(xAxis); * ``` * * ```ts * this.series.xAxis = this.ordinalTimeXAxis; * this.series.yAxis = this.numericYAxis; * this.series.xAxisName = "xAxis"; * this.series.yAxisName = "YAxis"; * ``` */ export declare class IgxOrdinalTimeXAxisComponent extends IgxCategoryXAxisComponent { protected createImplementation(): OrdinalTimeXAxis; /** * @hidden */ get i(): OrdinalTimeXAxis; constructor(); /** * Gets or sets the DateTime mapping property for the axis. */ get dateTimeMemberPath(): string; set dateTimeMemberPath(v: string); /** * Gets or sets the labelling mode to use when the automatic label formats are applied. */ get labellingMode(): TimeAxisLabellingMode; set labellingMode(v: TimeAxisLabellingMode); static ngAcceptInputType_labellingMode: TimeAxisLabellingMode | string; /** * Gets or sets if the current axis is of ordinal axis type */ get isOrdinal(): boolean; static ngAcceptInputType_isOrdinal: boolean | string; 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. * * You can use the `LabelFormats` for adjusting the labels depending on the range of the time shown by the chart. * * ```ts * let labelFormat = new TimeAxisLabelFormat(); * labelFormat.format = "hh:mm:ss"; * labelFormat.range = 1000; * this.xAxis.labelFormats.add(labelFormat); * labelFormat = new TimeAxisLabelFormat(); * labelFormat.format = "hh:mm"; * labelFormat.range = 60 * 1000; * this.xAxis.labelFormats.add(labelFormat); * labelFormat = new TimeAxisLabelFormat(); * labelFormat.format = "MMM-dd-yy"; * labelFormat.range = 24 * 60 * 60 * 1000; * this.xAxis.labelFormats.add(labelFormat); * labelFormat = new TimeAxisLabelFormat(); * labelFormat.format = "MMM yy"; * labelFormat.range = 365.24 * 24 * 60 * 60 * 1000; * this.xAxis.labelFormats.add(labelFormat); * labelFormat = new TimeAxisLabelFormat(); * labelFormat.format = "yyyy"; * labelFormat.range = 5 * 365 * 24 * 60 * 60 * 1000; * this.xAxis.labelFormats.add(labelFormat); * ``` * * ```html * <igx-data-chart * [dataSource]="data"> * <igx-ordinal-time-x-axis * [labelFormats]="labelFormats" * dateTimeMemberPath="time" * #xAxis> * </igx-ordinal-time-x-axis> * </igx-data-chart> * ``` */ get labelFormats(): IgxTimeAxisLabelFormatCollection; set labelFormats(v: IgxTimeAxisLabelFormatCollection); static ngAcceptInputType_labelFormats: IgxTimeAxisLabelFormatCollection | string; /** * Sets the minimum DateTime value to be displayed on this axis. * This property can be used to constrain the items displayed on the axis, within the range of DateTimes in the ItemsSource. It will ignore any setting outside the actual range of data. */ get minimumValue(): Date; set minimumValue(v: Date); /** * Sets the maximum DateTime value to be displayed on this axis. * This property can be used to constrain the items displayed on the axis, within the range of DateTimes in the ItemsSource. It will ignore any setting outside the actual range of data. */ get maximumValue(): Date; set maximumValue(v: Date); findByName(name: string): any; getValueLabel(value: number): string; static ɵfac: i0.ɵɵFactoryDeclaration<IgxOrdinalTimeXAxisComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<IgxOrdinalTimeXAxisComponent, "igx-ordinal-time-x-axis", never, { "dateTimeMemberPath": "dateTimeMemberPath"; "labellingMode": "labellingMode"; "labelFormats": "labelFormats"; "minimumValue": "minimumValue"; "maximumValue": "maximumValue"; }, {}, never, never>; }