UNPKG

ag-charts-community

Version:

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

35 lines (34 loc) 2.5 kB
import type { AxisID, ChartAxisDirection, DomainWithMetadata, DynamicContext, NormalisedTimeAxisOptions } from 'ag-charts-core'; import type { AgTimeInterval, AgTimeIntervalUnit, DateFormatterStyle, FormatterParams } from 'ag-charts-types'; import type { ChartRegistry } from '../../module/moduleContext'; import { TimeScale } from '../../scale/timeScale'; import type { FormatDatumParams } from '../chartAxis'; import type { DatumIndexType, ISeries, ISeriesProperties } from '../series/seriesTypes'; import type { AxisTickFormatParams } from './axis'; import { CartesianAxis } from './cartesianAxis'; type TimeBound = Date | number | undefined; 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: number; enabled: NonNullable<boolean | undefined>; size: number; }, 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: number | Date, params: FormatDatumParams, _fractionDigits: number | undefined, timeInterval: AgTimeInterval | AgTimeIntervalUnit | undefined, style: DateFormatterStyle): FormatterParams<any>; } export declare function minimumTimeAxisDatumGranularity(boundSeries: ISeries<DatumIndexType, unknown, ISeriesProperties, unknown>[], direction: ChartAxisDirection, min: TimeBound, max: TimeBound): AgTimeIntervalUnit | undefined; export declare function calculateDefaultUnit(boundSeries: ISeries<DatumIndexType, unknown, ISeriesProperties, unknown>[], direction: ChartAxisDirection, min: TimeBound, max: TimeBound): AgTimeInterval | undefined; export {};