UNPKG

ag-charts-community

Version:

Advanced Charting / Charts supporting Javascript / Typescript / React / Angular / Vue

36 lines (35 loc) 2.64 kB
import type { AxisID, ChartAxisDirection, DomainWithMetadata, DynamicContext, NormalisedTimeAxisOptions } from 'ag-charts-core'; import type { AgTimeInterval, AgTimeIntervalUnit, AgTimeValue, DateFormatterStyle, FormatterParams } from 'ag-charts-types'; import type { ChartRegistry } from '../../module/moduleContext'; import { TimeScale } from '../../scale/timeScale'; import type { FormatDatumParams } from '../chartAxis'; import type { ISeries, ISeriesProperties, SeriesNodeDatum } from '../series/seriesTypes'; import type { AxisTickFormatParams } from './axis'; import { CartesianAxis } from './cartesianAxis'; type TimeBound = Date | number | undefined; export declare function coerceTimeBound(value: AgTimeValue | undefined): TimeBound; export declare class TimeAxis<TOptions extends NormalisedTimeAxisOptions = NormalisedTimeAxisOptions> extends CartesianAxis<TimeScale, number | Date, TOptions> { static readonly className = "TimeAxis"; static readonly type: "time"; constructor(moduleCtx: DynamicContext<ChartRegistry>, id: AxisID, options: TOptions); hasDefinedDomain(): boolean; isCategoryLike(): boolean; get primaryLabel(): import("ag-charts-core").NormalisedCartesianTimeAxisLabelOptions<unknown> | undefined; protected getLabelFormat(): string | Record<string, string> | undefined; protected getPrimaryLabelFormat(): string | Record<string, string> | undefined; get primaryTick(): Omit<import("ag-charts-types").AgAxisBaseTickOptions & { width: import("ag-charts-types").PixelSize; enabled: NonNullable<boolean | undefined>; size: import("ag-charts-types").PixelSize; }, never> | undefined; normaliseDataDomain(d: DomainWithMetadata<Date>): { domain: Date[]; clipped: boolean; }; processData(): void; tickFormatParams(domain: (number | Date)[], ticks: (number | Date)[], _fractionDigits?: number, timeInterval?: AgTimeInterval | AgTimeIntervalUnit): AxisTickFormatParams; datumFormatParams(value: AgTimeValue, params: FormatDatumParams, _fractionDigits: number | undefined, timeInterval: AgTimeInterval | AgTimeIntervalUnit | undefined, style: DateFormatterStyle): FormatterParams<any>; } export declare function minimumTimeAxisDatumGranularity(boundSeries: ISeries<SeriesNodeDatum, ISeriesProperties, unknown>[], direction: ChartAxisDirection, min: TimeBound, max: TimeBound): AgTimeIntervalUnit | undefined; export declare function calculateDefaultUnit(boundSeries: ISeries<SeriesNodeDatum, ISeriesProperties, unknown>[], direction: ChartAxisDirection, min: TimeBound, max: TimeBound): AgTimeInterval | undefined; export {};