Skip to content

Documentation / @finchart/core / index / TimeTicksOptions

Interface: TimeTicksOptions ​

Defined in: packages/core/src/axis/time-ticks.ts:24

The time-tick strategy. Places ticks at calendar boundaries instead of multiples of 1·2·5×10ⁿ — the start of a minute or hour, midnight, Monday, the 1st of the month, January 1st. A tick that crosses a bigger boundary gets a promoted label: the first tick of a month reads "Mar", the first of a year reads "2026".

Time zone and locale are handled with Intl alone — no date library dependency. Boundary arithmetic reads that zone's wall-clock parts and writes them back through Zone (../time/zone), which owns the rule for the readings a clock skips or repeats.

Properties ​

epochOf? ​

optional epochOf?: (x) => number

Defined in: packages/core/src/axis/time-ticks.ts:34

For when x isn't epoch ms — converts x to ms. Given as a pair with xOfEpoch. This is where data like the examples' x — "days since a reference date" — belongs.

Parameters ​

x ​

number

Returns ​

number


locale? ​

optional locale?: string

Defined in: packages/core/src/axis/time-ticks.ts:28

Label language. Defaults to the runtime environment's.


timeZone? ​

optional timeZone?: string

Defined in: packages/core/src/axis/time-ticks.ts:26

IANA time zone. Defaults to the runtime environment's.


xOfEpoch? ​

optional xOfEpoch?: (ms) => number

Defined in: packages/core/src/axis/time-ticks.ts:36

Maps a boundary timestamp (ms) back to the data's x.

Parameters ​

ms ​

number

Returns ​

number